Livemesh SiteOrigin Widgets - Version 1.0

Version Description

Download this release

Release Info

Developer livemesh
Plugin Icon 128x128 Livemesh SiteOrigin Widgets
Version 1.0
Comparing to
See all releases

Version 1.0

Files changed (107) hide show
  1. assets/css/_grid-settings.scss +11 -0
  2. assets/css/_lsow-lib.scss +126 -0
  3. assets/css/ajax-loader.gif +0 -0
  4. assets/css/flexslider.css +235 -0
  5. assets/css/fonts/icomoon/icomoon.eot +0 -0
  6. assets/css/fonts/icomoon/icomoon.svg +26 -0
  7. assets/css/fonts/icomoon/icomoon.ttf +0 -0
  8. assets/css/fonts/icomoon/icomoon.woff +0 -0
  9. assets/css/icomoon.css +75 -0
  10. assets/css/lsow-admin.css +4 -0
  11. assets/css/lsow-admin.css.map +7 -0
  12. assets/css/lsow-admin.scss +3 -0
  13. assets/css/lsow-frontend.css +421 -0
  14. assets/css/lsow-frontend.css.map +7 -0
  15. assets/css/lsow-frontend.scss +436 -0
  16. assets/css/magnific-popup.css +391 -0
  17. assets/css/slick.css +119 -0
  18. assets/js/imagesloaded.pkgd.js +942 -0
  19. assets/js/imagesloaded.pkgd.min.js +7 -0
  20. assets/js/isotope.pkgd.js +4257 -0
  21. assets/js/isotope.pkgd.min.js +12 -0
  22. assets/js/jquery.flexslider.js +1195 -0
  23. assets/js/jquery.flexslider.min.js +5 -0
  24. assets/js/jquery.magnific-popup.js +2060 -0
  25. assets/js/jquery.magnific-popup.min.js +4 -0
  26. assets/js/jquery.mb.YTPlayer.js +1544 -0
  27. assets/js/jquery.mb.YTPlayer.min.js +9 -0
  28. assets/js/jquery.stats.js +64 -0
  29. assets/js/jquery.stats.min.js +57 -0
  30. assets/js/jquery.waypoints.js +502 -0
  31. assets/js/jquery.waypoints.min.js +9 -0
  32. assets/js/lsow-admin.js +0 -0
  33. assets/js/lsow-admin.min.js +0 -0
  34. assets/js/lsow-frontend.js +193 -0
  35. assets/js/lsow-frontend.min.js +1 -0
  36. assets/js/modernizr-custom.min.js +3 -0
  37. assets/js/slick.js +2670 -0
  38. assets/js/slick.min.js +18 -0
  39. includes/class-lsow-setup.php +197 -0
  40. includes/helper-functions.php +192 -0
  41. includes/widgets/lsow-carousel-widget/assets/banner.svg +22 -0
  42. includes/widgets/lsow-carousel-widget/css/style.css +6 -0
  43. includes/widgets/lsow-carousel-widget/lsow-carousel-widget.php +318 -0
  44. includes/widgets/lsow-carousel-widget/styles/default.less +23 -0
  45. includes/widgets/lsow-carousel-widget/tpl/default.php +33 -0
  46. includes/widgets/lsow-clients-widget/assets/banner.svg +67 -0
  47. includes/widgets/lsow-clients-widget/css/style.css +91 -0
  48. includes/widgets/lsow-clients-widget/css/style.css.map +7 -0
  49. includes/widgets/lsow-clients-widget/css/style.scss +105 -0
  50. includes/widgets/lsow-clients-widget/lsow-clients-widget.php +103 -0
  51. includes/widgets/lsow-clients-widget/tpl/default.php +36 -0
  52. includes/widgets/lsow-heading-widget/assets/banner.svg +33 -0
  53. includes/widgets/lsow-heading-widget/css/style.css +55 -0
  54. includes/widgets/lsow-heading-widget/css/style.css.map +7 -0
  55. includes/widgets/lsow-heading-widget/css/style.scss +59 -0
  56. includes/widgets/lsow-heading-widget/lsow-heading-widget.php +89 -0
  57. includes/widgets/lsow-heading-widget/tpl/default.php +27 -0
  58. includes/widgets/lsow-hero-image-widget/assets/banner.svg +17 -0
  59. includes/widgets/lsow-hero-image-widget/css/style.css +144 -0
  60. includes/widgets/lsow-hero-image-widget/css/style.css.map +7 -0
  61. includes/widgets/lsow-hero-image-widget/css/style.scss +158 -0
  62. includes/widgets/lsow-hero-image-widget/lsow-hero-image-widget.php +404 -0
  63. includes/widgets/lsow-hero-image-widget/styles/default.less +29 -0
  64. includes/widgets/lsow-hero-image-widget/tpl/default.php +124 -0
  65. includes/widgets/lsow-odometers-widget/assets/banner.svg +29 -0
  66. includes/widgets/lsow-odometers-widget/css/style.css +161 -0
  67. includes/widgets/lsow-odometers-widget/css/style.css.map +7 -0
  68. includes/widgets/lsow-odometers-widget/css/style.scss +181 -0
  69. includes/widgets/lsow-odometers-widget/js/odometer.js +22 -0
  70. includes/widgets/lsow-odometers-widget/js/odometer.min.js +1 -0
  71. includes/widgets/lsow-odometers-widget/lsow-odometers-widget.php +169 -0
  72. includes/widgets/lsow-odometers-widget/tpl/default.php +59 -0
  73. includes/widgets/lsow-piecharts-widget/assets/banner.svg +29 -0
  74. includes/widgets/lsow-piecharts-widget/css/style.css +60 -0
  75. includes/widgets/lsow-piecharts-widget/css/style.css.map +7 -0
  76. includes/widgets/lsow-piecharts-widget/css/style.scss +70 -0
  77. includes/widgets/lsow-piecharts-widget/js/piechart.js +27 -0
  78. includes/widgets/lsow-piecharts-widget/js/piechart.min.js +1 -0
  79. includes/widgets/lsow-piecharts-widget/lsow-piecharts-widget.php +131 -0
  80. includes/widgets/lsow-piecharts-widget/tpl/default.php +40 -0
  81. includes/widgets/lsow-portfolio-widget/assets/banner.svg +38 -0
  82. includes/widgets/lsow-portfolio-widget/css/style.css +218 -0
  83. includes/widgets/lsow-portfolio-widget/css/style.css.map +7 -0
  84. includes/widgets/lsow-portfolio-widget/css/style.scss +229 -0
  85. includes/widgets/lsow-portfolio-widget/js/portfolio.js +31 -0
  86. includes/widgets/lsow-portfolio-widget/js/portfolio.min.js +1 -0
  87. includes/widgets/lsow-portfolio-widget/lsow-portfolio-widget.php +241 -0
  88. includes/widgets/lsow-portfolio-widget/styles/default.less +34 -0
  89. includes/widgets/lsow-portfolio-widget/tpl/default.php +148 -0
  90. includes/widgets/lsow-posts-carousel-widget/assets/banner.svg +40 -0
  91. includes/widgets/lsow-posts-carousel-widget/css/style.css +87 -0
  92. includes/widgets/lsow-posts-carousel-widget/css/style.css.map +7 -0
  93. includes/widgets/lsow-posts-carousel-widget/css/style.scss +63 -0
  94. includes/widgets/lsow-posts-carousel-widget/lsow-posts-carousel-widget.php +279 -0
  95. includes/widgets/lsow-posts-carousel-widget/styles/default.less +23 -0
  96. includes/widgets/lsow-posts-carousel-widget/tpl/default.php +86 -0
  97. includes/widgets/lsow-pricing-table-widget/assets/banner.svg +144 -0
  98. includes/widgets/lsow-pricing-table-widget/css/style.css +159 -0
  99. includes/widgets/lsow-pricing-table-widget/css/style.css.map +7 -0
  100. includes/widgets/lsow-pricing-table-widget/css/style.scss +181 -0
  101. includes/widgets/lsow-pricing-table-widget/lsow-pricing-table-widget.php +152 -0
  102. includes/widgets/lsow-pricing-table-widget/tpl/default.php +119 -0
  103. includes/widgets/lsow-services-widget/assets/banner.svg +73 -0
  104. includes/widgets/lsow-services-widget/css/style.css +72 -0
  105. includes/widgets/lsow-services-widget/css/style.css.map +7 -0
  106. includes/widgets/lsow-services-widget/css/style.scss +70 -0
  107. includes/widgets/lsow-services-widget/lsow-services-widget.php +135 -0
assets/css/_grid-settings.scss ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "neat-helpers"; // or "neat-helpers" when in Rails
2
+
3
+ // Change the grid settings
4
+ $column: 60px;
5
+ $gutter: 40px;
6
+ $grid-columns: 12;
7
+ $max-width: 1140px;
8
+
9
+ // Define your breakpoints
10
+ $tablet: new-breakpoint(max-width 767px 8);
11
+ $mobile: new-breakpoint(max-width 479px 4);
assets/css/_lsow-lib.scss ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "bourbon";
2
+ @import "neat";
3
+
4
+ // Custom Mixins for LiveMesh framework - utilizes other libs like Bourbon
5
+ $tablet_size: 767;
6
+ $mobile_size: 479;
7
+
8
+ @mixin border-radius($radius) {
9
+ -moz-border-radius: $radius;
10
+ -webkit-border-radius: $radius;
11
+ border-radius: $radius;
12
+ }
13
+
14
+ @mixin background-clip($padding-box) {
15
+ -moz-background-clip: $padding-box;
16
+ -webkit-background-clip: $padding-box;
17
+ border-background-clip: $padding-box;
18
+ }
19
+ @mixin center {
20
+ margin: 0 auto;
21
+ text-align: center;
22
+ }
23
+
24
+ @mixin background-opacity($color, $opacity: 0.3) {
25
+ background: $color; /* The Fallback */
26
+ background: rgba($color, $opacity);
27
+ }
28
+
29
+ @mixin vendorize($property, $value) {
30
+ -webkit-#{$property}: $value;
31
+ -moz-#{$property}: $value;
32
+ -ms-#{$property}: $value;
33
+ #{$property}: $value;
34
+ }
35
+
36
+ @mixin clear() {
37
+ &:before, &:after {
38
+ content: "\0020";
39
+ display: block;
40
+ height: 0;
41
+ overflow: hidden;
42
+ }
43
+ &:after {
44
+ clear: both;
45
+ }
46
+ }
47
+
48
+ @mixin linkTextOffscreen() {
49
+ text-indent: -9999px;
50
+ overflow: hidden;
51
+ text-decoration: none;
52
+ display: block;
53
+ font-size: 0;
54
+ text-align: start;
55
+ }
56
+
57
+ @mixin hoverActiveFocus($property, $value) {
58
+ &:hover, &:active, &:focus {
59
+ #{$property}: $value;
60
+ }
61
+ }
62
+
63
+ @mixin respond-to-max($point) {
64
+ @media only screen and (max-width: $point+px) { @content; }
65
+ }
66
+
67
+ @mixin respond-between($point1, $point2) {
68
+ @media only screen and (min-width: $point1+px) and (max-width: $point2+px) { @content; }
69
+ }
70
+
71
+ @mixin respond-to-min($point) {
72
+ @media only screen and (min-width: $point+px) { @content; }
73
+ }
74
+ @mixin respond-to-retina() {
75
+ @media only screen and (-webkit-min-device-pixel-ratio: 2) { @content; }
76
+ }
77
+
78
+ @mixin bottom-line($width: 35, $height: 2, $color: $theme_color) {
79
+ &:after {
80
+ width: $width + px;
81
+ height: $height + px;
82
+ background: $color;
83
+ display: block;
84
+ content: "";
85
+ @content;
86
+ }
87
+ }
88
+
89
+ @mixin lsow-icon-font() {
90
+ font-family: 'lsow-icomoon' !important;
91
+ speak: none;
92
+ font-style: normal;
93
+ font-weight: normal;
94
+ font-variant: normal;
95
+ text-transform: none;
96
+ line-height: 1;
97
+ -webkit-font-smoothing: antialiased;
98
+ -moz-osx-font-smoothing: grayscale;
99
+ }
100
+
101
+ @mixin lsow-transition($property: all, $time: 0.4s) {
102
+ @include vendorize(transition, $property $time ease-in-out 0s);
103
+
104
+ }
105
+
106
+ @mixin lsow-heading-style() {
107
+ font-size: 18px;
108
+ line-height: 26px;
109
+ letter-spacing: 1px;
110
+ font-weight: bold;
111
+ color: #333;
112
+ text-transform: uppercase;
113
+ clear: none;
114
+ margin-top: 0;
115
+ margin-bottom: 10px;
116
+ }
117
+
118
+ @mixin lsow-body-font() {
119
+ font-size: 15px;
120
+ line-height: 24px;
121
+ }
122
+
123
+ @mixin meta-font() {
124
+ font-style: italic;
125
+ color: #888;
126
+ }
assets/css/ajax-loader.gif ADDED
Binary file
assets/css/flexslider.css ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery FlexSlider v2.6.0
3
+ * http://www.woothemes.com/flexslider/
4
+ *
5
+ * Copyright 2012 WooThemes
6
+ * Free to use under the GPLv2 and later license.
7
+ * http://www.gnu.org/licenses/gpl-2.0.html
8
+ *
9
+ * Contributing author: Tyler Smith (@mbmufffin)
10
+ *
11
+ */
12
+
13
+ /* ====================================================================================================================
14
+ * RESETS
15
+ * ====================================================================================================================*/
16
+ .lsow-flex-container a:hover,
17
+ .lsow-flex-slider a:hover {
18
+ outline: none;
19
+ }
20
+ .lsow-slides,
21
+ .lsow-slides > li,
22
+ .lsow-flex-control-nav,
23
+ .lsow-flex-direction-nav {
24
+ margin: 0;
25
+ padding: 0;
26
+ list-style: none;
27
+ }
28
+ .lsow-flex-pauseplay span {
29
+ text-transform: capitalize;
30
+ }
31
+ /* ====================================================================================================================
32
+ * BASE STYLES
33
+ * ====================================================================================================================*/
34
+ .lsow-flexslider {
35
+ margin: 0;
36
+ padding: 0;
37
+ }
38
+ .lsow-flexslider .lsow-slides > li {
39
+ display: none;
40
+ -webkit-backface-visibility: hidden;
41
+ }
42
+ .lsow-flexslider .lsow-slides img {
43
+ width: 100%;
44
+ display: block;
45
+ }
46
+ html[xmlns] .lsow-flexslider .lsow-slides {
47
+ display: block;
48
+ }
49
+ * html .lsow-flexslider .lsow-slides {
50
+ height: 1%;
51
+ }
52
+ .no-js .lsow-flexslider .lsow-slides > li:first-child {
53
+ display: block;
54
+ }
55
+ /* ====================================================================================================================
56
+ * DEFAULT THEME
57
+ * ====================================================================================================================*/
58
+ .lsow-flexslider {
59
+ margin: 0;
60
+ position: relative;
61
+ zoom: 1;
62
+ }
63
+ .lsow-flexslider .lsow-slides {
64
+ zoom: 1;
65
+ }
66
+ .lsow-flexslider .lsow-slides img {
67
+ height: auto;
68
+ -moz-user-select: none;
69
+ }
70
+ .lsow-flex-viewport {
71
+ max-height: 2000px;
72
+ -webkit-transition: all 1s ease;
73
+ -moz-transition: all 1s ease;
74
+ -ms-transition: all 1s ease;
75
+ -o-transition: all 1s ease;
76
+ transition: all 1s ease;
77
+ }
78
+ .loading .lsow-flex-viewport {
79
+ max-height: 300px;
80
+ }
81
+ .carousel li {
82
+ margin-right: 5px;
83
+ }
84
+ .lsow-flex-direction-nav {
85
+ *height: 0;
86
+ }
87
+ .lsow-flex-direction-nav a {
88
+ text-decoration: none;
89
+ display: block;
90
+ width: 40px;
91
+ height: 40px;
92
+ margin: -20px 0 0;
93
+ position: absolute;
94
+ top: 50%;
95
+ z-index: 10;
96
+ overflow: hidden;
97
+ opacity: 0;
98
+ cursor: pointer;
99
+ color: rgba(0, 0, 0, 0.8);
100
+ text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
101
+ -webkit-transition: all 0.3s ease-in-out;
102
+ -moz-transition: all 0.3s ease-in-out;
103
+ -ms-transition: all 0.3s ease-in-out;
104
+ -o-transition: all 0.3s ease-in-out;
105
+ transition: all 0.3s ease-in-out;
106
+ }
107
+ a.lsow-flex-prev {
108
+ /* font-family: "flexslider-icon"; */
109
+ font-size: 40px;
110
+ /* display: inline-block; */
111
+ /* content: '\f001'; */
112
+ color: rgba(0, 0, 0, 0.8);
113
+ text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
114
+ }
115
+ .lsow-flex-direction-nav a.lsow-flex-next:before {
116
+ content: '\f002';
117
+ }
118
+ .lsow-flex-direction-nav .lsow-flex-prev {
119
+ left: -50px;
120
+ }
121
+ .lsow-flex-direction-nav .lsow-flex-next {
122
+ right: -50px;
123
+ text-align: right;
124
+ }
125
+ .lsow-flex-direction-nav .lsow-flex-disabled {
126
+ opacity: 0!important;
127
+ filter: alpha(opacity=0);
128
+ cursor: default;
129
+ z-index: -1;
130
+ }
131
+ .lsow-flex-pauseplay a {
132
+ display: block;
133
+ width: 20px;
134
+ height: 20px;
135
+ position: absolute;
136
+ bottom: 5px;
137
+ left: 10px;
138
+ opacity: 0.8;
139
+ z-index: 10;
140
+ overflow: hidden;
141
+ cursor: pointer;
142
+ color: #000;
143
+ }
144
+ .lsow-flex-pauseplay a:before {
145
+ font-family: "flexslider-icon";
146
+ font-size: 20px;
147
+ display: inline-block;
148
+ content: '\f004';
149
+ }
150
+ .lsow-flex-pauseplay a:hover {
151
+ opacity: 1;
152
+ }
153
+ .lsow-flex-pauseplay a.lsow-flex-play:before {
154
+ content: '\f003';
155
+ }
156
+ .lsow-flex-control-nav {
157
+ width: 100%;
158
+ position: absolute;
159
+ bottom: -40px;
160
+ text-align: center;
161
+ }
162
+ .lsow-flex-control-nav li {
163
+ margin: 0 6px;
164
+ display: inline-block;
165
+ zoom: 1;
166
+ *display: inline;
167
+ }
168
+ .lsow-flex-control-paging li a {
169
+ width: 11px;
170
+ height: 11px;
171
+ display: block;
172
+ background: #666;
173
+ background: rgba(0, 0, 0, 0.5);
174
+ cursor: pointer;
175
+ text-indent: -9999px;
176
+ -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
177
+ -moz-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
178
+ -o-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
179
+ box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
180
+ -webkit-border-radius: 20px;
181
+ -moz-border-radius: 20px;
182
+ border-radius: 20px;
183
+ }
184
+ .lsow-flex-control-paging li a:hover {
185
+ background: #333;
186
+ background: rgba(0, 0, 0, 0.7);
187
+ }
188
+ .lsow-flex-control-paging li a.lsow-flex-active {
189
+ background: #000;
190
+ background: rgba(0, 0, 0, 0.9);
191
+ cursor: default;
192
+ }
193
+ .lsow-flex-control-thumbs {
194
+ margin: 5px 0 0;
195
+ position: static;
196
+ overflow: hidden;
197
+ }
198
+ .lsow-flex-control-thumbs li {
199
+ width: 25%;
200
+ float: left;
201
+ margin: 0;
202
+ }
203
+ .lsow-flex-control-thumbs img {
204
+ width: 100%;
205
+ height: auto;
206
+ display: block;
207
+ opacity: .7;
208
+ cursor: pointer;
209
+ -moz-user-select: none;
210
+ -webkit-transition: all 1s ease;
211
+ -moz-transition: all 1s ease;
212
+ -ms-transition: all 1s ease;
213
+ -o-transition: all 1s ease;
214
+ transition: all 1s ease;
215
+ }
216
+ .lsow-flex-control-thumbs img:hover {
217
+ opacity: 1;
218
+ }
219
+ .lsow-flex-control-thumbs .lsow-flex-active {
220
+ opacity: 1;
221
+ cursor: default;
222
+ }
223
+ /* ====================================================================================================================
224
+ * RESPONSIVE
225
+ * ====================================================================================================================*/
226
+ @media screen and (max-width: 860px) {
227
+ .lsow-flex-direction-nav .lsow-flex-prev {
228
+ opacity: 1;
229
+ left: 10px;
230
+ }
231
+ .lsow-flex-direction-nav .lsow-flex-next {
232
+ opacity: 1;
233
+ right: 10px;
234
+ }
235
+ }
assets/css/fonts/icomoon/icomoon.eot ADDED
Binary file
assets/css/fonts/icomoon/icomoon.svg ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="icomoon" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
+ <glyph unicode="&#xe900;" glyph-name="arrow-left" d="M592 672c-12.512 0-23.776-4.896-32.352-12.736l-0.096 0.16-192-176.032c-9.888-9.12-15.552-21.952-15.552-35.424 0-13.44 5.664-26.24 15.552-35.328l192-176 0.096 0.128c8.576-7.904 19.84-12.768 32.352-12.768 26.496 0 48 21.504 48 48 0 14.016-6.080 26.496-15.648 35.264l0.096 0.064-153.408 140.64 153.408 140.64-0.096 0.16c9.568 8.704 15.648 21.216 15.648 35.232 0 26.496-21.504 48-48 48zM512 960c-282.752 0-512-229.28-512-512.032 0-282.72 229.248-511.968 512-511.968s512 229.248 512 511.968c0 282.752-229.248 512.032-512 512.032zM512 32c-229.376 0-416 186.624-416 415.968 0 229.376 186.624 416.032 416 416.032s416-186.656 416-416.064c0-229.312-186.624-415.936-416-415.936z" />
11
+ <glyph unicode="&#xe901;" glyph-name="arrow-right" d="M464.448 659.392l-0.096-0.16c-8.576 7.84-19.84 12.768-32.352 12.768-26.496 0-48-21.504-48-48 0-14.016 6.080-26.496 15.648-35.264l-0.096-0.16 153.408-140.64-153.312-140.704c-9.568-8.736-15.648-21.248-15.648-35.232 0-26.496 21.504-48 48-48 12.512 0 23.776 4.864 32.352 12.736l0.096-0.128 192 176c9.888 9.088 15.552 21.92 15.552 35.36 0 13.504-5.664 26.304-15.552 35.392l-192 176.032zM512 960c-282.752 0-512-229.28-512-512.032 0-282.72 229.248-511.968 512-511.968s512 229.248 512 511.968c0 282.752-229.248 512.032-512 512.032zM512 32c-229.376 0-416 186.624-416 415.968 0 229.376 186.624 416.032 416 416.032s416-186.656 416-416.064c0-229.312-186.624-415.936-416-415.936z" />
12
+ <glyph unicode="&#xe902;" glyph-name="icon-aim" d="M865.472 104.341c-55.723 144.341-230.571 247.552-238.677 252.245-14.549 7.787-28.011 18.581-35.307 24.875-0.384 9.579 1.408 13.504 2.069 14.080 0 0 0.939 0.576 3.776 0.576 6.187 0 13.461-2.709 17.259-4.373 18.965-7.083 46.187-8.533 65.707-8.533 5.717 0 9.515 0.128 9.6 0.128 100.907 0.043 163.755 61.675 166.379 64.299 6.528 6.549 8.128 16.491 3.968 24.747l-40.512 80.085c-2.603 5.163-7.211 9.045-12.757 10.752s-11.52 1.088-16.576-1.707c-51.179-28.203-95.893-43.157-129.301-43.157-29.909 0-41.387 11.755-43.627 14.464-7.744 15.424-28.373 55.829-28.373 55.829-0.789 1.536-1.749 3.008-2.88 4.288-12.885 14.912-30.571 22.784-51.115 22.784-26.837 0-50.005-13.419-52.096-14.699-102.997-58.283-103.275-223.744-103.168-229.163-12.011-172.992-198.72-222.613-206.677-224.661-9.451-2.411-16.085-10.923-16.085-20.672 0-4.629 0-13.248 46.677-120.341 3.435-7.872 11.2-12.8 19.541-12.8 1.301 0 2.581 0.085 3.883 0.341 159.189 29.248 268.864 166.208 302.635 213.717 162.411-82.496 207.616-185.003 208.043-185.963 2.539-6.080 7.765-10.667 14.144-12.416 6.4-1.621 13.205-0.384 18.475 3.627l88.043 66.965c7.531 5.76 10.389 15.808 6.955 24.683zM764.459 61.76c-24.768 40.427-89.856 124.245-232.704 192.299-9.771 4.629-21.504 1.259-27.264-7.915-1.088-1.707-106.816-167.659-268.523-206.869-12.011 27.84-23.744 56-30.592 73.621 56.725 20.672 205.547 90.581 217.067 257.621-0.021 1.451 0.107 147.243 81.963 193.621 4.245 2.453 18.048 8.917 30.699 8.917 7.275 0 12.843-2.048 17.323-6.421 4.885-9.621 21.781-42.709 28.416-55.829 2.133-3.584 22.635-35.115 80.256-35.115 36.501 0 80.277 12.843 130.347 38.165l23.061-45.632c-20.011-14.997-64.704-42.219-125.589-42.219-0.192 0-3.499-0.128-8.619-0.128-21.973 0-40.981 2.176-49.195 5.163-1.685 0.789-16.939 7.744-33.771 7.744-18.624 0-29.781-8.213-35.84-15.125-11.029-12.501-14.827-30.549-11.669-55.168 0.597-4.843 2.88-9.301 6.379-12.672 0.96-0.917 23.552-22.464 49.792-36.459 1.621-0.96 156.885-92.587 213.504-215.787l-55.040-41.813zM621.611 622.912c77.099 0 139.861 62.699 139.861 139.84 0 77.077-62.741 139.84-139.861 139.84s-139.819-62.741-139.819-139.84c0-77.12 62.699-139.84 139.819-139.84zM621.611 859.925c53.611 0 97.195-43.584 97.195-97.173s-43.584-97.173-97.195-97.173c-53.589 0-97.152 43.584-97.152 97.173s43.563 97.173 97.152 97.173z" />
13
+ <glyph unicode="&#xe903;" glyph-name="icon-behance" d="M168.661 484.16h152.811c47.787 0 71.019 28.8 71.019 88 0 62.933-39.851 79.552-60.907 79.552h-162.923c-11.797 0-21.333-9.557-21.333-21.333v-124.885c0-11.776 9.557-21.333 21.333-21.333zM189.995 609.067h141.589c0.192 0 18.24-0.427 18.24-36.885 0-45.333-13.12-45.333-28.352-45.333h-131.477v82.219zM468.459 478.976c23.552 19.499 42.837 51.605 42.837 101.867 0 103.509-70.549 170.368-179.712 170.368h-291.243c-11.776 0-21.333-9.557-21.333-21.333v-559.701c0-11.776 9.557-21.312 21.333-21.312h290.56c0.235 0 2.432-0.043 2.645-0.043 0 0 0 0 0.021 0 13.227 0 59.883 1.813 104.896 24.853 42.091 21.568 92.245 67.115 92.203 160.491 0.192 3.243 3.947 80.149-40.235 126.848-6.656 7.083-13.995 13.077-21.973 17.963zM488.043 335.381c0-58.624-23.211-100.245-69.013-123.712-37.483-19.179-77.781-20.16-85.461-20.16h-0.021l-1.963 0.021h-269.909v517.035h269.909c85.824 0 137.045-47.744 137.045-127.701 0-77.099-59.093-84.672-65.643-85.248-11.456-0.853-20.16-10.603-19.755-22.059 0.448-11.477 9.856-20.544 21.333-20.544 23.36 0 41.259-6.912 54.763-21.141 31.552-33.237 28.779-94.741 28.715-96.491zM331.584 440.555h-162.923c-11.797 0-21.333-9.557-21.333-21.333v-149.611c0-11.776 9.536-21.333 21.333-21.333l155.179 0.021c55.979 1.259 88.085 35.52 88.085 94.037 0 77.696-52.501 98.219-80.341 98.219zM322.944 290.965h-132.949v106.944h141.547c6.293-0.128 37.717-3.328 37.717-55.552 0-44.245-22.293-50.859-46.315-51.392zM789.461 547.2c-83.093 0-114.581-68.459-119.616-104.64-0.853-6.123 0.981-12.288 5.035-16.96 4.032-4.651 9.899-7.339 16.085-7.339h183.851c11.691 0 21.163 9.387 21.333 21.056 0.021 1.92 0.256 47.552-30.891 79.104-18.837 19.115-44.352 28.779-75.797 28.779zM719.765 460.928c9.216 19.499 28.864 43.605 69.696 43.605 19.797 0 34.581-5.184 45.248-15.872 8.192-8.213 12.821-18.624 15.424-27.733h-130.368zM1003.221 362.155c0.661 5.013 15.317 124.075-53.333 202.283-37.739 42.965-92.437 64.747-162.624 64.747-122.091 0-180.117-64.875-207.317-119.317-28.779-57.621-29.056-114.688-28.992-115.733-0.32-4.693-6.443-115.712 64.235-190.997 41.109-43.755 98.923-65.963 170.688-65.963h0.171c0 0 3.243-0.192 8.939-0.192 99.179 0 205.163 44.736 205.163 170.304 0 11.776-9.536 21.333-21.333 21.333h-98.517c-5.717 0-11.179-2.475-15.211-6.549-4.011-4.053-6.208-9.749-6.123-15.467 0.021-0.576 0.107-14.016-10.176-24.448-10.752-10.944-29.547-15.701-56.747-13.781-34.56 2.389-71.211 10.752-77.675 75.157h267.712c10.709 0.043 19.755 8 21.141 18.624zM962.112 386.24h-270.080c-11.776 0-21.333-9.557-21.333-21.333 0-130.837 89.088-137.024 118.379-139.072 41.749-2.944 71.040 6.443 90.944 27.264 10.368 10.859 15.787 22.805 18.603 32.853h57.493c-5.397-40.043-26.795-68.48-64.939-86.592-37.568-17.813-79.765-19.733-96.213-19.733-3.904 0-6.229 0.107-7.701 0.149-60.693 0-108.032 17.6-140.779 52.331-58.048 61.611-53.013 158.4-52.928 160.619 0.043 7.915 2.859 193.749 193.707 193.749 57.28 0 101.141-16.832 130.432-50.069 41.621-47.232 45.312-117.12 44.416-150.165zM666.88 647.424h230.891c11.776 0 21.333 9.536 21.333 21.333v68.907c0 11.797-9.557 21.333-21.333 21.333h-230.891c-11.797 0-21.333-9.536-21.333-21.333v-68.907c0-11.797 9.536-21.333 21.333-21.333zM688.213 716.331h188.224v-26.24h-188.224v26.24z" />
14
+ <glyph unicode="&#xe904;" glyph-name="icon-dribbble" d="M804.715 756.992l-19.456 18.432-0.661-1.109c-76.672 64.235-172.331 99.669-272.597 99.669-54.464 0-107.456-10.795-158.059-31.125l-0.555 0.576-13.504-5.952c-125.419-55.531-216.96-168.469-244.843-302.187l-3.456-16.597 0.811-0.384c-3.904-23.317-6.4-46.848-6.4-70.315 0-124.736 53.909-241.323 148.309-322.517l-0.192-0.448 12.843-10.219c76.245-60.715 167.915-92.8 265.045-92.8 51.285 0 101.909 9.429 150.955 28.096l13.461 5.227v0.363c139.968 56.747 236.011 181.419 256.704 332.565l1.131-0.405 2.133 27.648c0.832 10.752 1.621 21.525 1.621 32.469 0 117.824-47.339 227.563-133.291 309.013zM889.749 448v-2.155c-42.667 14.549-98.411 21.888-150.464 21.888-45.205 0-89.493-5.632-133.376-16.683-8.491 22.677-16.939 44.821-26.624 66.24l1.408 0.619-0.469 1.003c86.4 43.221 157.675 107.691 210.816 188.395 65.664-70.976 98.709-162.091 98.709-259.307zM762.069 737.451c-49.472-77.675-118.187-139.499-200.491-180.501-46.229 92.032-105.152 176.768-175.616 252.523 40.597 14.272 82.816 21.845 126.037 21.845 92.331 0 180.309-33.451 250.069-93.867zM343.787 792.256c72.299-75.349 132.459-160.32 179.157-252.949-59.328-23.637-121.877-35.627-186.219-35.627-68.011 0-133.867 13.333-196.075 39.616 27.776 108.224 102.272 199.595 203.136 248.96zM128.661 448c0 17.493 1.664 35.029 4.075 52.459 64.896-26.176 133.376-39.467 204.011-39.467s139.2 13.461 204.288 39.701c9.088-20.053 17.643-40.747 25.664-61.973-136.683-46.144-249.003-143.787-313.749-272.789-79.232 72.661-124.288 173.973-124.288 282.069zM286.741 138.133c59.093 123.541 164.949 217.216 294.464 260.629 33.621-101.291 51.456-206.677 52.992-313.707-39.872-13.525-80.917-20.352-122.219-20.352-81.813-0.021-159.36 25.323-225.237 73.429zM675.755 101.675c-3.008 105.216-21.035 208.725-53.931 308.48 89.003 21.781 182.677 18.901 269.888-8.149-15.637-133.803-96.299-245.653-215.957-300.331z" />
15
+ <glyph unicode="&#xe905;" glyph-name="icon-facebook" d="M766.101 908.203l-139.947-0.064c0 0-2.859 0.213-7.957 0.213-28.715 0-173.909-7.979-213.44-163.691-0.619-1.728-13.888-40.704-14.123-131.371h-132.757c-11.776 0-21.333-9.536-21.333-21.333v-122.304c0-11.776 9.557-21.333 21.333-21.333h145.195v-439.339c0-11.776 9.557-21.333 21.333-21.333h166.251c11.797 0 21.333 9.557 21.333 21.333v438.891h145.664c11.797 0 21.333 9.536 21.333 21.333v122.752c0 11.797-9.536 21.333-21.333 21.333h-145.344v52.523c0 34.965 22.187 72.32 84.48 72.32h69.312c11.776 0 21.333 9.557 21.333 21.333v127.403c0 11.776-9.557 21.333-21.333 21.333zM744.768 780.8h-47.979c-87.829 0-127.147-57.749-127.147-114.987v-73.856c0-11.776 9.536-21.333 21.333-21.333h145.344v-80.085h-145.664c-11.776 0-21.333-9.557-21.333-21.333v-438.891h-123.584v439.339c0 11.797-9.536 21.333-21.333 21.333h-145.195v79.637h132.928c5.739 0 11.2 2.304 15.232 6.421 4.011 4.075 6.208 9.621 6.101 15.36-1.92 97.024 11.435 137.877 12.053 139.947 31.488 123.755 140.096 133.355 172.651 133.355 2.965 0 4.757-0.107 6.485-0.149h120.085v-84.757z" />
16
+ <glyph unicode="&#xe906;" glyph-name="icon-flickr" d="M358.379 588.523c-76.928 0-139.52-63.040-139.52-140.523 0-77.525 62.592-140.565 139.52-140.565s139.52 63.040 139.52 140.565c0 77.483-62.592 140.523-139.52 140.523zM358.379 350.101c-53.419 0-96.853 43.925-96.853 97.899 0 53.952 43.435 97.856 96.853 97.856 53.397 0 96.853-43.904 96.853-97.856 0-53.973-43.456-97.899-96.853-97.899zM673.536 588.523c-76.928 0-139.52-63.040-139.52-140.523 0-77.525 62.592-140.565 139.52-140.565 76.907 0 139.499 63.040 139.499 140.565 0 77.483-62.571 140.523-139.499 140.523zM673.536 350.101c-53.419 0-96.853 43.925-96.853 97.899 0 53.952 43.435 97.856 96.853 97.856 53.397 0 96.832-43.904 96.832-97.856 0-53.973-43.435-97.899-96.832-97.899zM515.968 906.603c-255.168 0-462.741-205.739-462.741-458.624s207.573-458.581 462.741-458.581c250.795 0 454.827 205.717 454.827 458.581 0 252.907-204.053 458.624-454.827 458.624zM515.968 32.064c-231.616 0-420.075 186.581-420.075 415.915 0 229.355 188.459 415.957 420.075 415.957 227.264 0 412.16-186.603 412.16-415.957 0-229.333-184.896-415.915-412.16-415.915z" />
17
+ <glyph unicode="&#xe907;" glyph-name="icon-googleplus" d="M498.581 564.864c8 12.053 13.227 24.725 15.808 39.189 1.173 10.816 1.771 20.181 1.771 27.883 0 33.173-8.491 66.859-25.173 99.947-8.555 17.451-20.117 31.957-35.029 43.563-15.467 11.136-33.344 17.109-53.056 17.728-0.405 0.021-0.789 0.021-1.195 0-26.816-0.619-49.387-11.52-67.115-32.384-0.469-0.576-0.939-1.173-1.344-1.792-13.995-20.544-20.8-43.733-20.203-68.416 0-30.912 8.981-63.189 26.859-96.213 9.195-16.299 21.141-30.272 35.541-41.536 16.085-12.608 34.667-19.029 56.085-19.029h0.085c25.515 0.96 47.211 10.347 64.427 27.947 0.939 0.939 1.792 1.984 2.539 3.115zM472.192 610.155c-1.195-6.613-3.904-13.333-8.043-19.968-9.195-8.725-20.331-13.227-33.344-13.739-11.029 0-20.501 3.243-29.035 9.941-9.963 7.808-18.261 17.515-24.491 28.587-14.293 26.389-21.547 51.84-21.547 76.075-0.384 15.936 3.605 29.995 12.16 42.944 9.429 10.773 20.373 16.021 34.261 16.469 11.008-0.448 20.437-3.605 28.224-9.216 9.237-7.189 16.512-16.427 22.4-28.395 13.739-27.285 20.715-54.528 20.715-80.96 0-6.293-0.533-14.037-1.301-21.739zM462.827 320.256c-2.944 2.069-6.336 3.328-9.92 3.733-5.483 0.576-11.883 0.875-19.221 0.896-5.525 0.448-15.637 0.107-35.413-1.749-17.472-2.475-35.648-6.549-55.531-12.544-4.245-1.621-10.219-4.053-18.475-7.552-8.896-4.096-18.048-9.92-27.84-17.899-9.301-8.235-17.195-18.389-23.083-29.547-7.723-13.419-11.648-29.355-11.648-47.403 0-35.285 15.872-64.533 46.741-86.613 27.84-20.949 65.515-31.872 112.597-32.448 42.496 0.576 76.011 10.603 99.733 29.845 24.448 20.053 36.885 46.251 36.885 77.824 0 25.6-8.491 48.235-25.984 68.053-15.083 15.488-37.611 33.6-68.843 55.403zM493.803 152.064c-16-12.992-40.661-19.819-72.768-20.245-37.248 0.448-66.496 8.469-87.339 24.171-20.011 14.293-29.333 30.891-29.333 52.203 0 10.453 2.005 19.221 6.315 26.731 3.883 7.317 8.597 13.461 13.333 17.685 6.293 5.099 12.373 9.024 17.472 11.371 7.083 3.008 12.587 5.248 14.976 6.251 16.341 4.885 32.427 8.448 46.741 10.517 11.733 1.088 20.117 1.643 25.173 1.643l1.579-0.021c4.629-0.619 9.237-0.192 13.141-0.405 26.219-18.539 45.696-34.261 57.301-46.080 9.813-11.157 14.592-23.936 14.592-39.061 0.021-18.667-6.741-32.917-21.184-44.757zM581.781 407.168l-35.904 29.269c-4.971 4.971-10.048 10.709-15.893 18.005-2.005 2.24-4.672 6.165-4.672 14.315 0 7.36 1.835 13.269 6.421 19.627 4.885 7.509 10.176 14.229 14.379 18.709 11.755 10.24 22.827 20.309 34.027 30.976 9.877 10.389 19.307 21.845 28.075 34.155 19.243 27.157 29.376 63.083 30.080 107.093l0.021 7.147c0.085 16.683 0.128 25.877-5.44 44.288-6.891 18.88-13.483 33.877-23.040 45.163h13.696c6.656 0 12.907 3.115 16.939 8.384l54.293 71.040c4.928 6.464 5.781 15.147 2.197 22.421-3.627 7.232-11.029 11.84-19.157 11.84h-220.757c-30.528 0-63.616-3.584-99.008-10.795-36.928-8.597-72.789-27.093-107.84-56.043-49.792-48.149-75.051-102.933-75.051-162.859 0-50.368 18.261-94.997 53.44-131.755 34.816-40.981 85.397-62.144 150.656-62.976 1.664 0 3.371 0.021 5.099 0.064-1.259-6.037-1.877-12.629-1.877-19.883 0-20.309 4.8-38.187 13.333-51.563 0.811-1.557 1.643-3.115 2.496-4.693-18.752-1.685-39.787-4.245-63.040-7.659-41.621-7.189-81.877-21.781-119.957-43.563-35.371-21.077-60.352-46.357-74.155-74.88-13.952-27.968-21.013-54.144-21.013-77.803 0-48.619 22.165-90.624 65.28-124.309 41.856-35.392 104.704-53.739 186.795-54.507h0.533c97.131 1.515 173.056 25.579 225.728 71.509 51.84 45.312 78.123 98.56 78.123 158.613-0.747 41.92-10.752 76.757-30.165 104.107-18.411 24.171-40.192 46.549-64.64 66.56zM570.411 110.037c-44.8-39.061-111.445-59.584-198.059-60.971-71.744 0.704-125.376 15.637-160.021 44.928-33.344 26.069-49.515 55.893-49.515 91.2 0 17.003 5.568 36.779 16.64 59.008 10.219 21.099 29.632 40.299 57.365 56.853 33.408 19.115 68.971 32 105.173 38.272 37.909 5.589 69.739 8.747 94.592 9.451 8 0.213 15.211 4.885 18.645 12.096 3.456 7.232 2.581 15.765-2.261 22.123-7.168 9.429-13.675 19.712-20.203 32.064-5.099 8.085-7.595 18.005-7.595 30.293 0 8.469 1.344 13.355 2.965 17.301 2.368 6.784 4.629 13.056 6.677 18.731 2.496 6.933 1.259 14.677-3.307 20.48-4.053 5.163-10.261 8.128-16.747 8.128-0.789 0-1.579-0.043-2.368-0.128-11.947-1.344-23.061-2.027-32.832-2.027-52.843 0.661-91.563 16.363-119.232 48.853-28.565 29.888-42.453 63.637-42.453 103.211 0 48.576 20.288 91.819 60.779 131.072 28.651 23.595 58.645 39.189 88.533 46.144 31.979 6.528 62.229 9.813 89.899 9.813h177.6l-21.675-28.373h-57.557c-9.387 0-17.429-6.336-20.16-15.339-2.709-9.003 1.045-18.901 8.896-24.107 4.331-2.88 20.203-18.219 26.987-24.768l5.696-5.461c6.464-6.677 13.355-25.643 15.573-31.595 3.328-11.136 3.307-15.296 3.243-30.677l-0.021-6.976c-0.555-34.901-8.043-62.741-22.165-82.709-7.573-10.603-15.744-20.523-23.509-28.715-9.984-9.493-20.629-19.157-33.237-30.272-7.424-7.68-14.4-16.533-20.075-25.344-9.301-12.693-13.995-27.435-13.995-43.861 0-16.853 5.227-31.253 14.741-41.813 6.037-7.595 12.181-14.549 19.883-22.080l37.483-30.677c21.888-17.92 41.344-37.909 57.344-58.859 13.909-19.627 21.269-46.4 21.845-79.189-0.043-47.467-20.843-88.725-63.573-126.080zM882.517 767.232h-64v64c0 11.797-9.557 21.333-21.333 21.333s-21.333-9.536-21.333-21.333v-64h-64c-11.776 0-21.333-9.536-21.333-21.333 0-11.776 9.557-21.333 21.333-21.333h64v-64c0-11.776 9.557-21.333 21.333-21.333s21.333 9.557 21.333 21.333v64h64c11.776 0 21.333 9.557 21.333 21.333 0 11.797-9.557 21.333-21.333 21.333z" />
18
+ <glyph unicode="&#xe908;" glyph-name="icon-linkedin" d="M255.915 646.272h-172.181c-11.797 0-21.333-9.536-21.333-21.333v-601.899c0-11.797 9.536-21.333 21.333-21.333h172.181c11.797 0 21.333 9.536 21.333 21.333v601.899c0 11.797-9.536 21.333-21.333 21.333zM234.581 44.373h-129.515v559.232h129.515v-559.232zM736 653.589c-83.605 0-138.304-36.053-170.069-67.435l-3.947 40.832c-1.067 10.965-10.261 19.285-21.227 19.285h-0.427l-156.971-3.008c-5.76-0.107-11.2-2.539-15.147-6.741-3.947-4.181-6.016-9.792-5.76-15.552 1.963-43.947 1.899-95.317 1.813-154.795l-0.021-446.165c0-11.797 9.536-21.333 21.333-21.333h172.203c11.776 0 21.333 9.536 21.333 21.333v347.947c0 17.792 1.515 30.635 4.587 38.293 10.731 27.307 46.123 55.573 86.784 55.573 52.672 0 84.096-40.064 84.096-107.2v-334.592c0-11.797 9.557-21.333 21.333-21.333h169.173c11.797 0 21.333 9.536 21.333 21.333v356.416c0.043 173.568-86.101 277.141-230.421 277.141zM923.797 41.365h-126.507v313.259c0 91.029-49.749 149.867-126.763 149.867-61.077 0-110.763-42.581-126.464-82.581-5.184-12.949-7.573-30.080-7.573-53.952v-326.592h-129.536l0.021 424.747c0.085 50.539 0.128 95.253-1.045 134.912l115.499 2.219 6.635-68.821c1.067-10.944 10.24-19.264 21.248-19.264h3.627c7.36 0 14.187 3.776 18.091 10.027 12.587 20.096 61.675 85.739 164.992 85.739 119.36 0 187.797-85.44 187.797-234.475v-335.083zM177.067 897.301c-69.269 0-119.531-47.723-119.531-113.493 0-65.728 49.259-113.429 117.12-113.429 69.952 0 120.704 47.701 120.704 113.941-1.557 66.496-50.197 112.981-118.293 112.981zM174.677 713.024c-43.84 0-74.453 29.099-74.453 70.763 0 42.368 30.869 70.827 76.864 70.827 44.928 0 74.645-28.011 75.648-70.827-0.021-42.325-31.403-70.763-78.059-70.763z" />
19
+ <glyph unicode="&#xe909;" glyph-name="icon-pinterest" d="M877.205 689.515c-14.592 49.472-38.037 91.136-71.723 127.403-32.939 35.435-70.784 62.293-115.776 82.112-32.384 14.272-84.715 31.275-150.123 31.275-5.717 0-11.477-0.149-17.259-0.427-19.712-0.896-40.597-2.027-60.587-4.885-55.851-8-105.003-24.704-150.251-51.072-57.856-33.664-102.997-79.488-134.165-136.149-16.235-29.483-32.192-81.429-38.955-115.349-8.043-40.171-0.939-109.781 15.189-148.971 19.947-48.384 37.269-71.019 77.269-100.949 0.256-0.171 24.683-18.304 43.029-18.304h0.021c31.915 0.597 38.123 30.677 41.109 45.12 0.512 2.581 1.067 5.141 1.685 7.531 0.533 2.133 1.259 4.395 1.984 6.763 4.352 14.165 10.304 33.557 0.235 51.115-3.712 6.485-8.064 11.435-11.925 15.808-1.963 2.24-3.968 4.437-5.568 6.827-14.016 20.928-21.141 47.168-21.141 77.952 0 40.619 9.173 77.419 28.011 112.448 34.155 63.531 90.88 103.616 164.011 115.989 40.981 6.891 91.157 3.797 126.677-7.616 33.131-10.645 61.333-29.525 81.557-54.571 21.419-26.475 33.664-60.139 36.395-100.053 1.344-19.627 0.576-41.387-2.432-68.523-7.403-65.899-26.453-118.912-56.704-157.589-24.555-31.424-50.944-47.189-80.661-48.192l-4.011-0.085c-17.152 0-30.123 3.84-42.112 12.437-12.011 8.619-19.2 19.243-22.592 33.429-3.861 16.235 0.875 33.365 5.909 51.541l0.789 2.944c4.459 16.149 9.088 30.912 13.632 45.44 7.211 23.040 14.677 46.848 20.843 74.496 6.976 31.381 7.893 56.789 2.816 77.675-6.336 26.091-20.309 45.632-41.557 58.112-21.845 12.8-54.528 15.595-81.003 6.507-39.573-13.568-69.76-49.536-82.795-98.731-6.613-24.832-8.491-50.944-5.675-77.525 2.176-20.651 6.72-39.36 15.125-61.803-0.235-0.768-0.448-1.536-0.704-2.304-0.597-2.069-1.195-4.032-1.6-5.781-9.237-38.677-18.219-76.843-27.179-114.944-8.341-35.413-16.661-70.784-25.173-106.517l-1.92-7.957c-8.832-36.907-18.005-75.093-20.117-120.768l-0.939-18.88c-1.856-35.413-3.776-72.021 0.981-106.112 0.917-6.336 3.2-22.293 18.581-28.011 2.795-2.027 7.509-4.629 14.037-4.629 12.416 0 20.416 8.448 33.408 23.339 30.080 34.325 55.659 77.675 78.251 132.501 10.091 24.533 16.768 50.901 23.232 76.373l3.861 15.104c4.501 17.344 8.917 34.88 13.269 52.267 7.851-6.592 16.811-12.608 27.008-18.261 24.235-13.504 51.563-21.355 81.259-23.36 28.864-2.048 56.939 1.643 89.152 10.944 24.448 6.997 47.893 17.643 69.696 31.616 77.888 50.069 130.987 137.557 149.525 246.4 5.525 32.512 7.872 58.624 7.872 87.275-0.021 33.131-3.989 63.296-11.776 89.579zM838.997 519.787c-16.469-96.875-62.827-174.165-130.496-217.664-18.261-11.733-37.909-20.651-58.389-26.496-27.413-7.893-50.56-11.008-74.453-9.387-23.701 1.6-44.48 7.531-63.424 18.069-19.029 10.581-31.317 21.909-39.915 36.757-4.331 7.531-12.8 11.691-21.376 10.453-8.576-1.195-15.595-7.445-17.749-15.851l-9.6-38.037c-4.501-17.899-9.024-36.011-13.675-53.867l-3.947-15.339c-6.357-25.152-12.352-48.896-21.312-70.613-19.115-46.464-40.299-83.584-64.555-113.195-1.429 24.427-0.021 51.371 1.344 77.632l0.96 19.115c1.941 41.643 10.603 77.824 19.008 112.789l1.92 8.021c8.512 35.755 16.853 71.189 25.216 106.645 8.96 38.037 17.92 76.139 27.115 114.731l1.024 3.563c2.283 7.68 4.885 16.405 1.387 25.173-8.085 20.864-12.373 37.483-14.293 55.637-2.261 21.397-0.768 42.283 4.501 62.080 9.323 35.179 29.504 60.437 55.403 69.312 6.080 2.091 12.651 3.136 19.499 3.136 9.813 0 19.541-2.261 26.048-6.080 11.072-6.507 18.155-16.768 21.717-31.403 3.477-14.208 2.453-33.813-3.008-58.304-5.781-25.899-12.651-47.808-19.904-71.019-4.715-14.976-9.451-30.208-14.059-46.869l-0.789-2.901c-5.931-21.504-12.672-45.867-6.272-72.768 5.803-24.448 18.645-43.477 39.211-58.219 19.136-13.76 41.045-20.437 66.987-20.437l5.461 0.107c42.496 1.429 80.469 23.168 112.811 64.533 35.179 44.971 57.237 105.259 65.493 179.115 3.328 29.76 4.139 53.973 2.624 76.203-3.371 48.811-18.773 90.517-45.781 123.947-25.472 31.552-60.629 55.168-101.717 68.373-41.899 13.483-99.157 17.109-146.816 9.088-86.635-14.656-153.877-62.315-194.496-137.856-22.272-41.408-33.109-84.821-33.109-132.672 0-39.403 9.536-73.6 28.352-101.696 2.603-3.925 5.739-7.552 8.96-11.243 2.773-3.136 5.397-6.144 6.72-8.363 0.789-3.115-2.176-12.715-3.755-17.877-0.917-2.965-1.792-5.803-2.496-8.469-0.789-3.093-1.493-6.4-2.176-9.728-0.576-2.752-1.408-6.741-2.283-9.685-4.48 2.069-10.88 5.717-14.528 8.427-33.899 25.344-46.336 41.643-63.381 83.051-12.821 31.104-19.136 92.715-12.821 124.373 7.125 35.605 22.272 80.917 34.496 103.147 27.392 49.792 67.157 90.112 118.251 119.829 40.427 23.552 84.523 38.507 134.848 45.717 18.133 2.603 37.035 3.627 56.469 4.501 64.277 2.901 117.099-13.568 148.224-27.264 39.552-17.408 72.811-41.003 101.717-72.107 29.077-31.317 49.365-67.435 62.059-110.443 6.635-22.4 10.005-48.469 10.005-77.547 0.043-26.133-2.155-50.112-7.253-80.128z" />
20
+ <glyph unicode="&#xe90a;" glyph-name="icon-skype" d="M942.699 369.941c6.699 37.888 32.192 230.229-111.232 371.264-10.901 12.672-118.507 131.733-316.651 131.733-22.315 0-45.184-1.557-68.139-4.651-18.176 9.557-69.653 33.216-133.995 33.216-69.376 0-131.008-26.773-183.445-79.829-1.216-1.28-118.997-127.061-39.893-289.152-5.931-27.243-19.669-116.011 21.675-224.149 2.261-8.149 57.984-200.341 268.309-263.019 2.859-1.109 70.912-26.667 164.864-26.667 14.613 0 29.227 0.619 43.541 1.877 16.192-7.296 63.467-26.069 121.621-26.069 69.525 0 131.563 27.392 178.859 78.613 4.885 4.885 117.845 120.576 54.485 296.832zM857.451 102.656c-40.171-43.456-89.984-65.493-148.096-65.493-59.947 0-107.584 23.915-108.011 24.149-3.029 1.557-6.4 2.368-9.771 2.368-0.704 0-1.408-0.043-2.133-0.107-14.784-1.472-30.016-2.219-45.248-2.219-85.653 0-149.013 23.616-151.125 24.384-188.715 56.277-240.448 232.341-241.536 235.968-44.096 115.605-19.328 206.677-19.093 207.509 1.515 5.269 0.939 10.923-1.6 15.765-71.893 137.963 25.109 242.816 28.992 246.933 43.904 44.395 95.317 66.923 152.853 66.923 66.56 0 118.4-30.613 118.869-30.891 4.224-2.581 9.323-3.584 14.144-2.859 23.317 3.435 46.571 5.184 69.12 5.184 184.064 0 283.648-116.096 284.608-117.227 0.469-0.555 0.981-1.109 1.472-1.621 140.053-137.024 99.285-336.768 98.859-338.795-0.853-4.011-0.555-8.213 0.896-12.032 57.963-153.045-38.528-253.184-43.2-257.941zM625.579 514.773c-0.704 0.213-1.408 0.384-2.133 0.491-104.363 18.624-165.611 46.571-165.781 46.571-13.547 7.68-21.355 15.829-22.016 22.955-0.704 7.616 6.421 16.811 10.923 21.163 26.133 13.248 50.624 19.968 72.789 19.968 48.491 0 71.296-32.235 72.277-33.6 31.723-46.933 64.32-70.72 96.811-70.72 21.781 0 34.773 10.944 36.779 12.8 21.419 18.795 32.747 41.771 32.811 66.453 0.085 47.339-39.979 84.053-44.096 87.701-48.085 44.843-112.107 67.584-190.229 67.584-72.875 0-131.157-20.309-133.312-21.056-125.44-42.155-135.765-150.293-123.733-201.579 0.192-0.811 0.448-1.6 0.704-2.368 46.293-128.107 240.448-144.683 248.683-145.344 88.832-7.019 92.971-48.448 93.12-50.837 3.093-43.243-74.432-56.576-86.443-58.389-77.525 4.373-96.171 34.005-96.213 34.005 0 0 0 0 0-0.021-0.619 1.28-1.344 2.453-2.197 3.563-42.581 56.341-59.2 75.883-96.448 76.843l-2.88 0.043c-29.845 0-47.509-12.587-57.045-23.147-24.256-26.837-21.077-65.664-20.651-69.995 0.107-0.939 0.277-1.877 0.469-2.816 34.475-144.299 218.56-148.459 239.467-148.459h0.491c11.221-0.661 22.037-0.981 32.427-0.981 245.867 0 262.72 179.627 262.805 181.035 10.731 110.059-98.24 171.2-157.376 188.139zM740.544 330.411c-0.533-6.059-17.579-155.2-250.901-141.248-0.448 0.043-1.941 0.043-2.347 0.043-17.344 0-169.536 3.221-197.547 114.048-0.213 4.907-0.341 24.597 9.899 35.968 5.547 6.123 14.72 9.387 27.157 9.067 15.424-0.405 22.101-5.184 62.656-58.773 6.635-11.157 36.8-50.837 133.099-55.659 1.195-0.064 2.325-0.021 3.477 0.107 49.045 5.589 130.731 33.771 125.781 102.869-0.064 3.307-2.816 81.259-132.416 91.499-1.728 0.149-173.461 14.677-211.435 116.053-2.56 12.373-19.157 111.552 96.341 150.357 0.533 0.192 53.781 18.731 119.424 18.731 66.987 0 121.195-18.901 161.493-56.448 8.427-7.552 30.272-32.363 30.165-56.213-0.085-12.373-6.037-23.595-18.027-34.133-0.128-0.085-3.264-2.411-8.896-2.411-7.915 0-29.76 5.056-61.376 51.819-1.408 2.155-35.669 52.523-107.712 52.523-29.76 0-61.632-8.725-94.763-25.963-1.301-0.683-2.496-1.472-3.627-2.389-3.136-2.56-30.613-25.984-27.84-58.944 1.877-22.229 16.512-41.259 44.971-57.344 2.667-1.259 66.091-30.613 176.619-50.475 13.269-4.032 135.381-44.011 125.803-143.083z" />
21
+ <glyph unicode="&#xe90b;" glyph-name="icon-twitter" d="M973.397 743.083c-7.552 5.163-17.515 4.971-24.832-0.491-5.056-3.776-12.587-7.125-21.376-10.069 28.949 35.925 29.376 59.925 28.949 65.813-0.576 7.68-5.248 14.485-12.224 17.749-6.976 3.285-15.168 2.56-21.461-1.963-39.467-28.267-78.955-34.389-101.973-35.2-37.504 34.859-86.016 53.952-137.536 53.952-111.509 0-202.24-90.709-202.24-202.219 0-8.064 0.491-16.107 1.429-24.085-186.112 4.608-337.024 180.011-338.539 181.824-4.48 5.269-11.179 8.085-18.133 7.445-6.891-0.576-13.056-4.501-16.555-10.453-47.36-80.981-28.032-157.696 4.437-211.328-6.037 3.243-13.333 3.456-19.584 0.341-7.147-3.541-11.712-10.795-11.861-18.752-1.387-85.056 37.461-136.064 76.672-165.76-2.88-1.173-5.504-2.987-7.68-5.355-5.099-5.589-6.869-13.483-4.629-20.715 27.243-87.851 91.243-120.789 136.149-133.141-51.477-36.288-115.2-44.821-163.605-44.821-30.891 0-52.203 3.669-52.416 3.712-9.643 1.707-19.349-3.456-23.275-12.523-3.904-9.045-1.152-19.627 6.741-25.536 97.152-73.024 214.421-88.384 295.744-88.384 64.256 0 108.907 9.387 111.168 9.877 417.323 97.472 433.195 471.659 432.512 539.819 78.229 71.893 90.688 99.947 92.651 106.944 2.411 8.768-1.003 18.155-8.533 23.317zM853.333 637.781c-4.843-4.373-7.403-10.731-6.955-17.28 0.277-4.053 23.083-407.317-398.955-505.877-0.427-0.085-42.453-8.853-101.867-8.853-55.381 0-128.704 7.595-198.635 38.293 64.021 4.096 142.571 23.744 199.061 86.229 5.653 6.272 7.040 15.275 3.605 22.976-3.435 7.68-11.115 12.672-19.563 12.672-3.968 0-87.936 1.024-129.963 79.061 19.456-0.619 37.077 2.261 50.176 8.235 8.405 3.819 13.333 12.565 12.352 21.717-0.981 9.173-7.765 16.64-16.768 18.581-4.544 0.981-101.205 22.976-118.635 124.928 15.147-5.781 33.579-9.792 51.413-7.168 8.277 1.237 15.083 7.189 17.365 15.253 2.304 8.043-0.299 16.704-6.677 22.123-4.267 3.627-96.448 83.733-56.427 188.565 53.696-54.528 199.808-182.805 376-172.885 6.357 0.363 12.224 3.563 16 8.704s5.035 11.712 3.456 17.877c-3.307 12.928-4.971 26.283-4.971 39.723 0 87.979 71.595 159.552 159.573 159.552 43.115 0 83.499-16.939 113.749-47.659 3.925-3.989 9.259-6.272 14.848-6.379l3.285-0.021c15.68 0 40.256 1.899 68.437 10.987-9.024-9.536-20.757-20.288-35.989-32.043-7.467-5.781-10.24-15.765-6.848-24.576 3.413-8.789 12.267-14.336 21.589-13.589 3.456 0.299 18.645 1.6 37.44 4.971-11.797-12.117-26.88-26.688-46.101-44.117z" />
22
+ <glyph unicode="&#xe90c;" glyph-name="icon-vimeo" d="M924.011 765.44c-41.131 61.333-114.411 63.872-117.504 63.957l-7.467 0.107c-200.555 0-249.429-210.581-249.92-212.715-1.621-7.339 0.747-14.997 6.251-20.16 5.504-5.141 13.248-7.019 20.501-4.928 43.2 12.459 73.792 11.435 84.8-2.624 8.448-10.795 6.699-29.248 5.12-36.629-64.299-162.603-104.256-182.016-111.573-184.256-22.037 15.275-55.36 143.381-72.299 279.36-19.563 140.715-80.427 170.24-128 170.24-31.147 0-55.915-13.184-62.272-16.917-80.341-37.205-206.507-169.003-211.861-174.635-7.509-7.851-7.893-20.096-0.917-28.416l40.171-47.915c3.925-4.693 9.707-7.488 15.829-7.616 5.803-0.299 12.011 2.325 16.171 6.827 27.328 29.525 43.179 32.704 48.725 32.704 8.149 0 12.16-7.061 13.013-8.704 46.528-93.525 78.315-227.904 78.656-229.397 60.544-250.219 142.336-277.227 174.699-277.227 3.861 0 6.229 0.427 6.187 0.448 231.829 29.696 437.099 439.488 446.549 458.773 39.872 104.683 41.621 185.323 5.141 239.723zM879.787 542.763c-2.027-4.053-203.733-407.040-413.376-433.6l-0.299-21.333v21.333c-3.029 0-74.709 2.795-133.184 244.437-1.344 5.696-33.216 140.501-81.664 237.867-5.611 12.245-22.763 33.024-51.52 33.024-19.925 0-40.64-9.664-62.891-29.483l-12.907 15.403c34.432 34.688 127.68 125.44 186.432 152.128 0.853 0.405 1.664 0.832 2.453 1.344 0.171 0.107 18.688 11.243 41.045 11.243 55.531 0 77.291-72.555 85.717-133.163 10.816-87.019 42.24-291.392 100.48-314.347 2.624-1.109 6.976-2.368 12.864-2.368 45.867 0 97.365 71.637 153.088 212.971 0.341 0.789 0.576 1.6 0.811 2.411 1.173 4.48 10.731 44.544-12.331 74.389-18.112 23.467-48.811 32.469-92.587 26.069 21.035 51.904 75.883 145.749 197.099 145.749l6.357-0.085c0.533-0.021 54.208-1.877 83.179-45.056 27.947-41.664 24.619-111.061-8.768-198.933z" />
23
+ <glyph unicode="&#xe90d;" glyph-name="icon-zerply" d="M871.915 200.555c-1.728 6.805-6.677 12.352-13.291 14.763-6.592 2.411-13.909 1.472-19.712-2.581-28.096-19.861-57.344-29.525-89.387-29.525-60.715 0-123.264 33.963-189.525 69.867-52.544 28.523-106.539 57.792-162.133 70.485 45.525 49.707 94.123 100.843 141.419 150.571 56.789 59.691 115.499 121.429 170.411 182.336 8.021 8.875 16.448 17.664 24.917 26.475 49.344 51.413 105.259 109.717 93.291 203.285-0.704 5.781-3.797 11.029-8.469 14.485s-10.581 4.821-16.341 3.84c-44.693-7.787-134.251-20.885-232.277-20.885-88.747 0-160.213 11.264-206.677 32.555-8.277 3.861-18.027 1.941-24.299-4.608-40.619-42.347-85.44-97.664-71.253-150.037 17.045-62.869 129.301-57.813 224.619-55.36 2.752 0.085 5.419 0.149 8.128 0.213-66.795-86.955-146.411-181.184-237.099-280.64-8.512-9.344-17.429-18.368-26.325-27.435-50.645-51.435-108.011-109.781-88.363-220.075 2.005-11.264 12.416-18.923 23.936-17.365 99.968 13.909 194.432-6.4 279.851-60.053 17.92-11.264 35.264-23.936 53.675-37.312 42.816-31.211 87.104-63.488 140.075-78.251 17.877-4.992 36.096-7.531 54.165-7.531 56.832 0 108.501 24.469 141.717 67.136 33.259 42.688 43.541 97.963 28.949 155.648zM809.344 71.125c-33.259-42.688-93.077-60.779-150.741-44.757-45.547 12.715-86.677 42.667-126.443 71.637-18.155 13.205-36.885 26.901-56.064 38.933-74.88 47.040-156.203 70.891-241.792 70.891-14.912 0-30.101-0.725-45.355-2.197-6.443 75.541 33.6 116.224 79.403 162.795 9.301 9.429 18.581 18.88 27.456 28.629 103.872 113.899 193.408 221.12 266.133 318.677 4.843 6.485 5.589 15.104 1.963 22.315-3.605 7.211-10.987 11.776-19.072 11.776-16.149 0-34.069-0.469-52.672-0.939-19.776-0.533-40.405-1.067-60.565-1.067-100.075 0-119.296 15.616-121.792 24.917-5.952 21.973 11.157 55.147 50.88 98.667 51.755-20.181 122.325-30.421 210.176-30.421 86.123 0 165.781 9.771 216 17.6-1.173-60.843-41.045-102.4-83.008-146.133-8.789-9.152-17.493-18.219-25.792-27.435-54.571-60.48-113.067-122.027-169.664-181.525-56.875-59.84-115.712-121.664-168.96-180.928-5.483-6.059-6.976-14.741-3.883-22.336 3.093-7.552 10.24-12.715 18.411-13.205 60.821-3.733 124.288-38.144 185.707-71.467 68.011-36.885 138.304-75.051 209.856-75.051 30.421 0 58.731 6.677 85.781 20.288 2.347-33.557-6.528-64.683-25.963-89.664z" />
24
+ <glyph unicode="&#xe90e;" glyph-name="quote" d="M861.576 486.852h-155.377c0 128.663 104.358 233.020 233.050 233.020 42.918 0 77.673 34.786 77.673 77.704 0 42.857-34.756 77.673-77.673 77.673-214.528 0-388.397-173.899-388.397-388.397v-310.724c0-85.835 69.572-155.347 155.347-155.347h155.377c85.805 0 155.347 69.542 155.347 155.347v155.347c0.030 85.805-69.542 155.377-155.347 155.377zM395.475 719.872c42.918 0 77.704 34.786 77.704 77.704 0 42.857-34.786 77.673-77.704 77.673-214.498 0-388.397-173.899-388.397-388.397v-310.724c0-85.835 69.572-155.347 155.377-155.347h155.347c85.805 0 155.377 69.542 155.377 155.347v155.347c0 85.835-69.602 155.377-155.377 155.377h-155.347c0 128.663 104.297 233.020 233.020 233.020z" />
25
+ <glyph unicode="&#xe90f;" glyph-name="video-play" d="M511 960c-267.568 0-487.158-205.256-510-466.896v-90.208c22.842-261.64 242.432-466.896 510-466.896 282.77 0 512 229.23 512 512s-229.23 512-512 512zM513-20c-259.574 0-470 210.426-470 470s210.426 469 470 469 470-209.426 470-469-210.426-470-470-470zM372 688.5c0 0-30 10.5-29-14.5-1-25 0.5-421 0-452 0-27 7.2-29.4 29-14 29 16 398.6 231 398.6 231l-1.2 19.8-397.4 229.7zM704 447l-319-184.5v370.5l319-183.5v-2.5z" />
26
+ </font></defs></svg>
assets/css/fonts/icomoon/icomoon.ttf ADDED
Binary file
assets/css/fonts/icomoon/icomoon.woff ADDED
Binary file
assets/css/icomoon.css ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @font-face {
2
+ font-family: 'lsow-icomoon';
3
+ src: url('fonts/icomoon/icomoon.eot?bh4obs');
4
+ src: url('fonts/icomoon/icomoon.eot?bh4obs#iefix') format('embedded-opentype'),
5
+ url('fonts/icomoon/icomoon.ttf?bh4obs') format('truetype'),
6
+ url('fonts/icomoon/icomoon.woff?bh4obs') format('woff'),
7
+ url('fonts/icomoon/icomoon.svg?bh4obs#icomoon') format('svg');
8
+ font-weight: normal;
9
+ font-style: normal;
10
+ }
11
+
12
+ [class^="lsow-icon-"], [class*=" lsow-icon-"] {
13
+ /* use !important to prevent issues with browser extensions that change fonts */
14
+ font-family: 'lsow-icomoon' !important;
15
+ speak: none;
16
+ font-style: normal;
17
+ font-weight: normal;
18
+ font-variant: normal;
19
+ text-transform: none;
20
+ line-height: 1;
21
+
22
+ /* Better Font Rendering =========== */
23
+ -webkit-font-smoothing: antialiased;
24
+ -moz-osx-font-smoothing: grayscale;
25
+ }
26
+
27
+ .lsow-icon-arrow-left:before {
28
+ content: "\e900";
29
+ }
30
+ .lsow-icon-arrow-right:before {
31
+ content: "\e901";
32
+ }
33
+ .lsow-icon-aim:before {
34
+ content: "\e902";
35
+ }
36
+ .lsow-icon-behance:before {
37
+ content: "\e903";
38
+ }
39
+ .lsow-icon-dribbble:before {
40
+ content: "\e904";
41
+ }
42
+ .lsow-icon-facebook:before {
43
+ content: "\e905";
44
+ }
45
+ .lsow-icon-flickr:before {
46
+ content: "\e906";
47
+ }
48
+ .lsow-icon-googleplus:before {
49
+ content: "\e907";
50
+ }
51
+ .lsow-icon-linkedin:before {
52
+ content: "\e908";
53
+ }
54
+ .lsow-icon-pinterest:before {
55
+ content: "\e909";
56
+ }
57
+ .lsow-icon-skype:before {
58
+ content: "\e90a";
59
+ }
60
+ .lsow-icon-twitter:before {
61
+ content: "\e90b";
62
+ }
63
+ .lsow-icon-vimeo:before {
64
+ content: "\e90c";
65
+ }
66
+ .lsow-icon-zerply:before {
67
+ content: "\e90d";
68
+ }
69
+ .lsow-icon-quote:before {
70
+ content: "\e90e";
71
+ }
72
+ .lsow-icon-video-play:before {
73
+ content: "\e90f";
74
+ }
75
+
assets/css/lsow-admin.css ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ .center {
2
+ text-align: center; }
3
+
4
+ /*# sourceMappingURL=lsow-admin.css.map */
assets/css/lsow-admin.css.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "mappings": "AAAA,OAAQ;EACN,UAAU,EAAE,MAAM",
4
+ "sources": ["lsow-admin.scss"],
5
+ "names": [],
6
+ "file": "lsow-admin.css"
7
+ }
assets/css/lsow-admin.scss ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .center {
2
+ text-align: center;
3
+ }
assets/css/lsow-frontend.css ADDED
@@ -0,0 +1,421 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ box-sizing: border-box; }
3
+
4
+ *, *::after, *::before {
5
+ box-sizing: inherit; }
6
+
7
+ html {
8
+ box-sizing: border-box; }
9
+
10
+ *, *::after, *::before {
11
+ box-sizing: inherit; }
12
+
13
+ /* --------------- Reset styles --------- */
14
+ .panel-grid .widget {
15
+ overflow: initial; }
16
+
17
+ .lsow-container ol, .lsow-container ul, .lsow-container ol li, .lsow-container ul li, .lsow-container ol:hover, .lsow-container ul:hover, .lsow-container ul li:hover, .lsow-container ol li:hover, .lsow-container ol li a, .lsow-container ul li a, .lsow-container ol li a:hover, .lsow-container ul li a:hover, .lsow-container img {
18
+ padding: 0;
19
+ margin: 0;
20
+ border: none;
21
+ box-shadow: none;
22
+ list-style: none;
23
+ background: none; }
24
+ .lsow-container ol:before, .lsow-container ol:after, .lsow-container ul:before, .lsow-container ul:after, .lsow-container ol li:before, .lsow-container ol li:after, .lsow-container ul li:before, .lsow-container ul li:after, .lsow-container ol:hover:before, .lsow-container ol:hover:after, .lsow-container ul:hover:before, .lsow-container ul:hover:after, .lsow-container ul li:hover:before, .lsow-container ul li:hover:after, .lsow-container ol li:hover:before, .lsow-container ol li:hover:after, .lsow-container ol li a:before, .lsow-container ol li a:after, .lsow-container ul li a:before, .lsow-container ul li a:after, .lsow-container ol li a:hover:before, .lsow-container ol li a:hover:after, .lsow-container ul li a:hover:before, .lsow-container ul li a:hover:after, .lsow-container img:before, .lsow-container img:after {
25
+ display: none; }
26
+ .lsow-container a {
27
+ text-decoration: initial; }
28
+ .lsow-container img {
29
+ max-width: 100%; }
30
+
31
+ /* ------- General styles ------------ */
32
+ .lsow-container {
33
+ margin-left: auto;
34
+ margin-right: auto; }
35
+
36
+ .panel-grid .widget {
37
+ border: 0; }
38
+
39
+ .lsow-center {
40
+ text-align: center; }
41
+
42
+ .lsow-lastcol {
43
+ margin-right: 0; }
44
+
45
+ .lsow-container .lsow-onecol, .lsow-container .lsow-twocol, .lsow-container .lsow-onefifthcol, .lsow-container .lsow-threecol, .lsow-container .lsow-fourcol, .lsow-container .lsow-fivecol, .lsow-container .lsow-sixcol, .lsow-container .lsow-sevencol, .lsow-container .lsow-eightcol, .lsow-container .lsow-ninecol, .lsow-container .lsow-tencol, .lsow-container .lsow-elevencol {
46
+ min-height: 1px;
47
+ /* Prevents columns from collapsing when housing absolute elements or when lazy loading content */ }
48
+ @media only screen and (min-width: 801px) {
49
+ .lsow-container .lsow-onecol {
50
+ float: left;
51
+ display: block;
52
+ margin-right: 3.44828%;
53
+ width: 5.17241%; }
54
+ .lsow-container .lsow-onecol:last-child {
55
+ margin-right: 0; }
56
+ .lsow-container .lsow-onecol:nth-child(12n) {
57
+ margin-right: 0; }
58
+ .lsow-container .lsow-onecol:nth-child(12n+1) {
59
+ clear: left; }
60
+ .lsow-container .lsow-twocol {
61
+ float: left;
62
+ display: block;
63
+ margin-right: 3.44828%;
64
+ width: 13.7931%; }
65
+ .lsow-container .lsow-twocol:last-child {
66
+ margin-right: 0; }
67
+ .lsow-container .lsow-twocol:nth-child(6n) {
68
+ margin-right: 0; }
69
+ .lsow-container .lsow-twocol:nth-child(6n+1) {
70
+ clear: left; }
71
+ .lsow-container .lsow-threecol {
72
+ float: left;
73
+ display: block;
74
+ margin-right: 3.44828%;
75
+ width: 22.41379%; }
76
+ .lsow-container .lsow-threecol:last-child {
77
+ margin-right: 0; }
78
+ .lsow-container .lsow-threecol:nth-child(4n) {
79
+ margin-right: 0; }
80
+ .lsow-container .lsow-threecol:nth-child(4n+1) {
81
+ clear: left; }
82
+ .lsow-container .lsow-fourcol {
83
+ float: left;
84
+ display: block;
85
+ margin-right: 3.44828%;
86
+ width: 31.03448%; }
87
+ .lsow-container .lsow-fourcol:last-child {
88
+ margin-right: 0; }
89
+ .lsow-container .lsow-fourcol:nth-child(3n) {
90
+ margin-right: 0; }
91
+ .lsow-container .lsow-fourcol:nth-child(3n+1) {
92
+ clear: left; }
93
+ .lsow-container .lsow-fivecol {
94
+ float: left;
95
+ display: block;
96
+ margin-right: 3.44828%;
97
+ width: 39.65517%; }
98
+ .lsow-container .lsow-fivecol:last-child {
99
+ margin-right: 0; }
100
+ .lsow-container .lsow-sixcol {
101
+ float: left;
102
+ display: block;
103
+ margin-right: 3.44828%;
104
+ width: 48.27586%; }
105
+ .lsow-container .lsow-sixcol:last-child {
106
+ margin-right: 0; }
107
+ .lsow-container .lsow-sixcol:nth-child(2n) {
108
+ margin-right: 0; }
109
+ .lsow-container .lsow-sixcol:nth-child(2n+1) {
110
+ clear: left; }
111
+ .lsow-container .lsow-sevencol {
112
+ float: left;
113
+ display: block;
114
+ margin-right: 3.44828%;
115
+ width: 56.89655%; }
116
+ .lsow-container .lsow-sevencol:last-child {
117
+ margin-right: 0; }
118
+ .lsow-container .lsow-eightcol {
119
+ float: left;
120
+ display: block;
121
+ margin-right: 3.44828%;
122
+ width: 65.51724%; }
123
+ .lsow-container .lsow-eightcol:last-child {
124
+ margin-right: 0; }
125
+ .lsow-container .lsow-ninecol {
126
+ float: left;
127
+ display: block;
128
+ margin-right: 3.44828%;
129
+ width: 74.13793%; }
130
+ .lsow-container .lsow-ninecol:last-child {
131
+ margin-right: 0; }
132
+ .lsow-container .lsow-tencol {
133
+ float: left;
134
+ display: block;
135
+ margin-right: 3.44828%;
136
+ width: 82.75862%; }
137
+ .lsow-container .lsow-tencol:last-child {
138
+ margin-right: 0; }
139
+ .lsow-container .lsow-elevencol {
140
+ float: left;
141
+ display: block;
142
+ margin-right: 3.44828%;
143
+ width: 91.37931%; }
144
+ .lsow-container .lsow-elevencol:last-child {
145
+ margin-right: 0; } }
146
+ .lsow-container .lsow-twelvecol, .lsow-container .lsow-fullwidth {
147
+ float: left;
148
+ display: block;
149
+ width: 100%; }
150
+
151
+ /*--------- Support for 5 column grid ----*/
152
+ @media only screen and (min-width: 801px) {
153
+ .lsow-container .lsow-onefifthcol {
154
+ float: left;
155
+ display: block;
156
+ margin-right: 2.73973%;
157
+ width: 17.80822%; }
158
+ .lsow-container .lsow-onefifthcol:last-child {
159
+ margin-right: 0; }
160
+ .lsow-container .lsow-onefifthcol:nth-child(5n) {
161
+ margin-right: 0; }
162
+ .lsow-container .lsow-onefifthcol:nth-child(5n+1) {
163
+ clear: left; } }
164
+
165
+ /* Tablet and Mobile responsiveness */
166
+ @media only screen and (min-width: 480px) and (max-width: 800px) {
167
+ .lsow-container .lsow-onecol, .lsow-container .lsow-twocol, .lsow-container .lsow-onefifthcol, .lsow-container .lsow-threecol, .lsow-container .lsow-fourcol, .lsow-container .lsow-fivecol, .lsow-container .lsow-sixcol, .lsow-container .lsow-sevencol, .lsow-container .lsow-eightcol, .lsow-container .lsow-ninecol, .lsow-container .lsow-tencol, .lsow-container .lsow-elevencol {
168
+ float: left;
169
+ display: block;
170
+ margin-right: 3.44828%;
171
+ width: 48.27586%; }
172
+ .lsow-container .lsow-onecol:last-child, .lsow-container .lsow-twocol:last-child, .lsow-container .lsow-onefifthcol:last-child, .lsow-container .lsow-threecol:last-child, .lsow-container .lsow-fourcol:last-child, .lsow-container .lsow-fivecol:last-child, .lsow-container .lsow-sixcol:last-child, .lsow-container .lsow-sevencol:last-child, .lsow-container .lsow-eightcol:last-child, .lsow-container .lsow-ninecol:last-child, .lsow-container .lsow-tencol:last-child, .lsow-container .lsow-elevencol:last-child {
173
+ margin-right: 0; }
174
+ .lsow-container .lsow-onecol:nth-child(2n), .lsow-container .lsow-twocol:nth-child(2n), .lsow-container .lsow-onefifthcol:nth-child(2n), .lsow-container .lsow-threecol:nth-child(2n), .lsow-container .lsow-fourcol:nth-child(2n), .lsow-container .lsow-fivecol:nth-child(2n), .lsow-container .lsow-sixcol:nth-child(2n), .lsow-container .lsow-sevencol:nth-child(2n), .lsow-container .lsow-eightcol:nth-child(2n), .lsow-container .lsow-ninecol:nth-child(2n), .lsow-container .lsow-tencol:nth-child(2n), .lsow-container .lsow-elevencol:nth-child(2n) {
175
+ margin-right: 0; }
176
+ .lsow-container .lsow-onecol:nth-child(2n+1), .lsow-container .lsow-twocol:nth-child(2n+1), .lsow-container .lsow-onefifthcol:nth-child(2n+1), .lsow-container .lsow-threecol:nth-child(2n+1), .lsow-container .lsow-fourcol:nth-child(2n+1), .lsow-container .lsow-fivecol:nth-child(2n+1), .lsow-container .lsow-sixcol:nth-child(2n+1), .lsow-container .lsow-sevencol:nth-child(2n+1), .lsow-container .lsow-eightcol:nth-child(2n+1), .lsow-container .lsow-ninecol:nth-child(2n+1), .lsow-container .lsow-tencol:nth-child(2n+1), .lsow-container .lsow-elevencol:nth-child(2n+1) {
177
+ clear: left; } }
178
+ @media only screen and (max-width: 479px) {
179
+ .lsow-container .lsow-onecol, .lsow-container .lsow-twocol, .lsow-container .lsow-onefifthcol, .lsow-container .lsow-threecol, .lsow-container .lsow-fourcol, .lsow-container .lsow-fivecol, .lsow-container .lsow-sixcol, .lsow-container .lsow-sevencol, .lsow-container .lsow-eightcol, .lsow-container .lsow-ninecol, .lsow-container .lsow-tencol, .lsow-container .lsow-elevencol {
180
+ width: 100%;
181
+ margin-right: 0; } }
182
+
183
+ /*-------- Remove margins on last column -----*/
184
+ .lsow-container .lsow-lastcol {
185
+ margin-right: 0; }
186
+
187
+ /*--------- No margin columns ----*/
188
+ .lsow-container .lsow-zero-margin, #content .lsow-zero-margin {
189
+ margin-right: 0; }
190
+
191
+ .lsow-container .lsow-onecol.lsow-zero-margin, .lsow-container .lsow-twocol.lsow-zero-margin, .lsow-container .lsow-onefifthcol.lsow-zero-margin, .lsow-container .lsow-threecol.lsow-zero-margin, .lsow-container .lsow-fourcol.lsow-zero-margin, .lsow-container .lsow-fivecol.lsow-zero-margin, .lsow-container .lsow-sixcol.lsow-zero-margin, .lsow-container .lsow-sevencol.lsow-zero-margin, .lsow-container .lsow-eightcol.lsow-zero-margin, .lsow-container .lsow-ninecol.lsow-zero-margin, .lsow-container .lsow-tencol.lsow-zero-margin, .lsow-container .lsow-elevencol.lsow-zero-margin {
192
+ margin-right: 0; }
193
+ @media only screen and (min-width: 768px) {
194
+ .lsow-container .lsow-onecol.lsow-zero-margin {
195
+ width: 8.33333%; }
196
+ .lsow-container .lsow-twocol.lsow-zero-margin {
197
+ width: 16.66667%; }
198
+ .lsow-container .lsow-onefifthcol.lsow-zero-margin {
199
+ width: 20%; }
200
+ .lsow-container .lsow-threecol.lsow-zero-margin {
201
+ width: 25%; }
202
+ .lsow-container .lsow-fourcol.lsow-zero-margin {
203
+ width: 33.33333%; }
204
+ .lsow-container .lsow-fivecol.lsow-zero-margin {
205
+ width: 41.66667%; }
206
+ .lsow-container .lsow-sixcol.lsow-zero-margin {
207
+ width: 50%; }
208
+ .lsow-container .lsow-sevencol.lsow-zero-margin {
209
+ width: 58.33333%; }
210
+ .lsow-container .lsow-eightcol.lsow-zero-margin {
211
+ width: 66.66667%; }
212
+ .lsow-container .lsow-ninecol.lsow-zero-margin {
213
+ width: 75%; }
214
+ .lsow-container .lsow-tencol.lsow-zero-margin {
215
+ width: 83.33333%; }
216
+ .lsow-container .lsow-elevencol.lsow-zero-margin {
217
+ width: 91.66667%; } }
218
+ @media only screen and (min-width: 480px) and (max-width: 767px) {
219
+ .lsow-container .lsow-onecol.lsow-zero-margin, .lsow-container .lsow-twocol.lsow-zero-margin, .lsow-container .lsow-onefifthcol.lsow-zero-margin, .lsow-container .lsow-threecol.lsow-zero-margin, .lsow-container .lsow-fourcol.lsow-zero-margin, .lsow-container .lsow-fivecol.lsow-zero-margin, .lsow-container .lsow-sixcol.lsow-zero-margin, .lsow-container .lsow-sevencol.lsow-zero-margin, .lsow-container .lsow-eightcol.lsow-zero-margin, .lsow-container .lsow-ninecol.lsow-zero-margin, .lsow-container .lsow-tencol.lsow-zero-margin, .lsow-container .lsow-elevencol.lsow-zero-margin {
220
+ width: 50%; } }
221
+ @media only screen and (max-width: 479px) {
222
+ .lsow-container .lsow-onecol.lsow-zero-margin, .lsow-container .lsow-twocol.lsow-zero-margin, .lsow-container .lsow-onefifthcol.lsow-zero-margin, .lsow-container .lsow-threecol.lsow-zero-margin, .lsow-container .lsow-fourcol.lsow-zero-margin, .lsow-container .lsow-fivecol.lsow-zero-margin, .lsow-container .lsow-sixcol.lsow-zero-margin, .lsow-container .lsow-sevencol.lsow-zero-margin, .lsow-container .lsow-eightcol.lsow-zero-margin, .lsow-container .lsow-ninecol.lsow-zero-margin, .lsow-container .lsow-tencol.lsow-zero-margin, .lsow-container .lsow-elevencol.lsow-zero-margin {
223
+ width: 100%; } }
224
+
225
+ /* --------------- Flexslider Styles -------------- */
226
+ .lsow-container .lsow-flex-direction-nav li {
227
+ position: initial; }
228
+ .lsow-container .lsow-flex-direction-nav a, .lsow-container .lsow-flex-direction-nav a:hover {
229
+ opacity: 1;
230
+ text-shadow: none;
231
+ background: none;
232
+ color: #888;
233
+ font-family: 'lsow-icomoon' !important;
234
+ speak: none;
235
+ font-style: normal;
236
+ font-weight: normal;
237
+ font-variant: normal;
238
+ text-transform: none;
239
+ line-height: 1;
240
+ -webkit-font-smoothing: antialiased;
241
+ -moz-osx-font-smoothing: grayscale;
242
+ font-size: 24px;
243
+ width: 28px;
244
+ height: 28px;
245
+ margin: -14px 0 0;
246
+ bottom: initial;
247
+ left: initial;
248
+ right: initial;
249
+ top: 50%;
250
+ text-indent: 0;
251
+ text-align: center;
252
+ color: #aaa;
253
+ -webkit-transition: all 0.3s ease-in-out 0s;
254
+ -moz-transition: all 0.3s ease-in-out 0s;
255
+ -ms-transition: all 0.3s ease-in-out 0s;
256
+ transition: all 0.3s ease-in-out 0s; }
257
+ .lsow-container .lsow-flex-direction-nav a:before, .lsow-container .lsow-flex-direction-nav a:hover:before, .lsow-container .lsow-flex-direction-nav a:hover:before, .lsow-container .lsow-flex-direction-nav a:hover:hover:before {
258
+ margin: 2px;
259
+ vertical-align: middle;
260
+ display: inline;
261
+ font-family: inherit !important;
262
+ opacity: 1; }
263
+ .lsow-container .lsow-flex-direction-nav a:hover, .lsow-container .lsow-flex-direction-nav a:hover:hover {
264
+ color: #888; }
265
+ .lsow-dark-bg .lsow-container .lsow-flex-direction-nav a, .lsow-dark-bg .lsow-container .lsow-flex-direction-nav a:hover {
266
+ color: #888; }
267
+ .lsow-dark-bg .lsow-container .lsow-flex-direction-nav a:hover, .lsow-dark-bg .lsow-container .lsow-flex-direction-nav a:hover:hover {
268
+ color: #aaa; }
269
+ @media only screen and (max-width: 960px) {
270
+ .lsow-container .lsow-flex-direction-nav a, .lsow-container .lsow-flex-direction-nav a:hover {
271
+ display: none;
272
+ /* Let users navigate via touch */ } }
273
+ .lsow-container .lsow-flex-direction-nav a.lsow-flex-prev {
274
+ left: -30px; }
275
+ .lsow-container .lsow-flex-direction-nav a.lsow-flex-prev:before {
276
+ content: "\e900"; }
277
+ .lsow-container .lsow-flex-direction-nav a.lsow-flex-next {
278
+ right: -30px; }
279
+ .lsow-container .lsow-flex-direction-nav a.lsow-flex-next:before {
280
+ content: "\e901"; }
281
+ .lsow-container .lsow-flex-control-nav {
282
+ width: 100%;
283
+ position: absolute;
284
+ bottom: -40px;
285
+ text-align: center; }
286
+ .lsow-container .lsow-flex-control-nav li, .lsow-container .lsow-flex-control-nav li:hover {
287
+ margin: 0 8px 0 0;
288
+ padding: 0;
289
+ border: none;
290
+ box-shadow: none; }
291
+ .lsow-container .lsow-flex-control-nav li a, .lsow-container .lsow-flex-control-nav li a:hover {
292
+ background: #aaa;
293
+ border: 1px solid #aaa;
294
+ border-radius: 50%;
295
+ width: 12px;
296
+ height: 12px;
297
+ box-shadow: none;
298
+ -webkit-transition: all 0.2s ease-in 0s;
299
+ -moz-transition: all 0.2s ease-in 0s;
300
+ -ms-transition: all 0.2s ease-in 0s;
301
+ transition: all 0.2s ease-in 0s;
302
+ display: inline-block;
303
+ vertical-align: middle; }
304
+ .lsow-dark-bg .lsow-container .lsow-flex-control-nav li a, .lsow-dark-bg .lsow-container .lsow-flex-control-nav li a:hover {
305
+ background: #ccc;
306
+ border-color: #ccc; }
307
+ .lsow-container .lsow-flex-control-nav li a.lsow-flex-active, .lsow-container .lsow-flex-control-nav li a:hover.lsow-flex-active, .lsow-container .lsow-flex-control-nav li a:hover {
308
+ background: none; }
309
+ .lsow-container .lsow-flex-control-nav li a.lsow-flex-active, .lsow-container .lsow-flex-control-nav li a:hover.lsow-flex-active {
310
+ width: 14px;
311
+ height: 14px; }
312
+
313
+ /* Sleek Carousel Styles */
314
+ .slick-loading .slick-list {
315
+ background: #fff url("./ajax-loader.gif") center center no-repeat; }
316
+
317
+ .lsow-container button.slick-prev, .lsow-container button.slick-next {
318
+ position: absolute;
319
+ opacity: 1;
320
+ text-shadow: none;
321
+ background: none !important;
322
+ border: none;
323
+ padding: 0;
324
+ color: #888;
325
+ font-family: 'lsow-icomoon' !important;
326
+ speak: none;
327
+ font-style: normal;
328
+ font-weight: normal;
329
+ font-variant: normal;
330
+ text-transform: none;
331
+ line-height: 1;
332
+ -webkit-font-smoothing: antialiased;
333
+ -moz-osx-font-smoothing: grayscale;
334
+ font-size: 24px;
335
+ width: 28px;
336
+ height: 28px;
337
+ margin: -14px 0 0;
338
+ bottom: initial;
339
+ left: initial;
340
+ right: initial;
341
+ top: 50%;
342
+ text-indent: 0;
343
+ text-align: center;
344
+ color: #aaa !important;
345
+ -webkit-transition: all 0.3s ease-in-out 0s;
346
+ -moz-transition: all 0.3s ease-in-out 0s;
347
+ -ms-transition: all 0.3s ease-in-out 0s;
348
+ transition: all 0.3s ease-in-out 0s;
349
+ overflow: hidden;
350
+ box-shadow: none; }
351
+ .lsow-container button.slick-prev:before, .lsow-container button.slick-next:before {
352
+ margin: 2px;
353
+ vertical-align: middle; }
354
+ .lsow-container button.slick-prev:hover, .lsow-container button.slick-next:hover {
355
+ color: #888 !important; }
356
+ .lsow-dark-bg .lsow-container button.slick-prev, .lsow-dark-bg .lsow-container button.slick-next {
357
+ color: #888 !important; }
358
+ .lsow-dark-bg .lsow-container button.slick-prev:hover, .lsow-dark-bg .lsow-container button.slick-next:hover {
359
+ color: #aaa !important;
360
+ background: none !important; }
361
+ @media only screen and (max-width: 1024px) {
362
+ .lsow-container button.slick-prev, .lsow-container button.slick-next {
363
+ display: none !important;
364
+ /* Let users navigate via touch */ } }
365
+ .lsow-container button.slick-prev {
366
+ left: -40px; }
367
+ .lsow-container button.slick-prev:before {
368
+ content: "\e900"; }
369
+ .lsow-container button.slick-next {
370
+ right: -40px; }
371
+ .lsow-container button.slick-next:before {
372
+ content: "\e901"; }
373
+ .lsow-container ul.slick-dots {
374
+ width: 100%;
375
+ position: absolute;
376
+ bottom: -40px;
377
+ text-align: center; }
378
+ .lsow-container ul.slick-dots li {
379
+ margin: 0 8px 0 0;
380
+ display: inline-block;
381
+ font-size: 0; }
382
+ .lsow-container ul.slick-dots li button {
383
+ padding: 0;
384
+ background: #aaa;
385
+ border: 1px solid #aaa;
386
+ border-radius: 50%;
387
+ width: 12px;
388
+ height: 12px;
389
+ box-shadow: none;
390
+ -webkit-transition: all 0.3s ease-in-out 0s;
391
+ -moz-transition: all 0.3s ease-in-out 0s;
392
+ -ms-transition: all 0.3s ease-in-out 0s;
393
+ transition: all 0.3s ease-in-out 0s;
394
+ font-size: 0; }
395
+ .lsow-dark-bg .lsow-container ul.slick-dots li button {
396
+ background: #888 !important;
397
+ border-color: #888 !important; }
398
+ .lsow-container ul.slick-dots li button:hover {
399
+ background: none !important;
400
+ border-color: #aaa !important; }
401
+
402
+ /* -------- Widget separator headline ------------ */
403
+ .lsow-widget-heading {
404
+ font-size: 18px;
405
+ line-height: 26px;
406
+ letter-spacing: 1px;
407
+ font-weight: bold;
408
+ color: #333;
409
+ text-transform: uppercase;
410
+ clear: none;
411
+ margin-top: 0;
412
+ margin-bottom: 10px;
413
+ font-size: 40px;
414
+ line-height: 52px;
415
+ text-align: center; }
416
+ @media only screen and (max-width: 767px) {
417
+ .lsow-widget-heading {
418
+ font-size: 32px;
419
+ line-height: 44px; } }
420
+
421
+ /*# sourceMappingURL=lsow-frontend.css.map */
assets/css/lsow-frontend.css.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "mappings": "AAGE,IAAK;EACH,UAAU,EAAE,UAAU;;AAItB,sBAEU;EACR,UAAU,EAAE,OAAO;;AARvB,IAAK;EACH,UAAU,EAAE,UAAU;;AAItB,sBAEU;EACR,UAAU,EAAE,OAAO;;;ACHzB,mBAAoB;EAClB,QAAQ,EAAE,OAAO;;AAIjB,uUAAwH;EACtH,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;EACT,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,IAAI;EAChB,UAAU,EAAE,IAAI;EAChB,UAAU,EAAE,IAAI;EAChB,yzBAAkB;IAChB,OAAO,EAAE,IAAI;AAGjB,iBAAE;EACA,eAAe,EAAE,OAAO;AAE1B,mBAAI;EACF,SAAS,EAAE,IAAI;;;AAMnB,eAAgB;EACd,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,IAAI;;AAGpB,mBAAoB;EAClB,MAAM,EAAE,CAAC;;AAGX,YAAa;EACX,UAAU,EAAE,MAAM;;AAGpB,aAAc;ECQR,YAAoB,EAAE,CAAC;;ADH3B,uXAAwL;EACtL,UAAU,EAAE,GAAG;;AEkBjB,yCAA8C;EFb5C,4BAAa;IGSb,KAAK,EAAE,IAAsB;IAG3B,OAAO,EAAE,KAAK;IAed,YAAoB,EAAE,QAA+B;IACrD,KAAK,EAAE,QAAuC;IAE9C,uCAAa;MACX,YAAoB,EAAE,CAAC;IFZ7B,2CAAuB;MACrB,YAAoB,EAAE,CAAC;IAIvB,6CAAyB;MACvB,KAAK,EARY,IAAkC;EDZrD,4BAAa;IGIb,KAAK,EAAE,IAAsB;IAG3B,OAAO,EAAE,KAAK;IAed,YAAoB,EAAE,QAA+B;IACrD,KAAK,EAAE,QAAuC;IAE9C,uCAAa;MACX,YAAoB,EAAE,CAAC;IFZ7B,0CAAuB;MACrB,YAAoB,EAAE,CAAC;IAIvB,4CAAyB;MACvB,KAAK,EARY,IAAkC;EDPrD,8BAAe;IGDf,KAAK,EAAE,IAAsB;IAG3B,OAAO,EAAE,KAAK;IAed,YAAoB,EAAE,QAA+B;IACrD,KAAK,EAAE,SAAuC;IAE9C,yCAAa;MACX,YAAoB,EAAE,CAAC;IFZ7B,4CAAuB;MACrB,YAAoB,EAAE,CAAC;IAIvB,8CAAyB;MACvB,KAAK,EARY,IAAkC;EDFrD,6BAAc;IGNd,KAAK,EAAE,IAAsB;IAG3B,OAAO,EAAE,KAAK;IAed,YAAoB,EAAE,QAA+B;IACrD,KAAK,EAAE,SAAuC;IAE9C,wCAAa;MACX,YAAoB,EAAE,CAAC;IFZ7B,2CAAuB;MACrB,YAAoB,EAAE,CAAC;IAIvB,6CAAyB;MACvB,KAAK,EARY,IAAkC;EDGrD,6BAAc;IGXd,KAAK,EAAE,IAAsB;IAG3B,OAAO,EAAE,KAAK;IAed,YAAoB,EAAE,QAA+B;IACrD,KAAK,EAAE,SAAuC;IAE9C,wCAAa;MACX,YAAoB,EAAE,CAAC;EHP3B,4BAAa;IGfb,KAAK,EAAE,IAAsB;IAG3B,OAAO,EAAE,KAAK;IAed,YAAoB,EAAE,QAA+B;IACrD,KAAK,EAAE,SAAuC;IAE9C,uCAAa;MACX,YAAoB,EAAE,CAAC;IFZ7B,0CAAuB;MACrB,YAAoB,EAAE,CAAC;IAIvB,4CAAyB;MACvB,KAAK,EARY,IAAkC;EDYrD,8BAAe;IGpBf,KAAK,EAAE,IAAsB;IAG3B,OAAO,EAAE,KAAK;IAed,YAAoB,EAAE,QAA+B;IACrD,KAAK,EAAE,SAAuC;IAE9C,yCAAa;MACX,YAAoB,EAAE,CAAC;EHE3B,8BAAe;IGxBf,KAAK,EAAE,IAAsB;IAG3B,OAAO,EAAE,KAAK;IAed,YAAoB,EAAE,QAA+B;IACrD,KAAK,EAAE,SAAuC;IAE9C,yCAAa;MACX,YAAoB,EAAE,CAAC;EHM3B,6BAAc;IG5Bd,KAAK,EAAE,IAAsB;IAG3B,OAAO,EAAE,KAAK;IAed,YAAoB,EAAE,QAA+B;IACrD,KAAK,EAAE,SAAuC;IAE9C,wCAAa;MACX,YAAoB,EAAE,CAAC;EHU3B,4BAAa;IGhCb,KAAK,EAAE,IAAsB;IAG3B,OAAO,EAAE,KAAK;IAed,YAAoB,EAAE,QAA+B;IACrD,KAAK,EAAE,SAAuC;IAE9C,uCAAa;MACX,YAAoB,EAAE,CAAC;EHc3B,+BAAgB;IGpChB,KAAK,EAAE,IAAsB;IAG3B,OAAO,EAAE,KAAK;IAed,YAAoB,EAAE,QAA+B;IACrD,KAAK,EAAE,SAAuC;IAE9C,0CAAa;MACX,YAAoB,EAAE,CAAC;AHmB7B,gEAAiC;EAC/B,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;;;AExCb,yCAA8C;EFmD5C,iCAAkB;IGvDlB,KAAK,EAAE,IAAsB;IAG3B,OAAO,EAAE,KAAK;IAed,YAAoB,EAAE,QAA+B;IACrD,KAAK,EAAE,SAAuC;IAE9C,4CAAa;MACX,YAAoB,EAAE,CAAC;IFZ7B,+CAAuB;MACrB,YAAoB,EAAE,CAAC;IAIvB,iDAAyB;MACvB,KAAK,EARY,IAAkC;;;ACRvD,gEAA2E;EFuEzE,uXAAwL;IGvExL,KAAK,EAAE,IAAsB;IAG3B,OAAO,EAAE,KAAK;IAed,YAAoB,EAAE,QAA+B;IACrD,KAAK,EAAE,SAAuC;IAE9C,2fAAa;MACX,YAAoB,EAAE,CAAC;IFZ7B,+hBAAuB;MACrB,YAAoB,EAAE,CAAC;IAIvB,ujBAAyB;MACvB,KAAK,EARY,IAAkC;ACZvD,yCAA8C;EFoF5C,uXAAwL;IACtL,KAAK,EAAE,IAAI;IC7FX,YAAoB,EAAE,CAAC;;;ADsG7B,6BAA8B;ECtGxB,YAAoB,EAAE,CAAC;;;AD4G7B,6DAA8D;EC5GxD,YAAoB,EAAE,CAAC;;ADkH3B,mkBAAoY;EClHhY,YAAoB,EAAE,CAAC;ACgB3B,yCAA8C;EFwG5C,6CAA8B;IAC5B,KAAK,EAAE,QAAgB;EAGzB,6CAA8B;IAC5B,KAAK,EAAE,SAAgB;EAGzB,kDAAmC;IACjC,KAAK,EAAE,GAAgB;EAGzB,+CAAgC;IAC9B,KAAK,EAAE,GAAgB;EAGzB,8CAA+B;IAC7B,KAAK,EAAE,SAAgB;EAGzB,8CAA+B;IAC7B,KAAK,EAAE,SAAgB;EAGzB,6CAA8B;IAC5B,KAAK,EAAE,GAAgB;EAGzB,+CAAgC;IAC9B,KAAK,EAAE,SAAgB;EAGzB,+CAAgC;IAC9B,KAAK,EAAE,SAAgB;EAGzB,8CAA+B;IAC7B,KAAK,EAAE,GAAgB;EAGzB,6CAA8B;IAC5B,KAAK,EAAE,SAAiB;EAG1B,gDAAiC;IAC/B,KAAK,EAAE,SAAiB;AEzJ5B,gEAA2E;EF8JzE,mkBAAoY;IAClY,KAAK,EAAE,GAAgB;AEnK3B,yCAA8C;EFwK5C,mkBAAoY;IAClY,KAAK,EAAE,IAAI;;;AASf,2CAA4B;EAC1B,QAAQ,EAAE,OAAO;AAEnB,4FAA6D;EAC3D,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,IAAI;EACjB,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,IAAI;EE/Jb,WAAW,EAAE,yBAAyB;EACtC,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,MAAM;EACnB,YAAY,EAAE,MAAM;EACpB,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,CAAC;EACd,sBAAsB,EAAE,WAAW;EACnC,uBAAuB,EAAE,SAAS;EFyJhC,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,SAAS;EACjB,MAAM,EAAE,OAAO;EACf,IAAI,EAAE,OAAO;EACb,KAAK,EAAE,OAAO;EACd,GAAG,EAAE,GAAG;EACR,WAAW,EAAE,CAAC;EACd,UAAU,EAAE,MAAM;EAClB,KAAK,EAAE,IAAI;EEvOb,kBAAoB,EFwOY,uBAAwB;EEvOxD,eAAiB,EFuOe,uBAAwB;EEtOxD,cAAgB,EFsOgB,uBAAwB;EErOxD,UAAY,EFqOoB,uBAAwB;EACtD,kOAAyB;IACvB,MAAM,EAAE,GAAG;IACX,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,MAAM;IACf,WAAW,EAAE,kBAAkB;IAC/B,OAAO,EAAE,CAAC;EAEZ,wGAAQ;IACN,KAAK,EAAE,IAAI;EAEb,wHAAgB;IACd,KAAK,EAAE,IAAI;IACX,oIAAQ;MACN,KAAK,EAAE,IAAI;EEpNjB,yCAA8C;IFqL9C,4FAA6D;MAmCzD,OAAO,EAAE,IAAI;;AAGjB,yDAA0C;EACxC,IAAI,EAAE,KAAK;EACX,gEAAS;IACP,OAAO,EAAE,OAAO;AAGpB,yDAA0C;EACxC,KAAK,EAAE,KAAK;EACZ,gEAAS;IACP,OAAO,EAAE,OAAO;AAGpB,sCAAuB;EACrB,KAAK,EAAE,IAAI;EACX,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,KAAK;EACb,UAAU,EAAE,MAAM;EAClB,0FAAa;IACX,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;EAElB,8FAAiB;IACf,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,cAAc;IACtB,aAAa,EAAE,GAAG;IAClB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IE1RpB,kBAAoB,EF2Rc,mBAAoB;IE1RtD,eAAiB,EF0RiB,mBAAoB;IEzRtD,cAAgB,EFyRkB,mBAAoB;IExRtD,UAAY,EFwRsB,mBAAoB;IAClD,OAAO,EAAE,YAAY;IACrB,cAAc,EAAE,MAAM;IAEtB,0HAAgB;MACd,UAAU,EAAE,IAAI;MAChB,YAAY,EAAE,IAAI;EAGtB,mLAA+D;IAC7D,UAAU,EAAE,IAAI;EAElB,gIAAmD;IACjD,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;;;AAOlB,0BAA2B;EACzB,UAAU,EAAE,qDAAqD;;AAKjE,oEAAqC;EACnC,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,IAAI;EACjB,UAAU,EAAE,eAAe;EAC3B,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,CAAC;EACV,KAAK,EAAE,IAAI;EEjQb,WAAW,EAAE,yBAAyB;EACtC,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,MAAM;EACnB,YAAY,EAAE,MAAM;EACpB,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,CAAC;EACd,sBAAsB,EAAE,WAAW;EACnC,uBAAuB,EAAE,SAAS;EF2PhC,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,SAAS;EACjB,MAAM,EAAE,OAAO;EACf,IAAI,EAAE,OAAO;EACb,KAAK,EAAE,OAAO;EACd,GAAG,EAAE,GAAG;EACR,WAAW,EAAE,CAAC;EACd,UAAU,EAAE,MAAM;EAClB,KAAK,EAAE,eAAe;EEzUxB,kBAAoB,EF0UY,uBAAwB;EEzUxD,eAAiB,EFyUe,uBAAwB;EExUxD,cAAgB,EFwUgB,uBAAwB;EEvUxD,UAAY,EFuUoB,uBAAwB;EACtD,QAAQ,EAAE,MAAM;EAChB,UAAU,EAAE,IAAI;EAChB,kFAAS;IACP,MAAM,EAAE,GAAG;IACX,cAAc,EAAE,MAAM;EAExB,gFAAQ;IACN,KAAK,EAAE,eAAe;EAExB,gGAAgB;IACd,KAAK,EAAE,eAAe;IACtB,4GAAQ;MACN,KAAK,EAAE,eAAe;MACtB,UAAU,EAAE,eAAe;EEtTjC,0CAA8C;IFoR9C,oEAAqC;MAsCjC,OAAO,EAAE,eAAe;;AAG5B,iCAAkB;EAChB,IAAI,EAAE,KAAK;EACX,wCAAS;IACP,OAAO,EAAE,OAAO;AAGpB,iCAAkB;EAChB,KAAK,EAAE,KAAK;EACZ,wCAAS;IACP,OAAO,EAAE,OAAO;AAGpB,6BAAc;EACZ,KAAK,EAAE,IAAI;EACX,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,KAAK;EACb,UAAU,EAAE,MAAM;EAClB,gCAAG;IACD,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,YAAY;IACrB,SAAS,EAAE,CAAC;EAEd,uCAAU;IACR,OAAO,EAAE,CAAC;IACV,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,cAAc;IACtB,aAAa,EAAE,GAAG;IAClB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IE5XpB,kBAAoB,EF6Xc,uBAAwB;IE5X1D,eAAiB,EF4XiB,uBAAwB;IE3X1D,cAAgB,EF2XkB,uBAAwB;IE1X1D,UAAY,EF0XsB,uBAAwB;IACtD,SAAS,EAAE,CAAC;IACZ,qDAAgB;MACd,UAAU,EAAE,eAAe;MAC3B,YAAY,EAAE,eAAe;EAGjC,6CAAgB;IACd,UAAU,EAAE,eAAe;IAC3B,YAAY,EAAE,eAAe;;;AAOnC,oBAAqB;EEhUnB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,GAAG;EACnB,WAAW,EAAE,IAAI;EACjB,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,SAAS;EACzB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,CAAC;EACb,aAAa,EAAE,IAAI;EF0TnB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,IAAI;EACjB,UAAU,EAAE,MAAM;EE/WlB,yCAA8C;IF2WhD,oBAAqB;MAMjB,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI",
4
+ "sources": ["../../../../bower_components/neat/app/assets/stylesheets/grid/_box-sizing.scss","lsow-frontend.scss","../../../../bower_components/neat/app/assets/stylesheets/grid/_omega.scss","_lsow-lib.scss","../../../../bower_components/neat/app/assets/stylesheets/grid/_span-columns.scss"],
5
+ "names": [],
6
+ "file": "lsow-frontend.css"
7
+ }
assets/css/lsow-frontend.scss ADDED
@@ -0,0 +1,436 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "bourbon";
2
+ @import "neat";
3
+ @import "flexbox";
4
+ @import "grid-settings";
5
+ @import "lsow-lib";
6
+
7
+ /* --------------- Reset styles --------- */
8
+
9
+ .panel-grid .widget {
10
+ overflow: initial;
11
+ }
12
+
13
+ .lsow-container {
14
+ ol, ul, ol li, ul li, ol:hover, ul:hover, ul li:hover, ol li:hover, ol li a, ul li a, ol li a:hover, ul li a:hover, img {
15
+ padding: 0;
16
+ margin: 0;
17
+ border: none;
18
+ box-shadow: none;
19
+ list-style: none;
20
+ background: none;
21
+ &:before, &:after {
22
+ display: none;
23
+ }
24
+ }
25
+ a {
26
+ text-decoration: initial;
27
+ }
28
+ img {
29
+ max-width: 100%;
30
+ }
31
+ }
32
+
33
+ /* ------- General styles ------------ */
34
+
35
+ .lsow-container {
36
+ margin-left: auto;
37
+ margin-right: auto;
38
+ }
39
+
40
+ .panel-grid .widget {
41
+ border: 0;
42
+ }
43
+
44
+ .lsow-center {
45
+ text-align: center;
46
+ }
47
+
48
+ .lsow-lastcol {
49
+ @include omega;
50
+ }
51
+
52
+ .lsow-container {
53
+ .lsow-onecol, .lsow-twocol, .lsow-onefifthcol, .lsow-threecol, .lsow-fourcol, .lsow-fivecol, .lsow-sixcol, .lsow-sevencol, .lsow-eightcol, .lsow-ninecol, .lsow-tencol, .lsow-elevencol {
54
+ min-height: 1px; /* Prevents columns from collapsing when housing absolute elements or when lazy loading content */
55
+ }
56
+
57
+ @include respond-to-min(801) {
58
+
59
+ .lsow-onecol {
60
+ @include span-columns(1);
61
+ @include omega(12n);
62
+ }
63
+
64
+ .lsow-twocol {
65
+ @include span-columns(2);
66
+ @include omega(6n);
67
+ }
68
+
69
+ .lsow-threecol {
70
+ @include span-columns(3);
71
+ @include omega(4n);
72
+ }
73
+
74
+ .lsow-fourcol {
75
+ @include span-columns(4);
76
+ @include omega(3n);
77
+ }
78
+
79
+ .lsow-fivecol {
80
+ @include span-columns(5);
81
+ }
82
+
83
+ .lsow-sixcol {
84
+ @include span-columns(6);
85
+ @include omega(2n);
86
+ }
87
+
88
+ .lsow-sevencol {
89
+ @include span-columns(7);
90
+ }
91
+
92
+ .lsow-eightcol {
93
+ @include span-columns(8);
94
+ }
95
+
96
+ .lsow-ninecol {
97
+ @include span-columns(9);
98
+ }
99
+
100
+ .lsow-tencol {
101
+ @include span-columns(10);
102
+ }
103
+
104
+ .lsow-elevencol {
105
+ @include span-columns(11);
106
+ }
107
+ }
108
+
109
+ .lsow-twelvecol, .lsow-fullwidth {
110
+ float: left;
111
+ display: block;
112
+ width: 100%;
113
+ }
114
+
115
+ }
116
+ /*--------- Support for 5 column grid ----*/
117
+
118
+ $grid-columns: 15;
119
+
120
+ .lsow-container {
121
+ @include respond-to-min(801) {
122
+
123
+ .lsow-onefifthcol {
124
+ @include span-columns(3);
125
+ @include omega(5n);
126
+ }
127
+
128
+ }
129
+ }
130
+
131
+ /* Tablet and Mobile responsiveness */
132
+
133
+ $grid-columns: 12;
134
+
135
+ .lsow-container {
136
+
137
+ @include respond-between(480, 800) {
138
+
139
+ .lsow-onecol, .lsow-twocol, .lsow-onefifthcol, .lsow-threecol, .lsow-fourcol, .lsow-fivecol, .lsow-sixcol, .lsow-sevencol, .lsow-eightcol, .lsow-ninecol, .lsow-tencol, .lsow-elevencol {
140
+ @include span-columns(6);
141
+ @include omega(2n);
142
+ }
143
+
144
+ }
145
+
146
+ @include respond-to-max(479) {
147
+
148
+ .lsow-onecol, .lsow-twocol, .lsow-onefifthcol, .lsow-threecol, .lsow-fourcol, .lsow-fivecol, .lsow-sixcol, .lsow-sevencol, .lsow-eightcol, .lsow-ninecol, .lsow-tencol, .lsow-elevencol {
149
+ width: 100%;
150
+ @include omega;
151
+ }
152
+
153
+ }
154
+ }
155
+
156
+ /*-------- Remove margins on last column -----*/
157
+
158
+ .lsow-container .lsow-lastcol {
159
+ @include omega;
160
+ }
161
+
162
+ /*--------- No margin columns ----*/
163
+
164
+ .lsow-container .lsow-zero-margin, #content .lsow-zero-margin {
165
+ @include omega;
166
+ }
167
+
168
+ .lsow-container {
169
+
170
+ .lsow-onecol.lsow-zero-margin, .lsow-twocol.lsow-zero-margin, .lsow-onefifthcol.lsow-zero-margin, .lsow-threecol.lsow-zero-margin, .lsow-fourcol.lsow-zero-margin, .lsow-fivecol.lsow-zero-margin, .lsow-sixcol.lsow-zero-margin, .lsow-sevencol.lsow-zero-margin, .lsow-eightcol.lsow-zero-margin, .lsow-ninecol.lsow-zero-margin, .lsow-tencol.lsow-zero-margin, .lsow-elevencol.lsow-zero-margin {
171
+ @include omega;
172
+ }
173
+
174
+ @include respond-to-min(768) {
175
+
176
+ .lsow-onecol.lsow-zero-margin {
177
+ width: percentage(1/12);
178
+ }
179
+
180
+ .lsow-twocol.lsow-zero-margin {
181
+ width: percentage(2/12);
182
+ }
183
+
184
+ .lsow-onefifthcol.lsow-zero-margin {
185
+ width: percentage(3/15);
186
+ }
187
+
188
+ .lsow-threecol.lsow-zero-margin {
189
+ width: percentage(3/12);
190
+ }
191
+
192
+ .lsow-fourcol.lsow-zero-margin {
193
+ width: percentage(4/12);
194
+ }
195
+
196
+ .lsow-fivecol.lsow-zero-margin {
197
+ width: percentage(5/12);
198
+ }
199
+
200
+ .lsow-sixcol.lsow-zero-margin {
201
+ width: percentage(6/12);
202
+ }
203
+
204
+ .lsow-sevencol.lsow-zero-margin {
205
+ width: percentage(7/12);
206
+ }
207
+
208
+ .lsow-eightcol.lsow-zero-margin {
209
+ width: percentage(8/12);
210
+ }
211
+
212
+ .lsow-ninecol.lsow-zero-margin {
213
+ width: percentage(9/12);
214
+ }
215
+
216
+ .lsow-tencol.lsow-zero-margin {
217
+ width: percentage(10/12);
218
+ }
219
+
220
+ .lsow-elevencol.lsow-zero-margin {
221
+ width: percentage(11/12);
222
+ }
223
+ }
224
+
225
+ @include respond-between(480, 767) {
226
+ .lsow-onecol.lsow-zero-margin, .lsow-twocol.lsow-zero-margin, .lsow-onefifthcol.lsow-zero-margin, .lsow-threecol.lsow-zero-margin, .lsow-fourcol.lsow-zero-margin, .lsow-fivecol.lsow-zero-margin, .lsow-sixcol.lsow-zero-margin, .lsow-sevencol.lsow-zero-margin, .lsow-eightcol.lsow-zero-margin, .lsow-ninecol.lsow-zero-margin, .lsow-tencol.lsow-zero-margin, .lsow-elevencol.lsow-zero-margin {
227
+ width: percentage(6/12);
228
+ }
229
+ }
230
+
231
+ @include respond-to-max(479) {
232
+ .lsow-onecol.lsow-zero-margin, .lsow-twocol.lsow-zero-margin, .lsow-onefifthcol.lsow-zero-margin, .lsow-threecol.lsow-zero-margin, .lsow-fourcol.lsow-zero-margin, .lsow-fivecol.lsow-zero-margin, .lsow-sixcol.lsow-zero-margin, .lsow-sevencol.lsow-zero-margin, .lsow-eightcol.lsow-zero-margin, .lsow-ninecol.lsow-zero-margin, .lsow-tencol.lsow-zero-margin, .lsow-elevencol.lsow-zero-margin {
233
+ width: 100%;
234
+ }
235
+ }
236
+
237
+ }
238
+
239
+ /* --------------- Flexslider Styles -------------- */
240
+
241
+ .lsow-container {
242
+ .lsow-flex-direction-nav li {
243
+ position: initial;
244
+ }
245
+ .lsow-flex-direction-nav a, .lsow-flex-direction-nav a:hover {
246
+ opacity: 1;
247
+ text-shadow: none;
248
+ background: none;
249
+ color: #888;
250
+ @include lsow-icon-font();
251
+ font-size: 24px;
252
+ width: 28px;
253
+ height: 28px;
254
+ margin: -14px 0 0;
255
+ bottom: initial;
256
+ left: initial;
257
+ right: initial;
258
+ top: 50%;
259
+ text-indent: 0;
260
+ text-align: center;
261
+ color: #aaa;
262
+ @include vendorize(transition, all 0.3s ease-in-out 0s);
263
+ &:before, &:hover:before {
264
+ margin: 2px;
265
+ vertical-align: middle;
266
+ display: inline;
267
+ font-family: inherit !important;
268
+ opacity: 1;
269
+ }
270
+ &:hover {
271
+ color: #888;
272
+ }
273
+ .lsow-dark-bg & {
274
+ color: #888;
275
+ &:hover {
276
+ color: #aaa;
277
+ }
278
+ }
279
+ @include respond-to-max(960) {
280
+ display: none; /* Let users navigate via touch */
281
+ }
282
+ }
283
+ .lsow-flex-direction-nav a.lsow-flex-prev {
284
+ left: -30px;
285
+ &:before {
286
+ content: "\e900";
287
+ }
288
+ }
289
+ .lsow-flex-direction-nav a.lsow-flex-next {
290
+ right: -30px;
291
+ &:before {
292
+ content: "\e901";
293
+ }
294
+ }
295
+ .lsow-flex-control-nav {
296
+ width: 100%;
297
+ position: absolute;
298
+ bottom: -40px;
299
+ text-align: center;
300
+ li, li:hover {
301
+ margin: 0 8px 0 0;
302
+ padding: 0;
303
+ border: none;
304
+ box-shadow: none;
305
+ }
306
+ li a, li a:hover {
307
+ background: #aaa;
308
+ border: 1px solid #aaa;
309
+ border-radius: 50%;
310
+ width: 12px;
311
+ height: 12px;
312
+ box-shadow: none;
313
+ @include vendorize(transition, all 0.2s ease-in 0s);
314
+ display: inline-block;
315
+ vertical-align: middle;
316
+
317
+ .lsow-dark-bg & {
318
+ background: #ccc;
319
+ border-color: #ccc;
320
+ }
321
+ }
322
+ li a.lsow-flex-active, li a:hover.lsow-flex-active, li a:hover {
323
+ background: none;
324
+ }
325
+ li a.lsow-flex-active, li a:hover.lsow-flex-active {
326
+ width: 14px;
327
+ height: 14px;
328
+ }
329
+ }
330
+ }
331
+
332
+ /* Sleek Carousel Styles */
333
+
334
+ .slick-loading .slick-list {
335
+ background: #fff url('./ajax-loader.gif') center center no-repeat;
336
+ }
337
+
338
+ .lsow-container {
339
+
340
+ button.slick-prev, button.slick-next {
341
+ position: absolute;
342
+ opacity: 1;
343
+ text-shadow: none;
344
+ background: none !important;
345
+ border: none;
346
+ padding: 0;
347
+ color: #888;
348
+ @include lsow-icon-font();
349
+ font-size: 24px;
350
+ width: 28px;
351
+ height: 28px;
352
+ margin: -14px 0 0;
353
+ bottom: initial;
354
+ left: initial;
355
+ right: initial;
356
+ top: 50%;
357
+ text-indent: 0;
358
+ text-align: center;
359
+ color: #aaa !important;
360
+ @include vendorize(transition, all 0.3s ease-in-out 0s);
361
+ overflow: hidden;
362
+ box-shadow: none;
363
+ &:before {
364
+ margin: 2px;
365
+ vertical-align: middle;
366
+ }
367
+ &:hover {
368
+ color: #888 !important;
369
+ }
370
+ .lsow-dark-bg & {
371
+ color: #888 !important;
372
+ &:hover {
373
+ color: #aaa !important;
374
+ background: none !important;
375
+ }
376
+ }
377
+ @include respond-to-max(1024) {
378
+ display: none !important; /* Let users navigate via touch */
379
+ }
380
+ }
381
+ button.slick-prev {
382
+ left: -40px;
383
+ &:before {
384
+ content: "\e900";
385
+ }
386
+ }
387
+ button.slick-next {
388
+ right: -40px;
389
+ &:before {
390
+ content: "\e901";
391
+ }
392
+ }
393
+ ul.slick-dots {
394
+ width: 100%;
395
+ position: absolute;
396
+ bottom: -40px;
397
+ text-align: center;
398
+ li {
399
+ margin: 0 8px 0 0;
400
+ display: inline-block;
401
+ font-size: 0;
402
+ }
403
+ li button {
404
+ padding: 0;
405
+ background: #aaa;
406
+ border: 1px solid #aaa;
407
+ border-radius: 50%;
408
+ width: 12px;
409
+ height: 12px;
410
+ box-shadow: none;
411
+ @include vendorize(transition, all 0.3s ease-in-out 0s);
412
+ font-size: 0;
413
+ .lsow-dark-bg & {
414
+ background: #888 !important;
415
+ border-color: #888 !important;
416
+ }
417
+ }
418
+ li button:hover {
419
+ background: none !important;
420
+ border-color: #aaa !important;
421
+ }
422
+ }
423
+ }
424
+
425
+ /* -------- Widget separator headline ------------ */
426
+
427
+ .lsow-widget-heading {
428
+ @include lsow-heading-style();
429
+ font-size: 40px;
430
+ line-height: 52px;
431
+ text-align: center;
432
+ @include respond-to-max(767) {
433
+ font-size: 32px;
434
+ line-height: 44px;
435
+ }
436
+ }
assets/css/magnific-popup.css ADDED
@@ -0,0 +1,391 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Magnific Popup CSS */
2
+ .mfp-bg {
3
+ top: 0;
4
+ left: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ z-index: 1042;
8
+ overflow: hidden;
9
+ position: fixed;
10
+ background: #0b0b0b;
11
+ opacity: 0.8;
12
+ filter: alpha(opacity=80); }
13
+
14
+ .mfp-wrap {
15
+ top: 0;
16
+ left: 0;
17
+ width: 100%;
18
+ height: 100%;
19
+ z-index: 1043;
20
+ position: fixed;
21
+ outline: none !important;
22
+ -webkit-backface-visibility: hidden; }
23
+
24
+ .mfp-container {
25
+ text-align: center;
26
+ position: absolute;
27
+ width: 100%;
28
+ height: 100%;
29
+ left: 0;
30
+ top: 0;
31
+ padding: 0 8px;
32
+ -webkit-box-sizing: border-box;
33
+ -moz-box-sizing: border-box;
34
+ box-sizing: border-box; }
35
+
36
+ .mfp-container:before {
37
+ content: '';
38
+ display: inline-block;
39
+ height: 100%;
40
+ vertical-align: middle; }
41
+
42
+ .mfp-align-top .mfp-container:before {
43
+ display: none; }
44
+
45
+ .mfp-content {
46
+ position: relative;
47
+ display: inline-block;
48
+ vertical-align: middle;
49
+ margin: 0 auto;
50
+ text-align: left;
51
+ z-index: 1045; }
52
+
53
+ .mfp-inline-holder .mfp-content,
54
+ .mfp-ajax-holder .mfp-content {
55
+ width: 100%;
56
+ cursor: auto; }
57
+
58
+ .mfp-ajax-cur {
59
+ cursor: progress; }
60
+
61
+ .mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
62
+ cursor: -moz-zoom-out;
63
+ cursor: -webkit-zoom-out;
64
+ cursor: zoom-out; }
65
+
66
+ .mfp-zoom {
67
+ cursor: pointer;
68
+ cursor: -webkit-zoom-in;
69
+ cursor: -moz-zoom-in;
70
+ cursor: zoom-in; }
71
+
72
+ .mfp-auto-cursor .mfp-content {
73
+ cursor: auto; }
74
+
75
+ .mfp-close,
76
+ .mfp-arrow,
77
+ .mfp-preloader,
78
+ .mfp-counter {
79
+ -webkit-user-select: none;
80
+ -moz-user-select: none;
81
+ user-select: none; }
82
+
83
+ .mfp-loading.mfp-figure {
84
+ display: none; }
85
+
86
+ .mfp-hide {
87
+ display: none !important; }
88
+
89
+ .mfp-preloader {
90
+ color: #CCC;
91
+ position: absolute;
92
+ top: 50%;
93
+ width: auto;
94
+ text-align: center;
95
+ margin-top: -0.8em;
96
+ left: 8px;
97
+ right: 8px;
98
+ z-index: 1044; }
99
+ .mfp-preloader a {
100
+ color: #CCC; }
101
+ .mfp-preloader a:hover {
102
+ color: #FFF; }
103
+
104
+ .mfp-s-ready .mfp-preloader {
105
+ display: none; }
106
+
107
+ .mfp-s-error .mfp-content {
108
+ display: none; }
109
+
110
+ button.mfp-close,
111
+ button.mfp-arrow {
112
+ overflow: visible;
113
+ cursor: pointer;
114
+ background: transparent;
115
+ border: 0;
116
+ -webkit-appearance: none;
117
+ display: block;
118
+ outline: none;
119
+ padding: 0;
120
+ z-index: 1046;
121
+ -webkit-box-shadow: none;
122
+ box-shadow: none; }
123
+
124
+ button::-moz-focus-inner {
125
+ padding: 0;
126
+ border: 0; }
127
+
128
+ .mfp-close {
129
+ width: 44px;
130
+ height: 44px;
131
+ line-height: 44px;
132
+ position: absolute;
133
+ right: 0;
134
+ top: 0;
135
+ text-decoration: none;
136
+ text-align: center;
137
+ opacity: 0.65;
138
+ filter: alpha(opacity=65);
139
+ padding: 0 0 18px 10px;
140
+ color: #FFF;
141
+ font-style: normal;
142
+ font-size: 28px;
143
+ font-family: Arial, Baskerville, monospace; }
144
+ .mfp-close:hover,
145
+ .mfp-close:focus {
146
+ opacity: 1;
147
+ filter: alpha(opacity=100); }
148
+ .mfp-close:active {
149
+ top: 1px; }
150
+
151
+ .mfp-close-btn-in .mfp-close {
152
+ color: #333; }
153
+
154
+ .mfp-image-holder .mfp-close,
155
+ .mfp-iframe-holder .mfp-close {
156
+ color: #FFF;
157
+ right: -6px;
158
+ text-align: right;
159
+ padding-right: 6px;
160
+ width: 100%; }
161
+
162
+ .mfp-counter {
163
+ position: absolute;
164
+ top: 0;
165
+ right: 0;
166
+ color: #CCC;
167
+ font-size: 12px;
168
+ line-height: 18px;
169
+ white-space: nowrap; }
170
+
171
+ .mfp-arrow {
172
+ position: absolute;
173
+ opacity: 0.65;
174
+ filter: alpha(opacity=65);
175
+ margin: 0;
176
+ top: 50%;
177
+ margin-top: -55px;
178
+ padding: 0;
179
+ width: 90px;
180
+ height: 110px;
181
+ -webkit-tap-highlight-color: transparent; }
182
+ .mfp-arrow:active {
183
+ margin-top: -54px; }
184
+ .mfp-arrow:hover,
185
+ .mfp-arrow:focus {
186
+ opacity: 1;
187
+ filter: alpha(opacity=100); }
188
+ .mfp-arrow:before,
189
+ .mfp-arrow:after,
190
+ .mfp-arrow .mfp-b,
191
+ .mfp-arrow .mfp-a {
192
+ content: '';
193
+ display: block;
194
+ width: 0;
195
+ height: 0;
196
+ position: absolute;
197
+ left: 0;
198
+ top: 0;
199
+ margin-top: 35px;
200
+ margin-left: 35px;
201
+ border: medium inset transparent; }
202
+ .mfp-arrow:after,
203
+ .mfp-arrow .mfp-a {
204
+ border-top-width: 13px;
205
+ border-bottom-width: 13px;
206
+ top: 8px; }
207
+ .mfp-arrow:before,
208
+ .mfp-arrow .mfp-b {
209
+ border-top-width: 21px;
210
+ border-bottom-width: 21px;
211
+ opacity: 0.7; }
212
+
213
+ .mfp-arrow-left {
214
+ left: 0; }
215
+ .mfp-arrow-left:after,
216
+ .mfp-arrow-left .mfp-a {
217
+ border-right: 17px solid #FFF;
218
+ margin-left: 31px; }
219
+ .mfp-arrow-left:before,
220
+ .mfp-arrow-left .mfp-b {
221
+ margin-left: 25px;
222
+ border-right: 27px solid #3F3F3F; }
223
+
224
+ .mfp-arrow-right {
225
+ right: 0; }
226
+ .mfp-arrow-right:after,
227
+ .mfp-arrow-right .mfp-a {
228
+ border-left: 17px solid #FFF;
229
+ margin-left: 39px; }
230
+ .mfp-arrow-right:before,
231
+ .mfp-arrow-right .mfp-b {
232
+ border-left: 27px solid #3F3F3F; }
233
+
234
+ .mfp-iframe-holder {
235
+ padding-top: 40px;
236
+ padding-bottom: 40px; }
237
+ .mfp-iframe-holder .mfp-content {
238
+ line-height: 0;
239
+ width: 100%;
240
+ max-width: 900px; }
241
+ .mfp-iframe-holder .mfp-close {
242
+ top: -40px; }
243
+
244
+ .mfp-iframe-scaler {
245
+ width: 100%;
246
+ height: 0;
247
+ overflow: hidden;
248
+ padding-top: 56.25%; }
249
+ .mfp-iframe-scaler iframe {
250
+ position: absolute;
251
+ display: block;
252
+ top: 0;
253
+ left: 0;
254
+ width: 100%;
255
+ height: 100%;
256
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
257
+ background: #000; }
258
+
259
+ /* Main image in popup */
260
+ img.mfp-img {
261
+ width: auto;
262
+ max-width: 100%;
263
+ height: auto;
264
+ display: block;
265
+ line-height: 0;
266
+ -webkit-box-sizing: border-box;
267
+ -moz-box-sizing: border-box;
268
+ box-sizing: border-box;
269
+ padding: 40px 0 40px;
270
+ margin: 0 auto; }
271
+
272
+ /* The shadow behind the image */
273
+ .mfp-figure {
274
+ line-height: 0; }
275
+ .mfp-figure:after {
276
+ content: '';
277
+ position: absolute;
278
+ left: 0;
279
+ top: 40px;
280
+ bottom: 40px;
281
+ display: block;
282
+ right: 0;
283
+ width: auto;
284
+ height: auto;
285
+ z-index: -1;
286
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
287
+ background: #444; }
288
+ .mfp-figure small {
289
+ color: #BDBDBD;
290
+ display: block;
291
+ font-size: 12px;
292
+ line-height: 14px; }
293
+ .mfp-figure figure {
294
+ margin: 0; }
295
+
296
+ .mfp-bottom-bar {
297
+ margin-top: -36px;
298
+ position: absolute;
299
+ top: 100%;
300
+ left: 0;
301
+ width: 100%;
302
+ cursor: auto; }
303
+
304
+ .mfp-title {
305
+ text-align: left;
306
+ line-height: 18px;
307
+ color: #F3F3F3;
308
+ word-wrap: break-word;
309
+ padding-right: 36px; }
310
+
311
+ .mfp-image-holder .mfp-content {
312
+ max-width: 100%; }
313
+
314
+ .mfp-gallery .mfp-image-holder .mfp-figure {
315
+ cursor: pointer; }
316
+
317
+ @media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
318
+ /**
319
+ * Remove all paddings around the image on small screen
320
+ */
321
+ .mfp-img-mobile .mfp-image-holder {
322
+ padding-left: 0;
323
+ padding-right: 0; }
324
+ .mfp-img-mobile img.mfp-img {
325
+ padding: 0; }
326
+ .mfp-img-mobile .mfp-figure:after {
327
+ top: 0;
328
+ bottom: 0; }
329
+ .mfp-img-mobile .mfp-figure small {
330
+ display: inline;
331
+ margin-left: 5px; }
332
+ .mfp-img-mobile .mfp-bottom-bar {
333
+ background: rgba(0, 0, 0, 0.6);
334
+ bottom: 0;
335
+ margin: 0;
336
+ top: auto;
337
+ padding: 3px 5px;
338
+ position: fixed;
339
+ -webkit-box-sizing: border-box;
340
+ -moz-box-sizing: border-box;
341
+ box-sizing: border-box; }
342
+ .mfp-img-mobile .mfp-bottom-bar:empty {
343
+ padding: 0; }
344
+ .mfp-img-mobile .mfp-counter {
345
+ right: 5px;
346
+ top: 3px; }
347
+ .mfp-img-mobile .mfp-close {
348
+ top: 0;
349
+ right: 0;
350
+ width: 35px;
351
+ height: 35px;
352
+ line-height: 35px;
353
+ background: rgba(0, 0, 0, 0.6);
354
+ position: fixed;
355
+ text-align: center;
356
+ padding: 0; } }
357
+
358
+ @media all and (max-width: 900px) {
359
+ .mfp-arrow {
360
+ -webkit-transform: scale(0.75);
361
+ transform: scale(0.75); }
362
+ .mfp-arrow-left {
363
+ -webkit-transform-origin: 0;
364
+ transform-origin: 0; }
365
+ .mfp-arrow-right {
366
+ -webkit-transform-origin: 100%;
367
+ transform-origin: 100%; }
368
+ .mfp-container {
369
+ padding-left: 6px;
370
+ padding-right: 6px; } }
371
+
372
+ .mfp-ie7 .mfp-img {
373
+ padding: 0; }
374
+
375
+ .mfp-ie7 .mfp-bottom-bar {
376
+ width: 600px;
377
+ left: 50%;
378
+ margin-left: -300px;
379
+ margin-top: 5px;
380
+ padding-bottom: 5px; }
381
+
382
+ .mfp-ie7 .mfp-container {
383
+ padding: 0; }
384
+
385
+ .mfp-ie7 .mfp-content {
386
+ padding-top: 44px; }
387
+
388
+ .mfp-ie7 .mfp-close {
389
+ top: 0;
390
+ right: 0;
391
+ padding-top: 0; }
assets/css/slick.css ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Slider */
2
+ .slick-slider
3
+ {
4
+ position: relative;
5
+
6
+ display: block;
7
+
8
+ -moz-box-sizing: border-box;
9
+ box-sizing: border-box;
10
+
11
+ -webkit-user-select: none;
12
+ -moz-user-select: none;
13
+ -ms-user-select: none;
14
+ user-select: none;
15
+
16
+ -webkit-touch-callout: none;
17
+ -khtml-user-select: none;
18
+ -ms-touch-action: pan-y;
19
+ touch-action: pan-y;
20
+ -webkit-tap-highlight-color: transparent;
21
+ }
22
+
23
+ .slick-list
24
+ {
25
+ position: relative;
26
+
27
+ display: block;
28
+ overflow: hidden;
29
+
30
+ margin: 0;
31
+ padding: 0;
32
+ }
33
+ .slick-list:focus
34
+ {
35
+ outline: none;
36
+ }
37
+ .slick-list.dragging
38
+ {
39
+ cursor: pointer;
40
+ cursor: hand;
41
+ }
42
+
43
+ .slick-slider .slick-track,
44
+ .slick-slider .slick-list
45
+ {
46
+ -webkit-transform: translate3d(0, 0, 0);
47
+ -moz-transform: translate3d(0, 0, 0);
48
+ -ms-transform: translate3d(0, 0, 0);
49
+ -o-transform: translate3d(0, 0, 0);
50
+ transform: translate3d(0, 0, 0);
51
+ }
52
+
53
+ .slick-track
54
+ {
55
+ position: relative;
56
+ top: 0;
57
+ left: 0;
58
+
59
+ display: block;
60
+ }
61
+ .slick-track:before,
62
+ .slick-track:after
63
+ {
64
+ display: table;
65
+
66
+ content: '';
67
+ }
68
+ .slick-track:after
69
+ {
70
+ clear: both;
71
+ }
72
+ .slick-loading .slick-track
73
+ {
74
+ visibility: hidden;
75
+ }
76
+
77
+ .slick-slide
78
+ {
79
+ display: none;
80
+ float: left;
81
+
82
+ height: 100%;
83
+ min-height: 1px;
84
+ }
85
+ [dir='rtl'] .slick-slide
86
+ {
87
+ float: right;
88
+ }
89
+ .slick-slide img
90
+ {
91
+ display: block;
92
+ }
93
+ .slick-slide.slick-loading img
94
+ {
95
+ display: none;
96
+ }
97
+ .slick-slide.dragging img
98
+ {
99
+ pointer-events: none;
100
+ }
101
+ .slick-initialized .slick-slide
102
+ {
103
+ display: block;
104
+ }
105
+ .slick-loading .slick-slide
106
+ {
107
+ visibility: hidden;
108
+ }
109
+ .slick-vertical .slick-slide
110
+ {
111
+ display: block;
112
+
113
+ height: auto;
114
+
115
+ border: 1px solid transparent;
116
+ }
117
+ .slick-arrow.slick-hidden {
118
+ display: none;
119
+ }
assets/js/imagesloaded.pkgd.js ADDED
@@ -0,0 +1,942 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * imagesLoaded PACKAGED v3.2.0
3
+ * JavaScript is all like "You images are done yet or what?"
4
+ * MIT License
5
+ */
6
+
7
+ /*!
8
+ * EventEmitter v4.2.6 - git.io/ee
9
+ * Oliver Caldwell
10
+ * MIT license
11
+ * @preserve
12
+ */
13
+
14
+ (function () {
15
+ 'use strict';
16
+
17
+ /**
18
+ * Class for managing events.
19
+ * Can be extended to provide event functionality in other classes.
20
+ *
21
+ * @class EventEmitter Manages event registering and emitting.
22
+ */
23
+ function EventEmitter() {}
24
+
25
+ // Shortcuts to improve speed and size
26
+ var proto = EventEmitter.prototype;
27
+ var exports = this;
28
+ var originalGlobalValue = exports.EventEmitter;
29
+
30
+ /**
31
+ * Finds the index of the listener for the event in it's storage array.
32
+ *
33
+ * @param {Function[]} listeners Array of listeners to search through.
34
+ * @param {Function} listener Method to look for.
35
+ * @return {Number} Index of the specified listener, -1 if not found
36
+ * @api private
37
+ */
38
+ function indexOfListener(listeners, listener) {
39
+ var i = listeners.length;
40
+ while (i--) {
41
+ if (listeners[i].listener === listener) {
42
+ return i;
43
+ }
44
+ }
45
+
46
+ return -1;
47
+ }
48
+
49
+ /**
50
+ * Alias a method while keeping the context correct, to allow for overwriting of target method.
51
+ *
52
+ * @param {String} name The name of the target method.
53
+ * @return {Function} The aliased method
54
+ * @api private
55
+ */
56
+ function alias(name) {
57
+ return function aliasClosure() {
58
+ return this[name].apply(this, arguments);
59
+ };
60
+ }
61
+
62
+ /**
63
+ * Returns the listener array for the specified event.
64
+ * Will initialise the event object and listener arrays if required.
65
+ * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.
66
+ * Each property in the object response is an array of listener functions.
67
+ *
68
+ * @param {String|RegExp} evt Name of the event to return the listeners from.
69
+ * @return {Function[]|Object} All listener functions for the event.
70
+ */
71
+ proto.getListeners = function getListeners(evt) {
72
+ var events = this._getEvents();
73
+ var response;
74
+ var key;
75
+
76
+ // Return a concatenated array of all matching events if
77
+ // the selector is a regular expression.
78
+ if (typeof evt === 'object') {
79
+ response = {};
80
+ for (key in events) {
81
+ if (events.hasOwnProperty(key) && evt.test(key)) {
82
+ response[key] = events[key];
83
+ }
84
+ }
85
+ }
86
+ else {
87
+ response = events[evt] || (events[evt] = []);
88
+ }
89
+
90
+ return response;
91
+ };
92
+
93
+ /**
94
+ * Takes a list of listener objects and flattens it into a list of listener functions.
95
+ *
96
+ * @param {Object[]} listeners Raw listener objects.
97
+ * @return {Function[]} Just the listener functions.
98
+ */
99
+ proto.flattenListeners = function flattenListeners(listeners) {
100
+ var flatListeners = [];
101
+ var i;
102
+
103
+ for (i = 0; i < listeners.length; i += 1) {
104
+ flatListeners.push(listeners[i].listener);
105
+ }
106
+
107
+ return flatListeners;
108
+ };
109
+
110
+ /**
111
+ * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.
112
+ *
113
+ * @param {String|RegExp} evt Name of the event to return the listeners from.
114
+ * @return {Object} All listener functions for an event in an object.
115
+ */
116
+ proto.getListenersAsObject = function getListenersAsObject(evt) {
117
+ var listeners = this.getListeners(evt);
118
+ var response;
119
+
120
+ if (listeners instanceof Array) {
121
+ response = {};
122
+ response[evt] = listeners;
123
+ }
124
+
125
+ return response || listeners;
126
+ };
127
+
128
+ /**
129
+ * Adds a listener function to the specified event.
130
+ * The listener will not be added if it is a duplicate.
131
+ * If the listener returns true then it will be removed after it is called.
132
+ * If you pass a regular expression as the event name then the listener will be added to all events that match it.
133
+ *
134
+ * @param {String|RegExp} evt Name of the event to attach the listener to.
135
+ * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
136
+ * @return {Object} Current instance of EventEmitter for chaining.
137
+ */
138
+ proto.addListener = function addListener(evt, listener) {
139
+ var listeners = this.getListenersAsObject(evt);
140
+ var listenerIsWrapped = typeof listener === 'object';
141
+ var key;
142
+
143
+ for (key in listeners) {
144
+ if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {
145
+ listeners[key].push(listenerIsWrapped ? listener : {
146
+ listener: listener,
147
+ once: false
148
+ });
149
+ }
150
+ }
151
+
152
+ return this;
153
+ };
154
+
155
+ /**
156
+ * Alias of addListener
157
+ */
158
+ proto.on = alias('addListener');
159
+
160
+ /**
161
+ * Semi-alias of addListener. It will add a listener that will be
162
+ * automatically removed after it's first execution.
163
+ *
164
+ * @param {String|RegExp} evt Name of the event to attach the listener to.
165
+ * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
166
+ * @return {Object} Current instance of EventEmitter for chaining.
167
+ */
168
+ proto.addOnceListener = function addOnceListener(evt, listener) {
169
+ return this.addListener(evt, {
170
+ listener: listener,
171
+ once: true
172
+ });
173
+ };
174
+
175
+ /**
176
+ * Alias of addOnceListener.
177
+ */
178
+ proto.once = alias('addOnceListener');
179
+
180
+ /**
181
+ * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.
182
+ * You need to tell it what event names should be matched by a regex.
183
+ *
184
+ * @param {String} evt Name of the event to create.
185
+ * @return {Object} Current instance of EventEmitter for chaining.
186
+ */
187
+ proto.defineEvent = function defineEvent(evt) {
188
+ this.getListeners(evt);
189
+ return this;
190
+ };
191
+
192
+ /**
193
+ * Uses defineEvent to define multiple events.
194
+ *
195
+ * @param {String[]} evts An array of event names to define.
196
+ * @return {Object} Current instance of EventEmitter for chaining.
197
+ */
198
+ proto.defineEvents = function defineEvents(evts) {
199
+ for (var i = 0; i < evts.length; i += 1) {
200
+ this.defineEvent(evts[i]);
201
+ }
202
+ return this;
203
+ };
204
+
205
+ /**
206
+ * Removes a listener function from the specified event.
207
+ * When passed a regular expression as the event name, it will remove the listener from all events that match it.
208
+ *
209
+ * @param {String|RegExp} evt Name of the event to remove the listener from.
210
+ * @param {Function} listener Method to remove from the event.
211
+ * @return {Object} Current instance of EventEmitter for chaining.
212
+ */
213
+ proto.removeListener = function removeListener(evt, listener) {
214
+ var listeners = this.getListenersAsObject(evt);
215
+ var index;
216
+ var key;
217
+
218
+ for (key in listeners) {
219
+ if (listeners.hasOwnProperty(key)) {
220
+ index = indexOfListener(listeners[key], listener);
221
+
222
+ if (index !== -1) {
223
+ listeners[key].splice(index, 1);
224
+ }
225
+ }
226
+ }
227
+
228
+ return this;
229
+ };
230
+
231
+ /**
232
+ * Alias of removeListener
233
+ */
234
+ proto.off = alias('removeListener');
235
+
236
+ /**
237
+ * Adds listeners in bulk using the manipulateListeners method.
238
+ * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.
239
+ * You can also pass it a regular expression to add the array of listeners to all events that match it.
240
+ * Yeah, this function does quite a bit. That's probably a bad thing.
241
+ *
242
+ * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.
243
+ * @param {Function[]} [listeners] An optional array of listener functions to add.
244
+ * @return {Object} Current instance of EventEmitter for chaining.
245
+ */
246
+ proto.addListeners = function addListeners(evt, listeners) {
247
+ // Pass through to manipulateListeners
248
+ return this.manipulateListeners(false, evt, listeners);
249
+ };
250
+
251
+ /**
252
+ * Removes listeners in bulk using the manipulateListeners method.
253
+ * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
254
+ * You can also pass it an event name and an array of listeners to be removed.
255
+ * You can also pass it a regular expression to remove the listeners from all events that match it.
256
+ *
257
+ * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.
258
+ * @param {Function[]} [listeners] An optional array of listener functions to remove.
259
+ * @return {Object} Current instance of EventEmitter for chaining.
260
+ */
261
+ proto.removeListeners = function removeListeners(evt, listeners) {
262
+ // Pass through to manipulateListeners
263
+ return this.manipulateListeners(true, evt, listeners);
264
+ };
265
+
266
+ /**
267
+ * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.
268
+ * The first argument will determine if the listeners are removed (true) or added (false).
269
+ * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
270
+ * You can also pass it an event name and an array of listeners to be added/removed.
271
+ * You can also pass it a regular expression to manipulate the listeners of all events that match it.
272
+ *
273
+ * @param {Boolean} remove True if you want to remove listeners, false if you want to add.
274
+ * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.
275
+ * @param {Function[]} [listeners] An optional array of listener functions to add/remove.
276
+ * @return {Object} Current instance of EventEmitter for chaining.
277
+ */
278
+ proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {
279
+ var i;
280
+ var value;
281
+ var single = remove ? this.removeListener : this.addListener;
282
+ var multiple = remove ? this.removeListeners : this.addListeners;
283
+
284
+ // If evt is an object then pass each of it's properties to this method
285
+ if (typeof evt === 'object' && !(evt instanceof RegExp)) {
286
+ for (i in evt) {
287
+ if (evt.hasOwnProperty(i) && (value = evt[i])) {
288
+ // Pass the single listener straight through to the singular method
289
+ if (typeof value === 'function') {
290
+ single.call(this, i, value);
291
+ }
292
+ else {
293
+ // Otherwise pass back to the multiple function
294
+ multiple.call(this, i, value);
295
+ }
296
+ }
297
+ }
298
+ }
299
+ else {
300
+ // So evt must be a string
301
+ // And listeners must be an array of listeners
302
+ // Loop over it and pass each one to the multiple method
303
+ i = listeners.length;
304
+ while (i--) {
305
+ single.call(this, evt, listeners[i]);
306
+ }
307
+ }
308
+
309
+ return this;
310
+ };
311
+
312
+ /**
313
+ * Removes all listeners from a specified event.
314
+ * If you do not specify an event then all listeners will be removed.
315
+ * That means every event will be emptied.
316
+ * You can also pass a regex to remove all events that match it.
317
+ *
318
+ * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.
319
+ * @return {Object} Current instance of EventEmitter for chaining.
320
+ */
321
+ proto.removeEvent = function removeEvent(evt) {
322
+ var type = typeof evt;
323
+ var events = this._getEvents();
324
+ var key;
325
+
326
+ // Remove different things depending on the state of evt
327
+ if (type === 'string') {
328
+ // Remove all listeners for the specified event
329
+ delete events[evt];
330
+ }
331
+ else if (type === 'object') {
332
+ // Remove all events matching the regex.
333
+ for (key in events) {
334
+ if (events.hasOwnProperty(key) && evt.test(key)) {
335
+ delete events[key];
336
+ }
337
+ }
338
+ }
339
+ else {
340
+ // Remove all listeners in all events
341
+ delete this._events;
342
+ }
343
+
344
+ return this;
345
+ };
346
+
347
+ /**
348
+ * Alias of removeEvent.
349
+ *
350
+ * Added to mirror the node API.
351
+ */
352
+ proto.removeAllListeners = alias('removeEvent');
353
+
354
+ /**
355
+ * Emits an event of your choice.
356
+ * When emitted, every listener attached to that event will be executed.
357
+ * If you pass the optional argument array then those arguments will be passed to every listener upon execution.
358
+ * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.
359
+ * So they will not arrive within the array on the other side, they will be separate.
360
+ * You can also pass a regular expression to emit to all events that match it.
361
+ *
362
+ * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
363
+ * @param {Array} [args] Optional array of arguments to be passed to each listener.
364
+ * @return {Object} Current instance of EventEmitter for chaining.
365
+ */
366
+ proto.emitEvent = function emitEvent(evt, args) {
367
+ var listeners = this.getListenersAsObject(evt);
368
+ var listener;
369
+ var i;
370
+ var key;
371
+ var response;
372
+
373
+ for (key in listeners) {
374
+ if (listeners.hasOwnProperty(key)) {
375
+ i = listeners[key].length;
376
+
377
+ while (i--) {
378
+ // If the listener returns true then it shall be removed from the event
379
+ // The function is executed either with a basic call or an apply if there is an args array
380
+ listener = listeners[key][i];
381
+
382
+ if (listener.once === true) {
383
+ this.removeListener(evt, listener.listener);
384
+ }
385
+
386
+ response = listener.listener.apply(this, args || []);
387
+
388
+ if (response === this._getOnceReturnValue()) {
389
+ this.removeListener(evt, listener.listener);
390
+ }
391
+ }
392
+ }
393
+ }
394
+
395
+ return this;
396
+ };
397
+
398
+ /**
399
+ * Alias of emitEvent
400
+ */
401
+ proto.trigger = alias('emitEvent');
402
+
403
+ /**
404
+ * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.
405
+ * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.
406
+ *
407
+ * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
408
+ * @param {...*} Optional additional arguments to be passed to each listener.
409
+ * @return {Object} Current instance of EventEmitter for chaining.
410
+ */
411
+ proto.emit = function emit(evt) {
412
+ var args = Array.prototype.slice.call(arguments, 1);
413
+ return this.emitEvent(evt, args);
414
+ };
415
+
416
+ /**
417
+ * Sets the current value to check against when executing listeners. If a
418
+ * listeners return value matches the one set here then it will be removed
419
+ * after execution. This value defaults to true.
420
+ *
421
+ * @param {*} value The new value to check for when executing listeners.
422
+ * @return {Object} Current instance of EventEmitter for chaining.
423
+ */
424
+ proto.setOnceReturnValue = function setOnceReturnValue(value) {
425
+ this._onceReturnValue = value;
426
+ return this;
427
+ };
428
+
429
+ /**
430
+ * Fetches the current value to check against when executing listeners. If
431
+ * the listeners return value matches this one then it should be removed
432
+ * automatically. It will return true by default.
433
+ *
434
+ * @return {*|Boolean} The current value to check for or the default, true.
435
+ * @api private
436
+ */
437
+ proto._getOnceReturnValue = function _getOnceReturnValue() {
438
+ if (this.hasOwnProperty('_onceReturnValue')) {
439
+ return this._onceReturnValue;
440
+ }
441
+ else {
442
+ return true;
443
+ }
444
+ };
445
+
446
+ /**
447
+ * Fetches the events object and creates one if required.
448
+ *
449
+ * @return {Object} The events storage object.
450
+ * @api private
451
+ */
452
+ proto._getEvents = function _getEvents() {
453
+ return this._events || (this._events = {});
454
+ };
455
+
456
+ /**
457
+ * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.
458
+ *
459
+ * @return {Function} Non conflicting EventEmitter class.
460
+ */
461
+ EventEmitter.noConflict = function noConflict() {
462
+ exports.EventEmitter = originalGlobalValue;
463
+ return EventEmitter;
464
+ };
465
+
466
+ // Expose the class either via AMD, CommonJS or the global object
467
+ if (typeof define === 'function' && define.amd) {
468
+ define('eventEmitter/EventEmitter',[],function () {
469
+ return EventEmitter;
470
+ });
471
+ }
472
+ else if (typeof module === 'object' && module.exports){
473
+ module.exports = EventEmitter;
474
+ }
475
+ else {
476
+ this.EventEmitter = EventEmitter;
477
+ }
478
+ }.call(this));
479
+
480
+ /*!
481
+ * eventie v1.0.4
482
+ * event binding helper
483
+ * eventie.bind( elem, 'click', myFn )
484
+ * eventie.unbind( elem, 'click', myFn )
485
+ */
486
+
487
+ /*jshint browser: true, undef: true, unused: true */
488
+ /*global define: false */
489
+
490
+ ( function( window ) {
491
+
492
+
493
+
494
+ var docElem = document.documentElement;
495
+
496
+ var bind = function() {};
497
+
498
+ function getIEEvent( obj ) {
499
+ var event = window.event;
500
+ // add event.target
501
+ event.target = event.target || event.srcElement || obj;
502
+ return event;
503
+ }
504
+
505
+ if ( docElem.addEventListener ) {
506
+ bind = function( obj, type, fn ) {
507
+ obj.addEventListener( type, fn, false );
508
+ };
509
+ } else if ( docElem.attachEvent ) {
510
+ bind = function( obj, type, fn ) {
511
+ obj[ type + fn ] = fn.handleEvent ?
512
+ function() {
513
+ var event = getIEEvent( obj );
514
+ fn.handleEvent.call( fn, event );
515
+ } :
516
+ function() {
517
+ var event = getIEEvent( obj );
518
+ fn.call( obj, event );
519
+ };
520
+ obj.attachEvent( "on" + type, obj[ type + fn ] );
521
+ };
522
+ }
523
+
524
+ var unbind = function() {};
525
+
526
+ if ( docElem.removeEventListener ) {
527
+ unbind = function( obj, type, fn ) {
528
+ obj.removeEventListener( type, fn, false );
529
+ };
530
+ } else if ( docElem.detachEvent ) {
531
+ unbind = function( obj, type, fn ) {
532
+ obj.detachEvent( "on" + type, obj[ type + fn ] );
533
+ try {
534
+ delete obj[ type + fn ];
535
+ } catch ( err ) {
536
+ // can't delete window object properties
537
+ obj[ type + fn ] = undefined;
538
+ }
539
+ };
540
+ }
541
+
542
+ var eventie = {
543
+ bind: bind,
544
+ unbind: unbind
545
+ };
546
+
547
+ // transport
548
+ if ( typeof define === 'function' && define.amd ) {
549
+ // AMD
550
+ define( 'eventie/eventie',eventie );
551
+ } else {
552
+ // browser global
553
+ window.eventie = eventie;
554
+ }
555
+
556
+ })( this );
557
+
558
+ /*!
559
+ * imagesLoaded v3.2.0
560
+ * JavaScript is all like "You images are done yet or what?"
561
+ * MIT License
562
+ */
563
+
564
+ ( function( window, factory ) { 'use strict';
565
+ // universal module definition
566
+
567
+ /*global define: false, module: false, require: false */
568
+
569
+ if ( typeof define == 'function' && define.amd ) {
570
+ // AMD
571
+ define( [
572
+ 'eventEmitter/EventEmitter',
573
+ 'eventie/eventie'
574
+ ], function( EventEmitter, eventie ) {
575
+ return factory( window, EventEmitter, eventie );
576
+ });
577
+ } else if ( typeof module == 'object' && module.exports ) {
578
+ // CommonJS
579
+ module.exports = factory(
580
+ window,
581
+ require('wolfy87-eventemitter'),
582
+ require('eventie')
583
+ );
584
+ } else {
585
+ // browser global
586
+ window.imagesLoaded = factory(
587
+ window,
588
+ window.EventEmitter,
589
+ window.eventie
590
+ );
591
+ }
592
+
593
+ })( window,
594
+
595
+ // -------------------------- factory -------------------------- //
596
+
597
+ function factory( window, EventEmitter, eventie ) {
598
+
599
+
600
+
601
+ var $ = window.jQuery;
602
+ var console = window.console;
603
+
604
+ // -------------------------- helpers -------------------------- //
605
+
606
+ // extend objects
607
+ function extend( a, b ) {
608
+ for ( var prop in b ) {
609
+ a[ prop ] = b[ prop ];
610
+ }
611
+ return a;
612
+ }
613
+
614
+ var objToString = Object.prototype.toString;
615
+ function isArray( obj ) {
616
+ return objToString.call( obj ) == '[object Array]';
617
+ }
618
+
619
+ // turn element or nodeList into an array
620
+ function makeArray( obj ) {
621
+ var ary = [];
622
+ if ( isArray( obj ) ) {
623
+ // use object if already an array
624
+ ary = obj;
625
+ } else if ( typeof obj.length == 'number' ) {
626
+ // convert nodeList to array
627
+ for ( var i=0; i < obj.length; i++ ) {
628
+ ary.push( obj[i] );
629
+ }
630
+ } else {
631
+ // array of single index
632
+ ary.push( obj );
633
+ }
634
+ return ary;
635
+ }
636
+
637
+ // -------------------------- imagesLoaded -------------------------- //
638
+
639
+ /**
640
+ * @param {Array, Element, NodeList, String} elem
641
+ * @param {Object or Function} options - if function, use as callback
642
+ * @param {Function} onAlways - callback function
643
+ */
644
+ function ImagesLoaded( elem, options, onAlways ) {
645
+ // coerce ImagesLoaded() without new, to be new ImagesLoaded()
646
+ if ( !( this instanceof ImagesLoaded ) ) {
647
+ return new ImagesLoaded( elem, options, onAlways );
648
+ }
649
+ // use elem as selector string
650
+ if ( typeof elem == 'string' ) {
651
+ elem = document.querySelectorAll( elem );
652
+ }
653
+
654
+ this.elements = makeArray( elem );
655
+ this.options = extend( {}, this.options );
656
+
657
+ if ( typeof options == 'function' ) {
658
+ onAlways = options;
659
+ } else {
660
+ extend( this.options, options );
661
+ }
662
+
663
+ if ( onAlways ) {
664
+ this.on( 'always', onAlways );
665
+ }
666
+
667
+ this.getImages();
668
+
669
+ if ( $ ) {
670
+ // add jQuery Deferred object
671
+ this.jqDeferred = new $.Deferred();
672
+ }
673
+
674
+ // HACK check async to allow time to bind listeners
675
+ var _this = this;
676
+ setTimeout( function() {
677
+ _this.check();
678
+ });
679
+ }
680
+
681
+ ImagesLoaded.prototype = new EventEmitter();
682
+
683
+ ImagesLoaded.prototype.options = {};
684
+
685
+ ImagesLoaded.prototype.getImages = function() {
686
+ this.images = [];
687
+
688
+ // filter & find items if we have an item selector
689
+ for ( var i=0; i < this.elements.length; i++ ) {
690
+ var elem = this.elements[i];
691
+ this.addElementImages( elem );
692
+ }
693
+ };
694
+
695
+ /**
696
+ * @param {Node} element
697
+ */
698
+ ImagesLoaded.prototype.addElementImages = function( elem ) {
699
+ // filter siblings
700
+ if ( elem.nodeName == 'IMG' ) {
701
+ this.addImage( elem );
702
+ }
703
+ // get background image on element
704
+ if ( this.options.background === true ) {
705
+ this.addElementBackgroundImages( elem );
706
+ }
707
+
708
+ // find children
709
+ // no non-element nodes, #143
710
+ var nodeType = elem.nodeType;
711
+ if ( !nodeType || !elementNodeTypes[ nodeType ] ) {
712
+ return;
713
+ }
714
+ var childImgs = elem.querySelectorAll('img');
715
+ // concat childElems to filterFound array
716
+ for ( var i=0; i < childImgs.length; i++ ) {
717
+ var img = childImgs[i];
718
+ this.addImage( img );
719
+ }
720
+
721
+ // get child background images
722
+ if ( typeof this.options.background == 'string' ) {
723
+ var children = elem.querySelectorAll( this.options.background );
724
+ for ( i=0; i < children.length; i++ ) {
725
+ var child = children[i];
726
+ this.addElementBackgroundImages( child );
727
+ }
728
+ }
729
+ };
730
+
731
+ var elementNodeTypes = {
732
+ 1: true,
733
+ 9: true,
734
+ 11: true
735
+ };
736
+
737
+ ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {
738
+ var style = getStyle( elem );
739
+ // get url inside url("...")
740
+ var reURL = /url\(['"]*([^'"\)]+)['"]*\)/gi;
741
+ var matches = reURL.exec( style.backgroundImage );
742
+ while ( matches !== null ) {
743
+ var url = matches && matches[1];
744
+ if ( url ) {
745
+ this.addBackground( url, elem );
746
+ }
747
+ matches = reURL.exec( style.backgroundImage );
748
+ }
749
+ };
750
+
751
+ // IE8
752
+ var getStyle = window.getComputedStyle || function( elem ) {
753
+ return elem.currentStyle;
754
+ };
755
+
756
+ /**
757
+ * @param {Image} img
758
+ */
759
+ ImagesLoaded.prototype.addImage = function( img ) {
760
+ var loadingImage = new LoadingImage( img );
761
+ this.images.push( loadingImage );
762
+ };
763
+
764
+ ImagesLoaded.prototype.addBackground = function( url, elem ) {
765
+ var background = new Background( url, elem );
766
+ this.images.push( background );
767
+ };
768
+
769
+ ImagesLoaded.prototype.check = function() {
770
+ var _this = this;
771
+ this.progressedCount = 0;
772
+ this.hasAnyBroken = false;
773
+ // complete if no images
774
+ if ( !this.images.length ) {
775
+ this.complete();
776
+ return;
777
+ }
778
+
779
+ function onProgress( image, elem, message ) {
780
+ // HACK - Chrome triggers event before object properties have changed. #83
781
+ setTimeout( function() {
782
+ _this.progress( image, elem, message );
783
+ });
784
+ }
785
+
786
+ for ( var i=0; i < this.images.length; i++ ) {
787
+ var loadingImage = this.images[i];
788
+ loadingImage.once( 'progress', onProgress );
789
+ loadingImage.check();
790
+ }
791
+ };
792
+
793
+ ImagesLoaded.prototype.progress = function( image, elem, message ) {
794
+ this.progressedCount++;
795
+ this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
796
+ // progress event
797
+ this.emit( 'progress', this, image, elem );
798
+ if ( this.jqDeferred && this.jqDeferred.notify ) {
799
+ this.jqDeferred.notify( this, image );
800
+ }
801
+ // check if completed
802
+ if ( this.progressedCount == this.images.length ) {
803
+ this.complete();
804
+ }
805
+
806
+ if ( this.options.debug && console ) {
807
+ console.log( 'progress: ' + message, image, elem );
808
+ }
809
+ };
810
+
811
+ ImagesLoaded.prototype.complete = function() {
812
+ var eventName = this.hasAnyBroken ? 'fail' : 'done';
813
+ this.isComplete = true;
814
+ this.emit( eventName, this );
815
+ this.emit( 'always', this );
816
+ if ( this.jqDeferred ) {
817
+ var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';
818
+ this.jqDeferred[ jqMethod ]( this );
819
+ }
820
+ };
821
+
822
+ // -------------------------- -------------------------- //
823
+
824
+ function LoadingImage( img ) {
825
+ this.img = img;
826
+ }
827
+
828
+ LoadingImage.prototype = new EventEmitter();
829
+
830
+ LoadingImage.prototype.check = function() {
831
+ // If complete is true and browser supports natural sizes,
832
+ // try to check for image status manually.
833
+ var isComplete = this.getIsImageComplete();
834
+ if ( isComplete ) {
835
+ // report based on naturalWidth
836
+ this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
837
+ return;
838
+ }
839
+
840
+ // If none of the checks above matched, simulate loading on detached element.
841
+ this.proxyImage = new Image();
842
+ eventie.bind( this.proxyImage, 'load', this );
843
+ eventie.bind( this.proxyImage, 'error', this );
844
+ // bind to image as well for Firefox. #191
845
+ eventie.bind( this.img, 'load', this );
846
+ eventie.bind( this.img, 'error', this );
847
+ this.proxyImage.src = this.img.src;
848
+ };
849
+
850
+ LoadingImage.prototype.getIsImageComplete = function() {
851
+ return this.img.complete && this.img.naturalWidth !== undefined;
852
+ };
853
+
854
+ LoadingImage.prototype.confirm = function( isLoaded, message ) {
855
+ this.isLoaded = isLoaded;
856
+ this.emit( 'progress', this, this.img, message );
857
+ };
858
+
859
+ // ----- events ----- //
860
+
861
+ // trigger specified handler for event type
862
+ LoadingImage.prototype.handleEvent = function( event ) {
863
+ var method = 'on' + event.type;
864
+ if ( this[ method ] ) {
865
+ this[ method ]( event );
866
+ }
867
+ };
868
+
869
+ LoadingImage.prototype.onload = function() {
870
+ this.confirm( true, 'onload' );
871
+ this.unbindEvents();
872
+ };
873
+
874
+ LoadingImage.prototype.onerror = function() {
875
+ this.confirm( false, 'onerror' );
876
+ this.unbindEvents();
877
+ };
878
+
879
+ LoadingImage.prototype.unbindEvents = function() {
880
+ eventie.unbind( this.proxyImage, 'load', this );
881
+ eventie.unbind( this.proxyImage, 'error', this );
882
+ eventie.unbind( this.img, 'load', this );
883
+ eventie.unbind( this.img, 'error', this );
884
+ };
885
+
886
+ // -------------------------- Background -------------------------- //
887
+
888
+ function Background( url, element ) {
889
+ this.url = url;
890
+ this.element = element;
891
+ this.img = new Image();
892
+ }
893
+
894
+ // inherit LoadingImage prototype
895
+ Background.prototype = new LoadingImage();
896
+
897
+ Background.prototype.check = function() {
898
+ eventie.bind( this.img, 'load', this );
899
+ eventie.bind( this.img, 'error', this );
900
+ this.img.src = this.url;
901
+ // check if image is already complete
902
+ var isComplete = this.getIsImageComplete();
903
+ if ( isComplete ) {
904
+ this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
905
+ this.unbindEvents();
906
+ }
907
+ };
908
+
909
+ Background.prototype.unbindEvents = function() {
910
+ eventie.unbind( this.img, 'load', this );
911
+ eventie.unbind( this.img, 'error', this );
912
+ };
913
+
914
+ Background.prototype.confirm = function( isLoaded, message ) {
915
+ this.isLoaded = isLoaded;
916
+ this.emit( 'progress', this, this.element, message );
917
+ };
918
+
919
+ // -------------------------- jQuery -------------------------- //
920
+
921
+ ImagesLoaded.makeJQueryPlugin = function( jQuery ) {
922
+ jQuery = jQuery || window.jQuery;
923
+ if ( !jQuery ) {
924
+ return;
925
+ }
926
+ // set local variable
927
+ $ = jQuery;
928
+ // $().imagesLoaded()
929
+ $.fn.imagesLoaded = function( options, callback ) {
930
+ var instance = new ImagesLoaded( this, options, callback );
931
+ return instance.jqDeferred.promise( $(this) );
932
+ };
933
+ };
934
+ // try making plugin
935
+ ImagesLoaded.makeJQueryPlugin();
936
+
937
+ // -------------------------- -------------------------- //
938
+
939
+ return ImagesLoaded;
940
+
941
+ });
942
+
assets/js/imagesloaded.pkgd.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*!
2
+ * imagesLoaded PACKAGED v3.2.0
3
+ * JavaScript is all like "You images are done yet or what?"
4
+ * MIT License
5
+ */
6
+
7
+ (function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,s=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),s="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(s?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,s=this.getListenersAsObject(e);for(r in s)s.hasOwnProperty(r)&&(i=t(s[r],n),-1!==i&&s[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,s=e?this.removeListener:this.addListener,o=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)s.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?s.call(this,i,r):o.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,s,o=this.getListenersAsObject(e);for(r in o)if(o.hasOwnProperty(r))for(i=o[r].length;i--;)n=o[r][i],n.once===!0&&this.removeListener(e,n.listener),s=n.listener.apply(this,t||[]),s===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=s,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var s={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",s):e.eventie=s}(this),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"==f.call(e)}function s(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0;n<e.length;n++)t.push(e[n]);else t.push(e);return t}function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=s(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),u&&(this.jqDeferred=new u.Deferred);var r=this;setTimeout(function(){r.check()})}function h(e){this.img=e}function a(e,t){this.url=e,this.element=t,this.img=new Image}var u=e.jQuery,c=e.console,f=Object.prototype.toString;o.prototype=new t,o.prototype.options={},o.prototype.getImages=function(){this.images=[];for(var e=0;e<this.elements.length;e++){var t=this.elements[e];this.addElementImages(t)}},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&d[t]){for(var n=e.querySelectorAll("img"),i=0;i<n.length;i++){var r=n[i];this.addImage(r)}if("string"==typeof this.options.background){var s=e.querySelectorAll(this.options.background);for(i=0;i<s.length;i++){var o=s[i];this.addElementBackgroundImages(o)}}}};var d={1:!0,9:!0,11:!0};o.prototype.addElementBackgroundImages=function(e){for(var t=m(e),n=/url\(['"]*([^'"\)]+)['"]*\)/gi,i=n.exec(t.backgroundImage);null!==i;){var r=i&&i[1];r&&this.addBackground(r,e),i=n.exec(t.backgroundImage)}};var m=e.getComputedStyle||function(e){return e.currentStyle};return o.prototype.addImage=function(e){var t=new h(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var n=new a(e,t);this.images.push(n)},o.prototype.check=function(){function e(e,n,i){setTimeout(function(){t.progress(e,n,i)})}var t=this;if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();for(var n=0;n<this.images.length;n++){var i=this.images[n];i.once("progress",e),i.check()}},o.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emit("progress",this,e,t),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&c&&c.log("progress: "+n,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emit(e,this),this.emit("always",this),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=new t,h.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,n.bind(this.proxyImage,"load",this),n.bind(this.proxyImage,"error",this),n.bind(this.img,"load",this),n.bind(this.img,"error",this),void(this.proxyImage.src=this.img.src))},h.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},h.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("progress",this,this.img,t)},h.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){n.unbind(this.proxyImage,"load",this),n.unbind(this.proxyImage,"error",this),n.unbind(this.img,"load",this),n.unbind(this.img,"error",this)},a.prototype=new h,a.prototype.check=function(){n.bind(this.img,"load",this),n.bind(this.img,"error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},a.prototype.unbindEvents=function(){n.unbind(this.img,"load",this),n.unbind(this.img,"error",this)},a.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("progress",this,this.element,t)},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(u=t,u.fn.imagesLoaded=function(e,t){var n=new o(this,e,t);return n.jqDeferred.promise(u(this))})},o.makeJQueryPlugin(),o});
assets/js/isotope.pkgd.js ADDED
@@ -0,0 +1,4257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Isotope PACKAGED v2.2.2
3
+ *
4
+ * Licensed GPLv3 for open source use
5
+ * or Isotope Commercial License for commercial use
6
+ *
7
+ * http://isotope.metafizzy.co
8
+ * Copyright 2015 Metafizzy
9
+ */
10
+
11
+ /**
12
+ * Bridget makes jQuery widgets
13
+ * v1.1.0
14
+ * MIT license
15
+ */
16
+
17
+ ( function( window ) {
18
+
19
+
20
+
21
+ // -------------------------- utils -------------------------- //
22
+
23
+ var slice = Array.prototype.slice;
24
+
25
+ function noop() {}
26
+
27
+ // -------------------------- definition -------------------------- //
28
+
29
+ function defineBridget( $ ) {
30
+
31
+ // bail if no jQuery
32
+ if ( !$ ) {
33
+ return;
34
+ }
35
+
36
+ // -------------------------- addOptionMethod -------------------------- //
37
+
38
+ /**
39
+ * adds option method -> $().plugin('option', {...})
40
+ * @param {Function} PluginClass - constructor class
41
+ */
42
+ function addOptionMethod( PluginClass ) {
43
+ // don't overwrite original option method
44
+ if ( PluginClass.prototype.option ) {
45
+ return;
46
+ }
47
+
48
+ // option setter
49
+ PluginClass.prototype.option = function( opts ) {
50
+ // bail out if not an object
51
+ if ( !$.isPlainObject( opts ) ){
52
+ return;
53
+ }
54
+ this.options = $.extend( true, this.options, opts );
55
+ };
56
+ }
57
+
58
+ // -------------------------- plugin bridge -------------------------- //
59
+
60
+ // helper function for logging errors
61
+ // $.error breaks jQuery chaining
62
+ var logError = typeof console === 'undefined' ? noop :
63
+ function( message ) {
64
+ console.error( message );
65
+ };
66
+
67
+ /**
68
+ * jQuery plugin bridge, access methods like $elem.plugin('method')
69
+ * @param {String} namespace - plugin name
70
+ * @param {Function} PluginClass - constructor class
71
+ */
72
+ function bridge( namespace, PluginClass ) {
73
+ // add to jQuery fn namespace
74
+ $.fn[ namespace ] = function( options ) {
75
+ if ( typeof options === 'string' ) {
76
+ // call plugin method when first argument is a string
77
+ // get arguments for method
78
+ var args = slice.call( arguments, 1 );
79
+
80
+ for ( var i=0, len = this.length; i < len; i++ ) {
81
+ var elem = this[i];
82
+ var instance = $.data( elem, namespace );
83
+ if ( !instance ) {
84
+ logError( "cannot call methods on " + namespace + " prior to initialization; " +
85
+ "attempted to call '" + options + "'" );
86
+ continue;
87
+ }
88
+ if ( !$.isFunction( instance[options] ) || options.charAt(0) === '_' ) {
89
+ logError( "no such method '" + options + "' for " + namespace + " instance" );
90
+ continue;
91
+ }
92
+
93
+ // trigger method with arguments
94
+ var returnValue = instance[ options ].apply( instance, args );
95
+
96
+ // break look and return first value if provided
97
+ if ( returnValue !== undefined ) {
98
+ return returnValue;
99
+ }
100
+ }
101
+ // return this if no return value
102
+ return this;
103
+ } else {
104
+ return this.each( function() {
105
+ var instance = $.data( this, namespace );
106
+ if ( instance ) {
107
+ // apply options & init
108
+ instance.option( options );
109
+ instance._init();
110
+ } else {
111
+ // initialize new instance
112
+ instance = new PluginClass( this, options );
113
+ $.data( this, namespace, instance );
114
+ }
115
+ });
116
+ }
117
+ };
118
+
119
+ }
120
+
121
+ // -------------------------- bridget -------------------------- //
122
+
123
+ /**
124
+ * converts a Prototypical class into a proper jQuery plugin
125
+ * the class must have a ._init method
126
+ * @param {String} namespace - plugin name, used in $().pluginName
127
+ * @param {Function} PluginClass - constructor class
128
+ */
129
+ $.bridget = function( namespace, PluginClass ) {
130
+ addOptionMethod( PluginClass );
131
+ bridge( namespace, PluginClass );
132
+ };
133
+
134
+ return $.bridget;
135
+
136
+ }
137
+
138
+ // transport
139
+ if ( typeof define === 'function' && define.amd ) {
140
+ // AMD
141
+ define( 'jquery-bridget/jquery.bridget',[ 'jquery' ], defineBridget );
142
+ } else if ( typeof exports === 'object' ) {
143
+ defineBridget( require('jquery') );
144
+ } else {
145
+ // get jquery from browser global
146
+ defineBridget( window.jQuery );
147
+ }
148
+
149
+ })( window );
150
+
151
+ /*!
152
+ * eventie v1.0.6
153
+ * event binding helper
154
+ * eventie.bind( elem, 'click', myFn )
155
+ * eventie.unbind( elem, 'click', myFn )
156
+ * MIT license
157
+ */
158
+
159
+ /*jshint browser: true, undef: true, unused: true */
160
+ /*global define: false, module: false */
161
+
162
+ ( function( window ) {
163
+
164
+
165
+
166
+ var docElem = document.documentElement;
167
+
168
+ var bind = function() {};
169
+
170
+ function getIEEvent( obj ) {
171
+ var event = window.event;
172
+ // add event.target
173
+ event.target = event.target || event.srcElement || obj;
174
+ return event;
175
+ }
176
+
177
+ if ( docElem.addEventListener ) {
178
+ bind = function( obj, type, fn ) {
179
+ obj.addEventListener( type, fn, false );
180
+ };
181
+ } else if ( docElem.attachEvent ) {
182
+ bind = function( obj, type, fn ) {
183
+ obj[ type + fn ] = fn.handleEvent ?
184
+ function() {
185
+ var event = getIEEvent( obj );
186
+ fn.handleEvent.call( fn, event );
187
+ } :
188
+ function() {
189
+ var event = getIEEvent( obj );
190
+ fn.call( obj, event );
191
+ };
192
+ obj.attachEvent( "on" + type, obj[ type + fn ] );
193
+ };
194
+ }
195
+
196
+ var unbind = function() {};
197
+
198
+ if ( docElem.removeEventListener ) {
199
+ unbind = function( obj, type, fn ) {
200
+ obj.removeEventListener( type, fn, false );
201
+ };
202
+ } else if ( docElem.detachEvent ) {
203
+ unbind = function( obj, type, fn ) {
204
+ obj.detachEvent( "on" + type, obj[ type + fn ] );
205
+ try {
206
+ delete obj[ type + fn ];
207
+ } catch ( err ) {
208
+ // can't delete window object properties
209
+ obj[ type + fn ] = undefined;
210
+ }
211
+ };
212
+ }
213
+
214
+ var eventie = {
215
+ bind: bind,
216
+ unbind: unbind
217
+ };
218
+
219
+ // ----- module definition ----- //
220
+
221
+ if ( typeof define === 'function' && define.amd ) {
222
+ // AMD
223
+ define( 'eventie/eventie',eventie );
224
+ } else if ( typeof exports === 'object' ) {
225
+ // CommonJS
226
+ module.exports = eventie;
227
+ } else {
228
+ // browser global
229
+ window.eventie = eventie;
230
+ }
231
+
232
+ })( window );
233
+
234
+ /*!
235
+ * EventEmitter v4.2.11 - git.io/ee
236
+ * Unlicense - http://unlicense.org/
237
+ * Oliver Caldwell - http://oli.me.uk/
238
+ * @preserve
239
+ */
240
+
241
+ ;(function () {
242
+ 'use strict';
243
+
244
+ /**
245
+ * Class for managing events.
246
+ * Can be extended to provide event functionality in other classes.
247
+ *
248
+ * @class EventEmitter Manages event registering and emitting.
249
+ */
250
+ function EventEmitter() {}
251
+
252
+ // Shortcuts to improve speed and size
253
+ var proto = EventEmitter.prototype;
254
+ var exports = this;
255
+ var originalGlobalValue = exports.EventEmitter;
256
+
257
+ /**
258
+ * Finds the index of the listener for the event in its storage array.
259
+ *
260
+ * @param {Function[]} listeners Array of listeners to search through.
261
+ * @param {Function} listener Method to look for.
262
+ * @return {Number} Index of the specified listener, -1 if not found
263
+ * @api private
264
+ */
265
+ function indexOfListener(listeners, listener) {
266
+ var i = listeners.length;
267
+ while (i--) {
268
+ if (listeners[i].listener === listener) {
269
+ return i;
270
+ }
271
+ }
272
+
273
+ return -1;
274
+ }
275
+
276
+ /**
277
+ * Alias a method while keeping the context correct, to allow for overwriting of target method.
278
+ *
279
+ * @param {String} name The name of the target method.
280
+ * @return {Function} The aliased method
281
+ * @api private
282
+ */
283
+ function alias(name) {
284
+ return function aliasClosure() {
285
+ return this[name].apply(this, arguments);
286
+ };
287
+ }
288
+
289
+ /**
290
+ * Returns the listener array for the specified event.
291
+ * Will initialise the event object and listener arrays if required.
292
+ * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.
293
+ * Each property in the object response is an array of listener functions.
294
+ *
295
+ * @param {String|RegExp} evt Name of the event to return the listeners from.
296
+ * @return {Function[]|Object} All listener functions for the event.
297
+ */
298
+ proto.getListeners = function getListeners(evt) {
299
+ var events = this._getEvents();
300
+ var response;
301
+ var key;
302
+
303
+ // Return a concatenated array of all matching events if
304
+ // the selector is a regular expression.
305
+ if (evt instanceof RegExp) {
306
+ response = {};
307
+ for (key in events) {
308
+ if (events.hasOwnProperty(key) && evt.test(key)) {
309
+ response[key] = events[key];
310
+ }
311
+ }
312
+ }
313
+ else {
314
+ response = events[evt] || (events[evt] = []);
315
+ }
316
+
317
+ return response;
318
+ };
319
+
320
+ /**
321
+ * Takes a list of listener objects and flattens it into a list of listener functions.
322
+ *
323
+ * @param {Object[]} listeners Raw listener objects.
324
+ * @return {Function[]} Just the listener functions.
325
+ */
326
+ proto.flattenListeners = function flattenListeners(listeners) {
327
+ var flatListeners = [];
328
+ var i;
329
+
330
+ for (i = 0; i < listeners.length; i += 1) {
331
+ flatListeners.push(listeners[i].listener);
332
+ }
333
+
334
+ return flatListeners;
335
+ };
336
+
337
+ /**
338
+ * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.
339
+ *
340
+ * @param {String|RegExp} evt Name of the event to return the listeners from.
341
+ * @return {Object} All listener functions for an event in an object.
342
+ */
343
+ proto.getListenersAsObject = function getListenersAsObject(evt) {
344
+ var listeners = this.getListeners(evt);
345
+ var response;
346
+
347
+ if (listeners instanceof Array) {
348
+ response = {};
349
+ response[evt] = listeners;
350
+ }
351
+
352
+ return response || listeners;
353
+ };
354
+
355
+ /**
356
+ * Adds a listener function to the specified event.
357
+ * The listener will not be added if it is a duplicate.
358
+ * If the listener returns true then it will be removed after it is called.
359
+ * If you pass a regular expression as the event name then the listener will be added to all events that match it.
360
+ *
361
+ * @param {String|RegExp} evt Name of the event to attach the listener to.
362
+ * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
363
+ * @return {Object} Current instance of EventEmitter for chaining.
364
+ */
365
+ proto.addListener = function addListener(evt, listener) {
366
+ var listeners = this.getListenersAsObject(evt);
367
+ var listenerIsWrapped = typeof listener === 'object';
368
+ var key;
369
+
370
+ for (key in listeners) {
371
+ if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {
372
+ listeners[key].push(listenerIsWrapped ? listener : {
373
+ listener: listener,
374
+ once: false
375
+ });
376
+ }
377
+ }
378
+
379
+ return this;
380
+ };
381
+
382
+ /**
383
+ * Alias of addListener
384
+ */
385
+ proto.on = alias('addListener');
386
+
387
+ /**
388
+ * Semi-alias of addListener. It will add a listener that will be
389
+ * automatically removed after its first execution.
390
+ *
391
+ * @param {String|RegExp} evt Name of the event to attach the listener to.
392
+ * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
393
+ * @return {Object} Current instance of EventEmitter for chaining.
394
+ */
395
+ proto.addOnceListener = function addOnceListener(evt, listener) {
396
+ return this.addListener(evt, {
397
+ listener: listener,
398
+ once: true
399
+ });
400
+ };
401
+
402
+ /**
403
+ * Alias of addOnceListener.
404
+ */
405
+ proto.once = alias('addOnceListener');
406
+
407
+ /**
408
+ * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.
409
+ * You need to tell it what event names should be matched by a regex.
410
+ *
411
+ * @param {String} evt Name of the event to create.
412
+ * @return {Object} Current instance of EventEmitter for chaining.
413
+ */
414
+ proto.defineEvent = function defineEvent(evt) {
415
+ this.getListeners(evt);
416
+ return this;
417
+ };
418
+
419
+ /**
420
+ * Uses defineEvent to define multiple events.
421
+ *
422
+ * @param {String[]} evts An array of event names to define.
423
+ * @return {Object} Current instance of EventEmitter for chaining.
424
+ */
425
+ proto.defineEvents = function defineEvents(evts) {
426
+ for (var i = 0; i < evts.length; i += 1) {
427
+ this.defineEvent(evts[i]);
428
+ }
429
+ return this;
430
+ };
431
+
432
+ /**
433
+ * Removes a listener function from the specified event.
434
+ * When passed a regular expression as the event name, it will remove the listener from all events that match it.
435
+ *
436
+ * @param {String|RegExp} evt Name of the event to remove the listener from.
437
+ * @param {Function} listener Method to remove from the event.
438
+ * @return {Object} Current instance of EventEmitter for chaining.
439
+ */
440
+ proto.removeListener = function removeListener(evt, listener) {
441
+ var listeners = this.getListenersAsObject(evt);
442
+ var index;
443
+ var key;
444
+
445
+ for (key in listeners) {
446
+ if (listeners.hasOwnProperty(key)) {
447
+ index = indexOfListener(listeners[key], listener);
448
+
449
+ if (index !== -1) {
450
+ listeners[key].splice(index, 1);
451
+ }
452
+ }
453
+ }
454
+
455
+ return this;
456
+ };
457
+
458
+ /**
459
+ * Alias of removeListener
460
+ */
461
+ proto.off = alias('removeListener');
462
+
463
+ /**
464
+ * Adds listeners in bulk using the manipulateListeners method.
465
+ * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.
466
+ * You can also pass it a regular expression to add the array of listeners to all events that match it.
467
+ * Yeah, this function does quite a bit. That's probably a bad thing.
468
+ *
469
+ * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.
470
+ * @param {Function[]} [listeners] An optional array of listener functions to add.
471
+ * @return {Object} Current instance of EventEmitter for chaining.
472
+ */
473
+ proto.addListeners = function addListeners(evt, listeners) {
474
+ // Pass through to manipulateListeners
475
+ return this.manipulateListeners(false, evt, listeners);
476
+ };
477
+
478
+ /**
479
+ * Removes listeners in bulk using the manipulateListeners method.
480
+ * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
481
+ * You can also pass it an event name and an array of listeners to be removed.
482
+ * You can also pass it a regular expression to remove the listeners from all events that match it.
483
+ *
484
+ * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.
485
+ * @param {Function[]} [listeners] An optional array of listener functions to remove.
486
+ * @return {Object} Current instance of EventEmitter for chaining.
487
+ */
488
+ proto.removeListeners = function removeListeners(evt, listeners) {
489
+ // Pass through to manipulateListeners
490
+ return this.manipulateListeners(true, evt, listeners);
491
+ };
492
+
493
+ /**
494
+ * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.
495
+ * The first argument will determine if the listeners are removed (true) or added (false).
496
+ * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
497
+ * You can also pass it an event name and an array of listeners to be added/removed.
498
+ * You can also pass it a regular expression to manipulate the listeners of all events that match it.
499
+ *
500
+ * @param {Boolean} remove True if you want to remove listeners, false if you want to add.
501
+ * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.
502
+ * @param {Function[]} [listeners] An optional array of listener functions to add/remove.
503
+ * @return {Object} Current instance of EventEmitter for chaining.
504
+ */
505
+ proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {
506
+ var i;
507
+ var value;
508
+ var single = remove ? this.removeListener : this.addListener;
509
+ var multiple = remove ? this.removeListeners : this.addListeners;
510
+
511
+ // If evt is an object then pass each of its properties to this method
512
+ if (typeof evt === 'object' && !(evt instanceof RegExp)) {
513
+ for (i in evt) {
514
+ if (evt.hasOwnProperty(i) && (value = evt[i])) {
515
+ // Pass the single listener straight through to the singular method
516
+ if (typeof value === 'function') {
517
+ single.call(this, i, value);
518
+ }
519
+ else {
520
+ // Otherwise pass back to the multiple function
521
+ multiple.call(this, i, value);
522
+ }
523
+ }
524
+ }
525
+ }
526
+ else {
527
+ // So evt must be a string
528
+ // And listeners must be an array of listeners
529
+ // Loop over it and pass each one to the multiple method
530
+ i = listeners.length;
531
+ while (i--) {
532
+ single.call(this, evt, listeners[i]);
533
+ }
534
+ }
535
+
536
+ return this;
537
+ };
538
+
539
+ /**
540
+ * Removes all listeners from a specified event.
541
+ * If you do not specify an event then all listeners will be removed.
542
+ * That means every event will be emptied.
543
+ * You can also pass a regex to remove all events that match it.
544
+ *
545
+ * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.
546
+ * @return {Object} Current instance of EventEmitter for chaining.
547
+ */
548
+ proto.removeEvent = function removeEvent(evt) {
549
+ var type = typeof evt;
550
+ var events = this._getEvents();
551
+ var key;
552
+
553
+ // Remove different things depending on the state of evt
554
+ if (type === 'string') {
555
+ // Remove all listeners for the specified event
556
+ delete events[evt];
557
+ }
558
+ else if (evt instanceof RegExp) {
559
+ // Remove all events matching the regex.
560
+ for (key in events) {
561
+ if (events.hasOwnProperty(key) && evt.test(key)) {
562
+ delete events[key];
563
+ }
564
+ }
565
+ }
566
+ else {
567
+ // Remove all listeners in all events
568
+ delete this._events;
569
+ }
570
+
571
+ return this;
572
+ };
573
+
574
+ /**
575
+ * Alias of removeEvent.
576
+ *
577
+ * Added to mirror the node API.
578
+ */
579
+ proto.removeAllListeners = alias('removeEvent');
580
+
581
+ /**
582
+ * Emits an event of your choice.
583
+ * When emitted, every listener attached to that event will be executed.
584
+ * If you pass the optional argument array then those arguments will be passed to every listener upon execution.
585
+ * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.
586
+ * So they will not arrive within the array on the other side, they will be separate.
587
+ * You can also pass a regular expression to emit to all events that match it.
588
+ *
589
+ * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
590
+ * @param {Array} [args] Optional array of arguments to be passed to each listener.
591
+ * @return {Object} Current instance of EventEmitter for chaining.
592
+ */
593
+ proto.emitEvent = function emitEvent(evt, args) {
594
+ var listeners = this.getListenersAsObject(evt);
595
+ var listener;
596
+ var i;
597
+ var key;
598
+ var response;
599
+
600
+ for (key in listeners) {
601
+ if (listeners.hasOwnProperty(key)) {
602
+ i = listeners[key].length;
603
+
604
+ while (i--) {
605
+ // If the listener returns true then it shall be removed from the event
606
+ // The function is executed either with a basic call or an apply if there is an args array
607
+ listener = listeners[key][i];
608
+
609
+ if (listener.once === true) {
610
+ this.removeListener(evt, listener.listener);
611
+ }
612
+
613
+ response = listener.listener.apply(this, args || []);
614
+
615
+ if (response === this._getOnceReturnValue()) {
616
+ this.removeListener(evt, listener.listener);
617
+ }
618
+ }
619
+ }
620
+ }
621
+
622
+ return this;
623
+ };
624
+
625
+ /**
626
+ * Alias of emitEvent
627
+ */
628
+ proto.trigger = alias('emitEvent');
629
+
630
+ /**
631
+ * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.
632
+ * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.
633
+ *
634
+ * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
635
+ * @param {...*} Optional additional arguments to be passed to each listener.
636
+ * @return {Object} Current instance of EventEmitter for chaining.
637
+ */
638
+ proto.emit = function emit(evt) {
639
+ var args = Array.prototype.slice.call(arguments, 1);
640
+ return this.emitEvent(evt, args);
641
+ };
642
+
643
+ /**
644
+ * Sets the current value to check against when executing listeners. If a
645
+ * listeners return value matches the one set here then it will be removed
646
+ * after execution. This value defaults to true.
647
+ *
648
+ * @param {*} value The new value to check for when executing listeners.
649
+ * @return {Object} Current instance of EventEmitter for chaining.
650
+ */
651
+ proto.setOnceReturnValue = function setOnceReturnValue(value) {
652
+ this._onceReturnValue = value;
653
+ return this;
654
+ };
655
+
656
+ /**
657
+ * Fetches the current value to check against when executing listeners. If
658
+ * the listeners return value matches this one then it should be removed
659
+ * automatically. It will return true by default.
660
+ *
661
+ * @return {*|Boolean} The current value to check for or the default, true.
662
+ * @api private
663
+ */
664
+ proto._getOnceReturnValue = function _getOnceReturnValue() {
665
+ if (this.hasOwnProperty('_onceReturnValue')) {
666
+ return this._onceReturnValue;
667
+ }
668
+ else {
669
+ return true;
670
+ }
671
+ };
672
+
673
+ /**
674
+ * Fetches the events object and creates one if required.
675
+ *
676
+ * @return {Object} The events storage object.
677
+ * @api private
678
+ */
679
+ proto._getEvents = function _getEvents() {
680
+ return this._events || (this._events = {});
681
+ };
682
+
683
+ /**
684
+ * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.
685
+ *
686
+ * @return {Function} Non conflicting EventEmitter class.
687
+ */
688
+ EventEmitter.noConflict = function noConflict() {
689
+ exports.EventEmitter = originalGlobalValue;
690
+ return EventEmitter;
691
+ };
692
+
693
+ // Expose the class either via AMD, CommonJS or the global object
694
+ if (typeof define === 'function' && define.amd) {
695
+ define('eventEmitter/EventEmitter',[],function () {
696
+ return EventEmitter;
697
+ });
698
+ }
699
+ else if (typeof module === 'object' && module.exports){
700
+ module.exports = EventEmitter;
701
+ }
702
+ else {
703
+ exports.EventEmitter = EventEmitter;
704
+ }
705
+ }.call(this));
706
+
707
+ /*!
708
+ * getStyleProperty v1.0.4
709
+ * original by kangax
710
+ * http://perfectionkills.com/feature-testing-css-properties/
711
+ * MIT license
712
+ */
713
+
714
+ /*jshint browser: true, strict: true, undef: true */
715
+ /*global define: false, exports: false, module: false */
716
+
717
+ ( function( window ) {
718
+
719
+
720
+
721
+ var prefixes = 'Webkit Moz ms Ms O'.split(' ');
722
+ var docElemStyle = document.documentElement.style;
723
+
724
+ function getStyleProperty( propName ) {
725
+ if ( !propName ) {
726
+ return;
727
+ }
728
+
729
+ // test standard property first
730
+ if ( typeof docElemStyle[ propName ] === 'string' ) {
731
+ return propName;
732
+ }
733
+
734
+ // capitalize
735
+ propName = propName.charAt(0).toUpperCase() + propName.slice(1);
736
+
737
+ // test vendor specific properties
738
+ var prefixed;
739
+ for ( var i=0, len = prefixes.length; i < len; i++ ) {
740
+ prefixed = prefixes[i] + propName;
741
+ if ( typeof docElemStyle[ prefixed ] === 'string' ) {
742
+ return prefixed;
743
+ }
744
+ }
745
+ }
746
+
747
+ // transport
748
+ if ( typeof define === 'function' && define.amd ) {
749
+ // AMD
750
+ define( 'get-style-property/get-style-property',[],function() {
751
+ return getStyleProperty;
752
+ });
753
+ } else if ( typeof exports === 'object' ) {
754
+ // CommonJS for Component
755
+ module.exports = getStyleProperty;
756
+ } else {
757
+ // browser global
758
+ window.getStyleProperty = getStyleProperty;
759
+ }
760
+
761
+ })( window );
762
+
763
+ /*!
764
+ * getSize v1.2.2
765
+ * measure size of elements
766
+ * MIT license
767
+ */
768
+
769
+ /*jshint browser: true, strict: true, undef: true, unused: true */
770
+ /*global define: false, exports: false, require: false, module: false, console: false */
771
+
772
+ ( function( window, undefined ) {
773
+
774
+
775
+
776
+ // -------------------------- helpers -------------------------- //
777
+
778
+ // get a number from a string, not a percentage
779
+ function getStyleSize( value ) {
780
+ var num = parseFloat( value );
781
+ // not a percent like '100%', and a number
782
+ var isValid = value.indexOf('%') === -1 && !isNaN( num );
783
+ return isValid && num;
784
+ }
785
+
786
+ function noop() {}
787
+
788
+ var logError = typeof console === 'undefined' ? noop :
789
+ function( message ) {
790
+ console.error( message );
791
+ };
792
+
793
+ // -------------------------- measurements -------------------------- //
794
+
795
+ var measurements = [
796
+ 'paddingLeft',
797
+ 'paddingRight',
798
+ 'paddingTop',
799
+ 'paddingBottom',
800
+ 'marginLeft',
801
+ 'marginRight',
802
+ 'marginTop',
803
+ 'marginBottom',
804
+ 'borderLeftWidth',
805
+ 'borderRightWidth',
806
+ 'borderTopWidth',
807
+ 'borderBottomWidth'
808
+ ];
809
+
810
+ function getZeroSize() {
811
+ var size = {
812
+ width: 0,
813
+ height: 0,
814
+ innerWidth: 0,
815
+ innerHeight: 0,
816
+ outerWidth: 0,
817
+ outerHeight: 0
818
+ };
819
+ for ( var i=0, len = measurements.length; i < len; i++ ) {
820
+ var measurement = measurements[i];
821
+ size[ measurement ] = 0;
822
+ }
823
+ return size;
824
+ }
825
+
826
+
827
+
828
+ function defineGetSize( getStyleProperty ) {
829
+
830
+ // -------------------------- setup -------------------------- //
831
+
832
+ var isSetup = false;
833
+
834
+ var getStyle, boxSizingProp, isBoxSizeOuter;
835
+
836
+ /**
837
+ * setup vars and functions
838
+ * do it on initial getSize(), rather than on script load
839
+ * For Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=548397
840
+ */
841
+ function setup() {
842
+ // setup once
843
+ if ( isSetup ) {
844
+ return;
845
+ }
846
+ isSetup = true;
847
+
848
+ var getComputedStyle = window.getComputedStyle;
849
+ getStyle = ( function() {
850
+ var getStyleFn = getComputedStyle ?
851
+ function( elem ) {
852
+ return getComputedStyle( elem, null );
853
+ } :
854
+ function( elem ) {
855
+ return elem.currentStyle;
856
+ };
857
+
858
+ return function getStyle( elem ) {
859
+ var style = getStyleFn( elem );
860
+ if ( !style ) {
861
+ logError( 'Style returned ' + style +
862
+ '. Are you running this code in a hidden iframe on Firefox? ' +
863
+ 'See http://bit.ly/getsizebug1' );
864
+ }
865
+ return style;
866
+ };
867
+ })();
868
+
869
+ // -------------------------- box sizing -------------------------- //
870
+
871
+ boxSizingProp = getStyleProperty('boxSizing');
872
+
873
+ /**
874
+ * WebKit measures the outer-width on style.width on border-box elems
875
+ * IE & Firefox measures the inner-width
876
+ */
877
+ if ( boxSizingProp ) {
878
+ var div = document.createElement('div');
879
+ div.style.width = '200px';
880
+ div.style.padding = '1px 2px 3px 4px';
881
+ div.style.borderStyle = 'solid';
882
+ div.style.borderWidth = '1px 2px 3px 4px';
883
+ div.style[ boxSizingProp ] = 'border-box';
884
+
885
+ var body = document.body || document.documentElement;
886
+ body.appendChild( div );
887
+ var style = getStyle( div );
888
+
889
+ isBoxSizeOuter = getStyleSize( style.width ) === 200;
890
+ body.removeChild( div );
891
+ }
892
+
893
+ }
894
+
895
+ // -------------------------- getSize -------------------------- //
896
+
897
+ function getSize( elem ) {
898
+ setup();
899
+
900
+ // use querySeletor if elem is string
901
+ if ( typeof elem === 'string' ) {
902
+ elem = document.querySelector( elem );
903
+ }
904
+
905
+ // do not proceed on non-objects
906
+ if ( !elem || typeof elem !== 'object' || !elem.nodeType ) {
907
+ return;
908
+ }
909
+
910
+ var style = getStyle( elem );
911
+
912
+ // if hidden, everything is 0
913
+ if ( style.display === 'none' ) {
914
+ return getZeroSize();
915
+ }
916
+
917
+ var size = {};
918
+ size.width = elem.offsetWidth;
919
+ size.height = elem.offsetHeight;
920
+
921
+ var isBorderBox = size.isBorderBox = !!( boxSizingProp &&
922
+ style[ boxSizingProp ] && style[ boxSizingProp ] === 'border-box' );
923
+
924
+ // get all measurements
925
+ for ( var i=0, len = measurements.length; i < len; i++ ) {
926
+ var measurement = measurements[i];
927
+ var value = style[ measurement ];
928
+ value = mungeNonPixel( elem, value );
929
+ var num = parseFloat( value );
930
+ // any 'auto', 'medium' value will be 0
931
+ size[ measurement ] = !isNaN( num ) ? num : 0;
932
+ }
933
+
934
+ var paddingWidth = size.paddingLeft + size.paddingRight;
935
+ var paddingHeight = size.paddingTop + size.paddingBottom;
936
+ var marginWidth = size.marginLeft + size.marginRight;
937
+ var marginHeight = size.marginTop + size.marginBottom;
938
+ var borderWidth = size.borderLeftWidth + size.borderRightWidth;
939
+ var borderHeight = size.borderTopWidth + size.borderBottomWidth;
940
+
941
+ var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;
942
+
943
+ // overwrite width and height if we can get it from style
944
+ var styleWidth = getStyleSize( style.width );
945
+ if ( styleWidth !== false ) {
946
+ size.width = styleWidth +
947
+ // add padding and border unless it's already including it
948
+ ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );
949
+ }
950
+
951
+ var styleHeight = getStyleSize( style.height );
952
+ if ( styleHeight !== false ) {
953
+ size.height = styleHeight +
954
+ // add padding and border unless it's already including it
955
+ ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );
956
+ }
957
+
958
+ size.innerWidth = size.width - ( paddingWidth + borderWidth );
959
+ size.innerHeight = size.height - ( paddingHeight + borderHeight );
960
+
961
+ size.outerWidth = size.width + marginWidth;
962
+ size.outerHeight = size.height + marginHeight;
963
+
964
+ return size;
965
+ }
966
+
967
+ // IE8 returns percent values, not pixels
968
+ // taken from jQuery's curCSS
969
+ function mungeNonPixel( elem, value ) {
970
+ // IE8 and has percent value
971
+ if ( window.getComputedStyle || value.indexOf('%') === -1 ) {
972
+ return value;
973
+ }
974
+ var style = elem.style;
975
+ // Remember the original values
976
+ var left = style.left;
977
+ var rs = elem.runtimeStyle;
978
+ var rsLeft = rs && rs.left;
979
+
980
+ // Put in the new values to get a computed value out
981
+ if ( rsLeft ) {
982
+ rs.left = elem.currentStyle.left;
983
+ }
984
+ style.left = value;
985
+ value = style.pixelLeft;
986
+
987
+ // Revert the changed values
988
+ style.left = left;
989
+ if ( rsLeft ) {
990
+ rs.left = rsLeft;
991
+ }
992
+
993
+ return value;
994
+ }
995
+
996
+ return getSize;
997
+
998
+ }
999
+
1000
+ // transport
1001
+ if ( typeof define === 'function' && define.amd ) {
1002
+ // AMD for RequireJS
1003
+ define( 'get-size/get-size',[ 'get-style-property/get-style-property' ], defineGetSize );
1004
+ } else if ( typeof exports === 'object' ) {
1005
+ // CommonJS for Component
1006
+ module.exports = defineGetSize( require('desandro-get-style-property') );
1007
+ } else {
1008
+ // browser global
1009
+ window.getSize = defineGetSize( window.getStyleProperty );
1010
+ }
1011
+
1012
+ })( window );
1013
+
1014
+ /*!
1015
+ * docReady v1.0.4
1016
+ * Cross browser DOMContentLoaded event emitter
1017
+ * MIT license
1018
+ */
1019
+
1020
+ /*jshint browser: true, strict: true, undef: true, unused: true*/
1021
+ /*global define: false, require: false, module: false */
1022
+
1023
+ ( function( window ) {
1024
+
1025
+
1026
+
1027
+ var document = window.document;
1028
+ // collection of functions to be triggered on ready
1029
+ var queue = [];
1030
+
1031
+ function docReady( fn ) {
1032
+ // throw out non-functions
1033
+ if ( typeof fn !== 'function' ) {
1034
+ return;
1035
+ }
1036
+
1037
+ if ( docReady.isReady ) {
1038
+ // ready now, hit it
1039
+ fn();
1040
+ } else {
1041
+ // queue function when ready
1042
+ queue.push( fn );
1043
+ }
1044
+ }
1045
+
1046
+ docReady.isReady = false;
1047
+
1048
+ // triggered on various doc ready events
1049
+ function onReady( event ) {
1050
+ // bail if already triggered or IE8 document is not ready just yet
1051
+ var isIE8NotReady = event.type === 'readystatechange' && document.readyState !== 'complete';
1052
+ if ( docReady.isReady || isIE8NotReady ) {
1053
+ return;
1054
+ }
1055
+
1056
+ trigger();
1057
+ }
1058
+
1059
+ function trigger() {
1060
+ docReady.isReady = true;
1061
+ // process queue
1062
+ for ( var i=0, len = queue.length; i < len; i++ ) {
1063
+ var fn = queue[i];
1064
+ fn();
1065
+ }
1066
+ }
1067
+
1068
+ function defineDocReady( eventie ) {
1069
+ // trigger ready if page is ready
1070
+ if ( document.readyState === 'complete' ) {
1071
+ trigger();
1072
+ } else {
1073
+ // listen for events
1074
+ eventie.bind( document, 'DOMContentLoaded', onReady );
1075
+ eventie.bind( document, 'readystatechange', onReady );
1076
+ eventie.bind( window, 'load', onReady );
1077
+ }
1078
+
1079
+ return docReady;
1080
+ }
1081
+
1082
+ // transport
1083
+ if ( typeof define === 'function' && define.amd ) {
1084
+ // AMD
1085
+ define( 'doc-ready/doc-ready',[ 'eventie/eventie' ], defineDocReady );
1086
+ } else if ( typeof exports === 'object' ) {
1087
+ module.exports = defineDocReady( require('eventie') );
1088
+ } else {
1089
+ // browser global
1090
+ window.docReady = defineDocReady( window.eventie );
1091
+ }
1092
+
1093
+ })( window );
1094
+
1095
+ /**
1096
+ * matchesSelector v1.0.3
1097
+ * matchesSelector( element, '.selector' )
1098
+ * MIT license
1099
+ */
1100
+
1101
+ /*jshint browser: true, strict: true, undef: true, unused: true */
1102
+ /*global define: false, module: false */
1103
+
1104
+ ( function( ElemProto ) {
1105
+
1106
+ 'use strict';
1107
+
1108
+ var matchesMethod = ( function() {
1109
+ // check for the standard method name first
1110
+ if ( ElemProto.matches ) {
1111
+ return 'matches';
1112
+ }
1113
+ // check un-prefixed
1114
+ if ( ElemProto.matchesSelector ) {
1115
+ return 'matchesSelector';
1116
+ }
1117
+ // check vendor prefixes
1118
+ var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];
1119
+
1120
+ for ( var i=0, len = prefixes.length; i < len; i++ ) {
1121
+ var prefix = prefixes[i];
1122
+ var method = prefix + 'MatchesSelector';
1123
+ if ( ElemProto[ method ] ) {
1124
+ return method;
1125
+ }
1126
+ }
1127
+ })();
1128
+
1129
+ // ----- match ----- //
1130
+
1131
+ function match( elem, selector ) {
1132
+ return elem[ matchesMethod ]( selector );
1133
+ }
1134
+
1135
+ // ----- appendToFragment ----- //
1136
+
1137
+ function checkParent( elem ) {
1138
+ // not needed if already has parent
1139
+ if ( elem.parentNode ) {
1140
+ return;
1141
+ }
1142
+ var fragment = document.createDocumentFragment();
1143
+ fragment.appendChild( elem );
1144
+ }
1145
+
1146
+ // ----- query ----- //
1147
+
1148
+ // fall back to using QSA
1149
+ // thx @jonathantneal https://gist.github.com/3062955
1150
+ function query( elem, selector ) {
1151
+ // append to fragment if no parent
1152
+ checkParent( elem );
1153
+
1154
+ // match elem with all selected elems of parent
1155
+ var elems = elem.parentNode.querySelectorAll( selector );
1156
+ for ( var i=0, len = elems.length; i < len; i++ ) {
1157
+ // return true if match
1158
+ if ( elems[i] === elem ) {
1159
+ return true;
1160
+ }
1161
+ }
1162
+ // otherwise return false
1163
+ return false;
1164
+ }
1165
+
1166
+ // ----- matchChild ----- //
1167
+
1168
+ function matchChild( elem, selector ) {
1169
+ checkParent( elem );
1170
+ return match( elem, selector );
1171
+ }
1172
+
1173
+ // ----- matchesSelector ----- //
1174
+
1175
+ var matchesSelector;
1176
+
1177
+ if ( matchesMethod ) {
1178
+ // IE9 supports matchesSelector, but doesn't work on orphaned elems
1179
+ // check for that
1180
+ var div = document.createElement('div');
1181
+ var supportsOrphans = match( div, 'div' );
1182
+ matchesSelector = supportsOrphans ? match : matchChild;
1183
+ } else {
1184
+ matchesSelector = query;
1185
+ }
1186
+
1187
+ // transport
1188
+ if ( typeof define === 'function' && define.amd ) {
1189
+ // AMD
1190
+ define( 'matches-selector/matches-selector',[],function() {
1191
+ return matchesSelector;
1192
+ });
1193
+ } else if ( typeof exports === 'object' ) {
1194
+ module.exports = matchesSelector;
1195
+ }
1196
+ else {
1197
+ // browser global
1198
+ window.matchesSelector = matchesSelector;
1199
+ }
1200
+
1201
+ })( Element.prototype );
1202
+
1203
+ /**
1204
+ * Fizzy UI utils v1.0.1
1205
+ * MIT license
1206
+ */
1207
+
1208
+ /*jshint browser: true, undef: true, unused: true, strict: true */
1209
+
1210
+ ( function( window, factory ) {
1211
+ /*global define: false, module: false, require: false */
1212
+ 'use strict';
1213
+ // universal module definition
1214
+
1215
+ if ( typeof define == 'function' && define.amd ) {
1216
+ // AMD
1217
+ define( 'fizzy-ui-utils/utils',[
1218
+ 'doc-ready/doc-ready',
1219
+ 'matches-selector/matches-selector'
1220
+ ], function( docReady, matchesSelector ) {
1221
+ return factory( window, docReady, matchesSelector );
1222
+ });
1223
+ } else if ( typeof exports == 'object' ) {
1224
+ // CommonJS
1225
+ module.exports = factory(
1226
+ window,
1227
+ require('doc-ready'),
1228
+ require('desandro-matches-selector')
1229
+ );
1230
+ } else {
1231
+ // browser global
1232
+ window.fizzyUIUtils = factory(
1233
+ window,
1234
+ window.docReady,
1235
+ window.matchesSelector
1236
+ );
1237
+ }
1238
+
1239
+ }( window, function factory( window, docReady, matchesSelector ) {
1240
+
1241
+
1242
+
1243
+ var utils = {};
1244
+
1245
+ // ----- extend ----- //
1246
+
1247
+ // extends objects
1248
+ utils.extend = function( a, b ) {
1249
+ for ( var prop in b ) {
1250
+ a[ prop ] = b[ prop ];
1251
+ }
1252
+ return a;
1253
+ };
1254
+
1255
+ // ----- modulo ----- //
1256
+
1257
+ utils.modulo = function( num, div ) {
1258
+ return ( ( num % div ) + div ) % div;
1259
+ };
1260
+
1261
+ // ----- isArray ----- //
1262
+
1263
+ var objToString = Object.prototype.toString;
1264
+ utils.isArray = function( obj ) {
1265
+ return objToString.call( obj ) == '[object Array]';
1266
+ };
1267
+
1268
+ // ----- makeArray ----- //
1269
+
1270
+ // turn element or nodeList into an array
1271
+ utils.makeArray = function( obj ) {
1272
+ var ary = [];
1273
+ if ( utils.isArray( obj ) ) {
1274
+ // use object if already an array
1275
+ ary = obj;
1276
+ } else if ( obj && typeof obj.length == 'number' ) {
1277
+ // convert nodeList to array
1278
+ for ( var i=0, len = obj.length; i < len; i++ ) {
1279
+ ary.push( obj[i] );
1280
+ }
1281
+ } else {
1282
+ // array of single index
1283
+ ary.push( obj );
1284
+ }
1285
+ return ary;
1286
+ };
1287
+
1288
+ // ----- indexOf ----- //
1289
+
1290
+ // index of helper cause IE8
1291
+ utils.indexOf = Array.prototype.indexOf ? function( ary, obj ) {
1292
+ return ary.indexOf( obj );
1293
+ } : function( ary, obj ) {
1294
+ for ( var i=0, len = ary.length; i < len; i++ ) {
1295
+ if ( ary[i] === obj ) {
1296
+ return i;
1297
+ }
1298
+ }
1299
+ return -1;
1300
+ };
1301
+
1302
+ // ----- removeFrom ----- //
1303
+
1304
+ utils.removeFrom = function( ary, obj ) {
1305
+ var index = utils.indexOf( ary, obj );
1306
+ if ( index != -1 ) {
1307
+ ary.splice( index, 1 );
1308
+ }
1309
+ };
1310
+
1311
+ // ----- isElement ----- //
1312
+
1313
+ // http://stackoverflow.com/a/384380/182183
1314
+ utils.isElement = ( typeof HTMLElement == 'function' || typeof HTMLElement == 'object' ) ?
1315
+ function isElementDOM2( obj ) {
1316
+ return obj instanceof HTMLElement;
1317
+ } :
1318
+ function isElementQuirky( obj ) {
1319
+ return obj && typeof obj == 'object' &&
1320
+ obj.nodeType == 1 && typeof obj.nodeName == 'string';
1321
+ };
1322
+
1323
+ // ----- setText ----- //
1324
+
1325
+ utils.setText = ( function() {
1326
+ var setTextProperty;
1327
+ function setText( elem, text ) {
1328
+ // only check setTextProperty once
1329
+ setTextProperty = setTextProperty || ( document.documentElement.textContent !== undefined ? 'textContent' : 'innerText' );
1330
+ elem[ setTextProperty ] = text;
1331
+ }
1332
+ return setText;
1333
+ })();
1334
+
1335
+ // ----- getParent ----- //
1336
+
1337
+ utils.getParent = function( elem, selector ) {
1338
+ while ( elem != document.body ) {
1339
+ elem = elem.parentNode;
1340
+ if ( matchesSelector( elem, selector ) ) {
1341
+ return elem;
1342
+ }
1343
+ }
1344
+ };
1345
+
1346
+ // ----- getQueryElement ----- //
1347
+
1348
+ // use element as selector string
1349
+ utils.getQueryElement = function( elem ) {
1350
+ if ( typeof elem == 'string' ) {
1351
+ return document.querySelector( elem );
1352
+ }
1353
+ return elem;
1354
+ };
1355
+
1356
+ // ----- handleEvent ----- //
1357
+
1358
+ // enable .ontype to trigger from .addEventListener( elem, 'type' )
1359
+ utils.handleEvent = function( event ) {
1360
+ var method = 'on' + event.type;
1361
+ if ( this[ method ] ) {
1362
+ this[ method ]( event );
1363
+ }
1364
+ };
1365
+
1366
+ // ----- filterFindElements ----- //
1367
+
1368
+ utils.filterFindElements = function( elems, selector ) {
1369
+ // make array of elems
1370
+ elems = utils.makeArray( elems );
1371
+ var ffElems = [];
1372
+
1373
+ for ( var i=0, len = elems.length; i < len; i++ ) {
1374
+ var elem = elems[i];
1375
+ // check that elem is an actual element
1376
+ if ( !utils.isElement( elem ) ) {
1377
+ continue;
1378
+ }
1379
+ // filter & find items if we have a selector
1380
+ if ( selector ) {
1381
+ // filter siblings
1382
+ if ( matchesSelector( elem, selector ) ) {
1383
+ ffElems.push( elem );
1384
+ }
1385
+ // find children
1386
+ var childElems = elem.querySelectorAll( selector );
1387
+ // concat childElems to filterFound array
1388
+ for ( var j=0, jLen = childElems.length; j < jLen; j++ ) {
1389
+ ffElems.push( childElems[j] );
1390
+ }
1391
+ } else {
1392
+ ffElems.push( elem );
1393
+ }
1394
+ }
1395
+
1396
+ return ffElems;
1397
+ };
1398
+
1399
+ // ----- debounceMethod ----- //
1400
+
1401
+ utils.debounceMethod = function( _class, methodName, threshold ) {
1402
+ // original method
1403
+ var method = _class.prototype[ methodName ];
1404
+ var timeoutName = methodName + 'Timeout';
1405
+
1406
+ _class.prototype[ methodName ] = function() {
1407
+ var timeout = this[ timeoutName ];
1408
+ if ( timeout ) {
1409
+ clearTimeout( timeout );
1410
+ }
1411
+ var args = arguments;
1412
+
1413
+ var _this = this;
1414
+ this[ timeoutName ] = setTimeout( function() {
1415
+ method.apply( _this, args );
1416
+ delete _this[ timeoutName ];
1417
+ }, threshold || 100 );
1418
+ };
1419
+ };
1420
+
1421
+ // ----- htmlInit ----- //
1422
+
1423
+ // http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
1424
+ utils.toDashed = function( str ) {
1425
+ return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {
1426
+ return $1 + '-' + $2;
1427
+ }).toLowerCase();
1428
+ };
1429
+
1430
+ var console = window.console;
1431
+ /**
1432
+ * allow user to initialize classes via .js-namespace class
1433
+ * htmlInit( Widget, 'widgetName' )
1434
+ * options are parsed from data-namespace-option attribute
1435
+ */
1436
+ utils.htmlInit = function( WidgetClass, namespace ) {
1437
+ docReady( function() {
1438
+ var dashedNamespace = utils.toDashed( namespace );
1439
+ var elems = document.querySelectorAll( '.js-' + dashedNamespace );
1440
+ var dataAttr = 'data-' + dashedNamespace + '-options';
1441
+
1442
+ for ( var i=0, len = elems.length; i < len; i++ ) {
1443
+ var elem = elems[i];
1444
+ var attr = elem.getAttribute( dataAttr );
1445
+ var options;
1446
+ try {
1447
+ options = attr && JSON.parse( attr );
1448
+ } catch ( error ) {
1449
+ // log error, do not initialize
1450
+ if ( console ) {
1451
+ console.error( 'Error parsing ' + dataAttr + ' on ' +
1452
+ elem.nodeName.toLowerCase() + ( elem.id ? '#' + elem.id : '' ) + ': ' +
1453
+ error );
1454
+ }
1455
+ continue;
1456
+ }
1457
+ // initialize
1458
+ var instance = new WidgetClass( elem, options );
1459
+ // make available via $().data('layoutname')
1460
+ var jQuery = window.jQuery;
1461
+ if ( jQuery ) {
1462
+ jQuery.data( elem, namespace, instance );
1463
+ }
1464
+ }
1465
+ });
1466
+ };
1467
+
1468
+ // ----- ----- //
1469
+
1470
+ return utils;
1471
+
1472
+ }));
1473
+
1474
+ /**
1475
+ * Outlayer Item
1476
+ */
1477
+
1478
+ ( function( window, factory ) {
1479
+ 'use strict';
1480
+ // universal module definition
1481
+ if ( typeof define === 'function' && define.amd ) {
1482
+ // AMD
1483
+ define( 'outlayer/item',[
1484
+ 'eventEmitter/EventEmitter',
1485
+ 'get-size/get-size',
1486
+ 'get-style-property/get-style-property',
1487
+ 'fizzy-ui-utils/utils'
1488
+ ],
1489
+ function( EventEmitter, getSize, getStyleProperty, utils ) {
1490
+ return factory( window, EventEmitter, getSize, getStyleProperty, utils );
1491
+ }
1492
+ );
1493
+ } else if (typeof exports === 'object') {
1494
+ // CommonJS
1495
+ module.exports = factory(
1496
+ window,
1497
+ require('wolfy87-eventemitter'),
1498
+ require('get-size'),
1499
+ require('desandro-get-style-property'),
1500
+ require('fizzy-ui-utils')
1501
+ );
1502
+ } else {
1503
+ // browser global
1504
+ window.Outlayer = {};
1505
+ window.Outlayer.Item = factory(
1506
+ window,
1507
+ window.EventEmitter,
1508
+ window.getSize,
1509
+ window.getStyleProperty,
1510
+ window.fizzyUIUtils
1511
+ );
1512
+ }
1513
+
1514
+ }( window, function factory( window, EventEmitter, getSize, getStyleProperty, utils ) {
1515
+ 'use strict';
1516
+
1517
+ // ----- helpers ----- //
1518
+
1519
+ var getComputedStyle = window.getComputedStyle;
1520
+ var getStyle = getComputedStyle ?
1521
+ function( elem ) {
1522
+ return getComputedStyle( elem, null );
1523
+ } :
1524
+ function( elem ) {
1525
+ return elem.currentStyle;
1526
+ };
1527
+
1528
+
1529
+ function isEmptyObj( obj ) {
1530
+ for ( var prop in obj ) {
1531
+ return false;
1532
+ }
1533
+ prop = null;
1534
+ return true;
1535
+ }
1536
+
1537
+ // -------------------------- CSS3 support -------------------------- //
1538
+
1539
+ var transitionProperty = getStyleProperty('transition');
1540
+ var transformProperty = getStyleProperty('transform');
1541
+ var supportsCSS3 = transitionProperty && transformProperty;
1542
+ var is3d = !!getStyleProperty('perspective');
1543
+
1544
+ var transitionEndEvent = {
1545
+ WebkitTransition: 'webkitTransitionEnd',
1546
+ MozTransition: 'transitionend',
1547
+ OTransition: 'otransitionend',
1548
+ transition: 'transitionend'
1549
+ }[ transitionProperty ];
1550
+
1551
+ // properties that could have vendor prefix
1552
+ var prefixableProperties = [
1553
+ 'transform',
1554
+ 'transition',
1555
+ 'transitionDuration',
1556
+ 'transitionProperty'
1557
+ ];
1558
+
1559
+ // cache all vendor properties
1560
+ var vendorProperties = ( function() {
1561
+ var cache = {};
1562
+ for ( var i=0, len = prefixableProperties.length; i < len; i++ ) {
1563
+ var prop = prefixableProperties[i];
1564
+ var supportedProp = getStyleProperty( prop );
1565
+ if ( supportedProp && supportedProp !== prop ) {
1566
+ cache[ prop ] = supportedProp;
1567
+ }
1568
+ }
1569
+ return cache;
1570
+ })();
1571
+
1572
+ // -------------------------- Item -------------------------- //
1573
+
1574
+ function Item( element, layout ) {
1575
+ if ( !element ) {
1576
+ return;
1577
+ }
1578
+
1579
+ this.element = element;
1580
+ // parent layout class, i.e. Masonry, Isotope, or Packery
1581
+ this.layout = layout;
1582
+ this.position = {
1583
+ x: 0,
1584
+ y: 0
1585
+ };
1586
+
1587
+ this._create();
1588
+ }
1589
+
1590
+ // inherit EventEmitter
1591
+ utils.extend( Item.prototype, EventEmitter.prototype );
1592
+
1593
+ Item.prototype._create = function() {
1594
+ // transition objects
1595
+ this._transn = {
1596
+ ingProperties: {},
1597
+ clean: {},
1598
+ onEnd: {}
1599
+ };
1600
+
1601
+ this.css({
1602
+ position: 'absolute'
1603
+ });
1604
+ };
1605
+
1606
+ // trigger specified handler for event type
1607
+ Item.prototype.handleEvent = function( event ) {
1608
+ var method = 'on' + event.type;
1609
+ if ( this[ method ] ) {
1610
+ this[ method ]( event );
1611
+ }
1612
+ };
1613
+
1614
+ Item.prototype.getSize = function() {
1615
+ this.size = getSize( this.element );
1616
+ };
1617
+
1618
+ /**
1619
+ * apply CSS styles to element
1620
+ * @param {Object} style
1621
+ */
1622
+ Item.prototype.css = function( style ) {
1623
+ var elemStyle = this.element.style;
1624
+
1625
+ for ( var prop in style ) {
1626
+ // use vendor property if available
1627
+ var supportedProp = vendorProperties[ prop ] || prop;
1628
+ elemStyle[ supportedProp ] = style[ prop ];
1629
+ }
1630
+ };
1631
+
1632
+ // measure position, and sets it
1633
+ Item.prototype.getPosition = function() {
1634
+ var style = getStyle( this.element );
1635
+ var layoutOptions = this.layout.options;
1636
+ var isOriginLeft = layoutOptions.isOriginLeft;
1637
+ var isOriginTop = layoutOptions.isOriginTop;
1638
+ var xValue = style[ isOriginLeft ? 'left' : 'right' ];
1639
+ var yValue = style[ isOriginTop ? 'top' : 'bottom' ];
1640
+ // convert percent to pixels
1641
+ var layoutSize = this.layout.size;
1642
+ var x = xValue.indexOf('%') != -1 ?
1643
+ ( parseFloat( xValue ) / 100 ) * layoutSize.width : parseInt( xValue, 10 );
1644
+ var y = yValue.indexOf('%') != -1 ?
1645
+ ( parseFloat( yValue ) / 100 ) * layoutSize.height : parseInt( yValue, 10 );
1646
+
1647
+ // clean up 'auto' or other non-integer values
1648
+ x = isNaN( x ) ? 0 : x;
1649
+ y = isNaN( y ) ? 0 : y;
1650
+ // remove padding from measurement
1651
+ x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight;
1652
+ y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom;
1653
+
1654
+ this.position.x = x;
1655
+ this.position.y = y;
1656
+ };
1657
+
1658
+ // set settled position, apply padding
1659
+ Item.prototype.layoutPosition = function() {
1660
+ var layoutSize = this.layout.size;
1661
+ var layoutOptions = this.layout.options;
1662
+ var style = {};
1663
+
1664
+ // x
1665
+ var xPadding = layoutOptions.isOriginLeft ? 'paddingLeft' : 'paddingRight';
1666
+ var xProperty = layoutOptions.isOriginLeft ? 'left' : 'right';
1667
+ var xResetProperty = layoutOptions.isOriginLeft ? 'right' : 'left';
1668
+
1669
+ var x = this.position.x + layoutSize[ xPadding ];
1670
+ // set in percentage or pixels
1671
+ style[ xProperty ] = this.getXValue( x );
1672
+ // reset other property
1673
+ style[ xResetProperty ] = '';
1674
+
1675
+ // y
1676
+ var yPadding = layoutOptions.isOriginTop ? 'paddingTop' : 'paddingBottom';
1677
+ var yProperty = layoutOptions.isOriginTop ? 'top' : 'bottom';
1678
+ var yResetProperty = layoutOptions.isOriginTop ? 'bottom' : 'top';
1679
+
1680
+ var y = this.position.y + layoutSize[ yPadding ];
1681
+ // set in percentage or pixels
1682
+ style[ yProperty ] = this.getYValue( y );
1683
+ // reset other property
1684
+ style[ yResetProperty ] = '';
1685
+
1686
+ this.css( style );
1687
+ this.emitEvent( 'layout', [ this ] );
1688
+ };
1689
+
1690
+ Item.prototype.getXValue = function( x ) {
1691
+ var layoutOptions = this.layout.options;
1692
+ return layoutOptions.percentPosition && !layoutOptions.isHorizontal ?
1693
+ ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px';
1694
+ };
1695
+
1696
+ Item.prototype.getYValue = function( y ) {
1697
+ var layoutOptions = this.layout.options;
1698
+ return layoutOptions.percentPosition && layoutOptions.isHorizontal ?
1699
+ ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px';
1700
+ };
1701
+
1702
+
1703
+ Item.prototype._transitionTo = function( x, y ) {
1704
+ this.getPosition();
1705
+ // get current x & y from top/left
1706
+ var curX = this.position.x;
1707
+ var curY = this.position.y;
1708
+
1709
+ var compareX = parseInt( x, 10 );
1710
+ var compareY = parseInt( y, 10 );
1711
+ var didNotMove = compareX === this.position.x && compareY === this.position.y;
1712
+
1713
+ // save end position
1714
+ this.setPosition( x, y );
1715
+
1716
+ // if did not move and not transitioning, just go to layout
1717
+ if ( didNotMove && !this.isTransitioning ) {
1718
+ this.layoutPosition();
1719
+ return;
1720
+ }
1721
+
1722
+ var transX = x - curX;
1723
+ var transY = y - curY;
1724
+ var transitionStyle = {};
1725
+ transitionStyle.transform = this.getTranslate( transX, transY );
1726
+
1727
+ this.transition({
1728
+ to: transitionStyle,
1729
+ onTransitionEnd: {
1730
+ transform: this.layoutPosition
1731
+ },
1732
+ isCleaning: true
1733
+ });
1734
+ };
1735
+
1736
+ Item.prototype.getTranslate = function( x, y ) {
1737
+ // flip cooridinates if origin on right or bottom
1738
+ var layoutOptions = this.layout.options;
1739
+ x = layoutOptions.isOriginLeft ? x : -x;
1740
+ y = layoutOptions.isOriginTop ? y : -y;
1741
+
1742
+ if ( is3d ) {
1743
+ return 'translate3d(' + x + 'px, ' + y + 'px, 0)';
1744
+ }
1745
+
1746
+ return 'translate(' + x + 'px, ' + y + 'px)';
1747
+ };
1748
+
1749
+ // non transition + transform support
1750
+ Item.prototype.goTo = function( x, y ) {
1751
+ this.setPosition( x, y );
1752
+ this.layoutPosition();
1753
+ };
1754
+
1755
+ // use transition and transforms if supported
1756
+ Item.prototype.moveTo = supportsCSS3 ?
1757
+ Item.prototype._transitionTo : Item.prototype.goTo;
1758
+
1759
+ Item.prototype.setPosition = function( x, y ) {
1760
+ this.position.x = parseInt( x, 10 );
1761
+ this.position.y = parseInt( y, 10 );
1762
+ };
1763
+
1764
+ // ----- transition ----- //
1765
+
1766
+ /**
1767
+ * @param {Object} style - CSS
1768
+ * @param {Function} onTransitionEnd
1769
+ */
1770
+
1771
+ // non transition, just trigger callback
1772
+ Item.prototype._nonTransition = function( args ) {
1773
+ this.css( args.to );
1774
+ if ( args.isCleaning ) {
1775
+ this._removeStyles( args.to );
1776
+ }
1777
+ for ( var prop in args.onTransitionEnd ) {
1778
+ args.onTransitionEnd[ prop ].call( this );
1779
+ }
1780
+ };
1781
+
1782
+ /**
1783
+ * proper transition
1784
+ * @param {Object} args - arguments
1785
+ * @param {Object} to - style to transition to
1786
+ * @param {Object} from - style to start transition from
1787
+ * @param {Boolean} isCleaning - removes transition styles after transition
1788
+ * @param {Function} onTransitionEnd - callback
1789
+ */
1790
+ Item.prototype._transition = function( args ) {
1791
+ // redirect to nonTransition if no transition duration
1792
+ if ( !parseFloat( this.layout.options.transitionDuration ) ) {
1793
+ this._nonTransition( args );
1794
+ return;
1795
+ }
1796
+
1797
+ var _transition = this._transn;
1798
+ // keep track of onTransitionEnd callback by css property
1799
+ for ( var prop in args.onTransitionEnd ) {
1800
+ _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ];
1801
+ }
1802
+ // keep track of properties that are transitioning
1803
+ for ( prop in args.to ) {
1804
+ _transition.ingProperties[ prop ] = true;
1805
+ // keep track of properties to clean up when transition is done
1806
+ if ( args.isCleaning ) {
1807
+ _transition.clean[ prop ] = true;
1808
+ }
1809
+ }
1810
+
1811
+ // set from styles
1812
+ if ( args.from ) {
1813
+ this.css( args.from );
1814
+ // force redraw. http://blog.alexmaccaw.com/css-transitions
1815
+ var h = this.element.offsetHeight;
1816
+ // hack for JSHint to hush about unused var
1817
+ h = null;
1818
+ }
1819
+ // enable transition
1820
+ this.enableTransition( args.to );
1821
+ // set styles that are transitioning
1822
+ this.css( args.to );
1823
+
1824
+ this.isTransitioning = true;
1825
+
1826
+ };
1827
+
1828
+ // dash before all cap letters, including first for
1829
+ // WebkitTransform => -webkit-transform
1830
+ function toDashedAll( str ) {
1831
+ return str.replace( /([A-Z])/g, function( $1 ) {
1832
+ return '-' + $1.toLowerCase();
1833
+ });
1834
+ }
1835
+
1836
+ var transitionProps = 'opacity,' +
1837
+ toDashedAll( vendorProperties.transform || 'transform' );
1838
+
1839
+ Item.prototype.enableTransition = function(/* style */) {
1840
+ // HACK changing transitionProperty during a transition
1841
+ // will cause transition to jump
1842
+ if ( this.isTransitioning ) {
1843
+ return;
1844
+ }
1845
+
1846
+ // make `transition: foo, bar, baz` from style object
1847
+ // HACK un-comment this when enableTransition can work
1848
+ // while a transition is happening
1849
+ // var transitionValues = [];
1850
+ // for ( var prop in style ) {
1851
+ // // dash-ify camelCased properties like WebkitTransition
1852
+ // prop = vendorProperties[ prop ] || prop;
1853
+ // transitionValues.push( toDashedAll( prop ) );
1854
+ // }
1855
+ // enable transition styles
1856
+ this.css({
1857
+ transitionProperty: transitionProps,
1858
+ transitionDuration: this.layout.options.transitionDuration
1859
+ });
1860
+ // listen for transition end event
1861
+ this.element.addEventListener( transitionEndEvent, this, false );
1862
+ };
1863
+
1864
+ Item.prototype.transition = Item.prototype[ transitionProperty ? '_transition' : '_nonTransition' ];
1865
+
1866
+ // ----- events ----- //
1867
+
1868
+ Item.prototype.onwebkitTransitionEnd = function( event ) {
1869
+ this.ontransitionend( event );
1870
+ };
1871
+
1872
+ Item.prototype.onotransitionend = function( event ) {
1873
+ this.ontransitionend( event );
1874
+ };
1875
+
1876
+ // properties that I munge to make my life easier
1877
+ var dashedVendorProperties = {
1878
+ '-webkit-transform': 'transform',
1879
+ '-moz-transform': 'transform',
1880
+ '-o-transform': 'transform'
1881
+ };
1882
+
1883
+ Item.prototype.ontransitionend = function( event ) {
1884
+ // disregard bubbled events from children
1885
+ if ( event.target !== this.element ) {
1886
+ return;
1887
+ }
1888
+ var _transition = this._transn;
1889
+ // get property name of transitioned property, convert to prefix-free
1890
+ var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName;
1891
+
1892
+ // remove property that has completed transitioning
1893
+ delete _transition.ingProperties[ propertyName ];
1894
+ // check if any properties are still transitioning
1895
+ if ( isEmptyObj( _transition.ingProperties ) ) {
1896
+ // all properties have completed transitioning
1897
+ this.disableTransition();
1898
+ }
1899
+ // clean style
1900
+ if ( propertyName in _transition.clean ) {
1901
+ // clean up style
1902
+ this.element.style[ event.propertyName ] = '';
1903
+ delete _transition.clean[ propertyName ];
1904
+ }
1905
+ // trigger onTransitionEnd callback
1906
+ if ( propertyName in _transition.onEnd ) {
1907
+ var onTransitionEnd = _transition.onEnd[ propertyName ];
1908
+ onTransitionEnd.call( this );
1909
+ delete _transition.onEnd[ propertyName ];
1910
+ }
1911
+
1912
+ this.emitEvent( 'transitionEnd', [ this ] );
1913
+ };
1914
+
1915
+ Item.prototype.disableTransition = function() {
1916
+ this.removeTransitionStyles();
1917
+ this.element.removeEventListener( transitionEndEvent, this, false );
1918
+ this.isTransitioning = false;
1919
+ };
1920
+
1921
+ /**
1922
+ * removes style property from element
1923
+ * @param {Object} style
1924
+ **/
1925
+ Item.prototype._removeStyles = function( style ) {
1926
+ // clean up transition styles
1927
+ var cleanStyle = {};
1928
+ for ( var prop in style ) {
1929
+ cleanStyle[ prop ] = '';
1930
+ }
1931
+ this.css( cleanStyle );
1932
+ };
1933
+
1934
+ var cleanTransitionStyle = {
1935
+ transitionProperty: '',
1936
+ transitionDuration: ''
1937
+ };
1938
+
1939
+ Item.prototype.removeTransitionStyles = function() {
1940
+ // remove transition
1941
+ this.css( cleanTransitionStyle );
1942
+ };
1943
+
1944
+ // ----- show/hide/remove ----- //
1945
+
1946
+ // remove element from DOM
1947
+ Item.prototype.removeElem = function() {
1948
+ this.element.parentNode.removeChild( this.element );
1949
+ // remove display: none
1950
+ this.css({ display: '' });
1951
+ this.emitEvent( 'remove', [ this ] );
1952
+ };
1953
+
1954
+ Item.prototype.remove = function() {
1955
+ // just remove element if no transition support or no transition
1956
+ if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) {
1957
+ this.removeElem();
1958
+ return;
1959
+ }
1960
+
1961
+ // start transition
1962
+ var _this = this;
1963
+ this.once( 'transitionEnd', function() {
1964
+ _this.removeElem();
1965
+ });
1966
+ this.hide();
1967
+ };
1968
+
1969
+ Item.prototype.reveal = function() {
1970
+ delete this.isHidden;
1971
+ // remove display: none
1972
+ this.css({ display: '' });
1973
+
1974
+ var options = this.layout.options;
1975
+
1976
+ var onTransitionEnd = {};
1977
+ var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle');
1978
+ onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd;
1979
+
1980
+ this.transition({
1981
+ from: options.hiddenStyle,
1982
+ to: options.visibleStyle,
1983
+ isCleaning: true,
1984
+ onTransitionEnd: onTransitionEnd
1985
+ });
1986
+ };
1987
+
1988
+ Item.prototype.onRevealTransitionEnd = function() {
1989
+ // check if still visible
1990
+ // during transition, item may have been hidden
1991
+ if ( !this.isHidden ) {
1992
+ this.emitEvent('reveal');
1993
+ }
1994
+ };
1995
+
1996
+ /**
1997
+ * get style property use for hide/reveal transition end
1998
+ * @param {String} styleProperty - hiddenStyle/visibleStyle
1999
+ * @returns {String}
2000
+ */
2001
+ Item.prototype.getHideRevealTransitionEndProperty = function( styleProperty ) {
2002
+ var optionStyle = this.layout.options[ styleProperty ];
2003
+ // use opacity
2004
+ if ( optionStyle.opacity ) {
2005
+ return 'opacity';
2006
+ }
2007
+ // get first property
2008
+ for ( var prop in optionStyle ) {
2009
+ return prop;
2010
+ }
2011
+ };
2012
+
2013
+ Item.prototype.hide = function() {
2014
+ // set flag
2015
+ this.isHidden = true;
2016
+ // remove display: none
2017
+ this.css({ display: '' });
2018
+
2019
+ var options = this.layout.options;
2020
+
2021
+ var onTransitionEnd = {};
2022
+ var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle');
2023
+ onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd;
2024
+
2025
+ this.transition({
2026
+ from: options.visibleStyle,
2027
+ to: options.hiddenStyle,
2028
+ // keep hidden stuff hidden
2029
+ isCleaning: true,
2030
+ onTransitionEnd: onTransitionEnd
2031
+ });
2032
+ };
2033
+
2034
+ Item.prototype.onHideTransitionEnd = function() {
2035
+ // check if still hidden
2036
+ // during transition, item may have been un-hidden
2037
+ if ( this.isHidden ) {
2038
+ this.css({ display: 'none' });
2039
+ this.emitEvent('hide');
2040
+ }
2041
+ };
2042
+
2043
+ Item.prototype.destroy = function() {
2044
+ this.css({
2045
+ position: '',
2046
+ left: '',
2047
+ right: '',
2048
+ top: '',
2049
+ bottom: '',
2050
+ transition: '',
2051
+ transform: ''
2052
+ });
2053
+ };
2054
+
2055
+ return Item;
2056
+
2057
+ }));
2058
+
2059
+ /*!
2060
+ * Outlayer v1.4.2
2061
+ * the brains and guts of a layout library
2062
+ * MIT license
2063
+ */
2064
+
2065
+ ( function( window, factory ) {
2066
+ 'use strict';
2067
+ // universal module definition
2068
+
2069
+ if ( typeof define == 'function' && define.amd ) {
2070
+ // AMD
2071
+ define( 'outlayer/outlayer',[
2072
+ 'eventie/eventie',
2073
+ 'eventEmitter/EventEmitter',
2074
+ 'get-size/get-size',
2075
+ 'fizzy-ui-utils/utils',
2076
+ './item'
2077
+ ],
2078
+ function( eventie, EventEmitter, getSize, utils, Item ) {
2079
+ return factory( window, eventie, EventEmitter, getSize, utils, Item);
2080
+ }
2081
+ );
2082
+ } else if ( typeof exports == 'object' ) {
2083
+ // CommonJS
2084
+ module.exports = factory(
2085
+ window,
2086
+ require('eventie'),
2087
+ require('wolfy87-eventemitter'),
2088
+ require('get-size'),
2089
+ require('fizzy-ui-utils'),
2090
+ require('./item')
2091
+ );
2092
+ } else {
2093
+ // browser global
2094
+ window.Outlayer = factory(
2095
+ window,
2096
+ window.eventie,
2097
+ window.EventEmitter,
2098
+ window.getSize,
2099
+ window.fizzyUIUtils,
2100
+ window.Outlayer.Item
2101
+ );
2102
+ }
2103
+
2104
+ }( window, function factory( window, eventie, EventEmitter, getSize, utils, Item ) {
2105
+ 'use strict';
2106
+
2107
+ // ----- vars ----- //
2108
+
2109
+ var console = window.console;
2110
+ var jQuery = window.jQuery;
2111
+ var noop = function() {};
2112
+
2113
+ // -------------------------- Outlayer -------------------------- //
2114
+
2115
+ // globally unique identifiers
2116
+ var GUID = 0;
2117
+ // internal store of all Outlayer intances
2118
+ var instances = {};
2119
+
2120
+
2121
+ /**
2122
+ * @param {Element, String} element
2123
+ * @param {Object} options
2124
+ * @constructor
2125
+ */
2126
+ function Outlayer( element, options ) {
2127
+ var queryElement = utils.getQueryElement( element );
2128
+ if ( !queryElement ) {
2129
+ if ( console ) {
2130
+ console.error( 'Bad element for ' + this.constructor.namespace +
2131
+ ': ' + ( queryElement || element ) );
2132
+ }
2133
+ return;
2134
+ }
2135
+ this.element = queryElement;
2136
+ // add jQuery
2137
+ if ( jQuery ) {
2138
+ this.$element = jQuery( this.element );
2139
+ }
2140
+
2141
+ // options
2142
+ this.options = utils.extend( {}, this.constructor.defaults );
2143
+ this.option( options );
2144
+
2145
+ // add id for Outlayer.getFromElement
2146
+ var id = ++GUID;
2147
+ this.element.outlayerGUID = id; // expando
2148
+ instances[ id ] = this; // associate via id
2149
+
2150
+ // kick it off
2151
+ this._create();
2152
+
2153
+ if ( this.options.isInitLayout ) {
2154
+ this.layout();
2155
+ }
2156
+ }
2157
+
2158
+ // settings are for internal use only
2159
+ Outlayer.namespace = 'outlayer';
2160
+ Outlayer.Item = Item;
2161
+
2162
+ // default options
2163
+ Outlayer.defaults = {
2164
+ containerStyle: {
2165
+ position: 'relative'
2166
+ },
2167
+ isInitLayout: true,
2168
+ isOriginLeft: true,
2169
+ isOriginTop: true,
2170
+ isResizeBound: true,
2171
+ isResizingContainer: true,
2172
+ // item options
2173
+ transitionDuration: '0.4s',
2174
+ hiddenStyle: {
2175
+ opacity: 0,
2176
+ transform: 'scale(0.001)'
2177
+ },
2178
+ visibleStyle: {
2179
+ opacity: 1,
2180
+ transform: 'scale(1)'
2181
+ }
2182
+ };
2183
+
2184
+ // inherit EventEmitter
2185
+ utils.extend( Outlayer.prototype, EventEmitter.prototype );
2186
+
2187
+ /**
2188
+ * set options
2189
+ * @param {Object} opts
2190
+ */
2191
+ Outlayer.prototype.option = function( opts ) {
2192
+ utils.extend( this.options, opts );
2193
+ };
2194
+
2195
+ Outlayer.prototype._create = function() {
2196
+ // get items from children
2197
+ this.reloadItems();
2198
+ // elements that affect layout, but are not laid out
2199
+ this.stamps = [];
2200
+ this.stamp( this.options.stamp );
2201
+ // set container style
2202
+ utils.extend( this.element.style, this.options.containerStyle );
2203
+
2204
+ // bind resize method
2205
+ if ( this.options.isResizeBound ) {
2206
+ this.bindResize();
2207
+ }
2208
+ };
2209
+
2210
+ // goes through all children again and gets bricks in proper order
2211
+ Outlayer.prototype.reloadItems = function() {
2212
+ // collection of item elements
2213
+ this.items = this._itemize( this.element.children );
2214
+ };
2215
+
2216
+
2217
+ /**
2218
+ * turn elements into Outlayer.Items to be used in layout
2219
+ * @param {Array or NodeList or HTMLElement} elems
2220
+ * @returns {Array} items - collection of new Outlayer Items
2221
+ */
2222
+ Outlayer.prototype._itemize = function( elems ) {
2223
+
2224
+ var itemElems = this._filterFindItemElements( elems );
2225
+ var Item = this.constructor.Item;
2226
+
2227
+ // create new Outlayer Items for collection
2228
+ var items = [];
2229
+ for ( var i=0, len = itemElems.length; i < len; i++ ) {
2230
+ var elem = itemElems[i];
2231
+ var item = new Item( elem, this );
2232
+ items.push( item );
2233
+ }
2234
+
2235
+ return items;
2236
+ };
2237
+
2238
+ /**
2239
+ * get item elements to be used in layout
2240
+ * @param {Array or NodeList or HTMLElement} elems
2241
+ * @returns {Array} items - item elements
2242
+ */
2243
+ Outlayer.prototype._filterFindItemElements = function( elems ) {
2244
+ return utils.filterFindElements( elems, this.options.itemSelector );
2245
+ };
2246
+
2247
+ /**
2248
+ * getter method for getting item elements
2249
+ * @returns {Array} elems - collection of item elements
2250
+ */
2251
+ Outlayer.prototype.getItemElements = function() {
2252
+ var elems = [];
2253
+ for ( var i=0, len = this.items.length; i < len; i++ ) {
2254
+ elems.push( this.items[i].element );
2255
+ }
2256
+ return elems;
2257
+ };
2258
+
2259
+ // ----- init & layout ----- //
2260
+
2261
+ /**
2262
+ * lays out all items
2263
+ */
2264
+ Outlayer.prototype.layout = function() {
2265
+ this._resetLayout();
2266
+ this._manageStamps();
2267
+
2268
+ // don't animate first layout
2269
+ var isInstant = this.options.isLayoutInstant !== undefined ?
2270
+ this.options.isLayoutInstant : !this._isLayoutInited;
2271
+ this.layoutItems( this.items, isInstant );
2272
+
2273
+ // flag for initalized
2274
+ this._isLayoutInited = true;
2275
+ };
2276
+
2277
+ // _init is alias for layout
2278
+ Outlayer.prototype._init = Outlayer.prototype.layout;
2279
+
2280
+ /**
2281
+ * logic before any new layout
2282
+ */
2283
+ Outlayer.prototype._resetLayout = function() {
2284
+ this.getSize();
2285
+ };
2286
+
2287
+
2288
+ Outlayer.prototype.getSize = function() {
2289
+ this.size = getSize( this.element );
2290
+ };
2291
+
2292
+ /**
2293
+ * get measurement from option, for columnWidth, rowHeight, gutter
2294
+ * if option is String -> get element from selector string, & get size of element
2295
+ * if option is Element -> get size of element
2296
+ * else use option as a number
2297
+ *
2298
+ * @param {String} measurement
2299
+ * @param {String} size - width or height
2300
+ * @private
2301
+ */
2302
+ Outlayer.prototype._getMeasurement = function( measurement, size ) {
2303
+ var option = this.options[ measurement ];
2304
+ var elem;
2305
+ if ( !option ) {
2306
+ // default to 0
2307
+ this[ measurement ] = 0;
2308
+ } else {
2309
+ // use option as an element
2310
+ if ( typeof option === 'string' ) {
2311
+ elem = this.element.querySelector( option );
2312
+ } else if ( utils.isElement( option ) ) {
2313
+ elem = option;
2314
+ }
2315
+ // use size of element, if element
2316
+ this[ measurement ] = elem ? getSize( elem )[ size ] : option;
2317
+ }
2318
+ };
2319
+
2320
+ /**
2321
+ * layout a collection of item elements
2322
+ * @api public
2323
+ */
2324
+ Outlayer.prototype.layoutItems = function( items, isInstant ) {
2325
+ items = this._getItemsForLayout( items );
2326
+
2327
+ this._layoutItems( items, isInstant );
2328
+
2329
+ this._postLayout();
2330
+ };
2331
+
2332
+ /**
2333
+ * get the items to be laid out
2334
+ * you may want to skip over some items
2335
+ * @param {Array} items
2336
+ * @returns {Array} items
2337
+ */
2338
+ Outlayer.prototype._getItemsForLayout = function( items ) {
2339
+ var layoutItems = [];
2340
+ for ( var i=0, len = items.length; i < len; i++ ) {
2341
+ var item = items[i];
2342
+ if ( !item.isIgnored ) {
2343
+ layoutItems.push( item );
2344
+ }
2345
+ }
2346
+ return layoutItems;
2347
+ };
2348
+
2349
+ /**
2350
+ * layout items
2351
+ * @param {Array} items
2352
+ * @param {Boolean} isInstant
2353
+ */
2354
+ Outlayer.prototype._layoutItems = function( items, isInstant ) {
2355
+ this._emitCompleteOnItems( 'layout', items );
2356
+
2357
+ if ( !items || !items.length ) {
2358
+ // no items, emit event with empty array
2359
+ return;
2360
+ }
2361
+
2362
+ var queue = [];
2363
+
2364
+ for ( var i=0, len = items.length; i < len; i++ ) {
2365
+ var item = items[i];
2366
+ // get x/y object from method
2367
+ var position = this._getItemLayoutPosition( item );
2368
+ // enqueue
2369
+ position.item = item;
2370
+ position.isInstant = isInstant || item.isLayoutInstant;
2371
+ queue.push( position );
2372
+ }
2373
+
2374
+ this._processLayoutQueue( queue );
2375
+ };
2376
+
2377
+ /**
2378
+ * get item layout position
2379
+ * @param {Outlayer.Item} item
2380
+ * @returns {Object} x and y position
2381
+ */
2382
+ Outlayer.prototype._getItemLayoutPosition = function( /* item */ ) {
2383
+ return {
2384
+ x: 0,
2385
+ y: 0
2386
+ };
2387
+ };
2388
+
2389
+ /**
2390
+ * iterate over array and position each item
2391
+ * Reason being - separating this logic prevents 'layout invalidation'
2392
+ * thx @paul_irish
2393
+ * @param {Array} queue
2394
+ */
2395
+ Outlayer.prototype._processLayoutQueue = function( queue ) {
2396
+ for ( var i=0, len = queue.length; i < len; i++ ) {
2397
+ var obj = queue[i];
2398
+ this._positionItem( obj.item, obj.x, obj.y, obj.isInstant );
2399
+ }
2400
+ };
2401
+
2402
+ /**
2403
+ * Sets position of item in DOM
2404
+ * @param {Outlayer.Item} item
2405
+ * @param {Number} x - horizontal position
2406
+ * @param {Number} y - vertical position
2407
+ * @param {Boolean} isInstant - disables transitions
2408
+ */
2409
+ Outlayer.prototype._positionItem = function( item, x, y, isInstant ) {
2410
+ if ( isInstant ) {
2411
+ // if not transition, just set CSS
2412
+ item.goTo( x, y );
2413
+ } else {
2414
+ item.moveTo( x, y );
2415
+ }
2416
+ };
2417
+
2418
+ /**
2419
+ * Any logic you want to do after each layout,
2420
+ * i.e. size the container
2421
+ */
2422
+ Outlayer.prototype._postLayout = function() {
2423
+ this.resizeContainer();
2424
+ };
2425
+
2426
+ Outlayer.prototype.resizeContainer = function() {
2427
+ if ( !this.options.isResizingContainer ) {
2428
+ return;
2429
+ }
2430
+ var size = this._getContainerSize();
2431
+ if ( size ) {
2432
+ this._setContainerMeasure( size.width, true );
2433
+ this._setContainerMeasure( size.height, false );
2434
+ }
2435
+ };
2436
+
2437
+ /**
2438
+ * Sets width or height of container if returned
2439
+ * @returns {Object} size
2440
+ * @param {Number} width
2441
+ * @param {Number} height
2442
+ */
2443
+ Outlayer.prototype._getContainerSize = noop;
2444
+
2445
+ /**
2446
+ * @param {Number} measure - size of width or height
2447
+ * @param {Boolean} isWidth
2448
+ */
2449
+ Outlayer.prototype._setContainerMeasure = function( measure, isWidth ) {
2450
+ if ( measure === undefined ) {
2451
+ return;
2452
+ }
2453
+
2454
+ var elemSize = this.size;
2455
+ // add padding and border width if border box
2456
+ if ( elemSize.isBorderBox ) {
2457
+ measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight +
2458
+ elemSize.borderLeftWidth + elemSize.borderRightWidth :
2459
+ elemSize.paddingBottom + elemSize.paddingTop +
2460
+ elemSize.borderTopWidth + elemSize.borderBottomWidth;
2461
+ }
2462
+
2463
+ measure = Math.max( measure, 0 );
2464
+ this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px';
2465
+ };
2466
+
2467
+ /**
2468
+ * emit eventComplete on a collection of items events
2469
+ * @param {String} eventName
2470
+ * @param {Array} items - Outlayer.Items
2471
+ */
2472
+ Outlayer.prototype._emitCompleteOnItems = function( eventName, items ) {
2473
+ var _this = this;
2474
+ function onComplete() {
2475
+ _this.dispatchEvent( eventName + 'Complete', null, [ items ] );
2476
+ }
2477
+
2478
+ var count = items.length;
2479
+ if ( !items || !count ) {
2480
+ onComplete();
2481
+ return;
2482
+ }
2483
+
2484
+ var doneCount = 0;
2485
+ function tick() {
2486
+ doneCount++;
2487
+ if ( doneCount === count ) {
2488
+ onComplete();
2489
+ }
2490
+ }
2491
+
2492
+ // bind callback
2493
+ for ( var i=0, len = items.length; i < len; i++ ) {
2494
+ var item = items[i];
2495
+ item.once( eventName, tick );
2496
+ }
2497
+ };
2498
+
2499
+ /**
2500
+ * emits events via eventEmitter and jQuery events
2501
+ * @param {String} type - name of event
2502
+ * @param {Event} event - original event
2503
+ * @param {Array} args - extra arguments
2504
+ */
2505
+ Outlayer.prototype.dispatchEvent = function( type, event, args ) {
2506
+ // add original event to arguments
2507
+ var emitArgs = event ? [ event ].concat( args ) : args;
2508
+ this.emitEvent( type, emitArgs );
2509
+
2510
+ if ( jQuery ) {
2511
+ // set this.$element
2512
+ this.$element = this.$element || jQuery( this.element );
2513
+ if ( event ) {
2514
+ // create jQuery event
2515
+ var $event = jQuery.Event( event );
2516
+ $event.type = type;
2517
+ this.$element.trigger( $event, args );
2518
+ } else {
2519
+ // just trigger with type if no event available
2520
+ this.$element.trigger( type, args );
2521
+ }
2522
+ }
2523
+ };
2524
+
2525
+ // -------------------------- ignore & stamps -------------------------- //
2526
+
2527
+
2528
+ /**
2529
+ * keep item in collection, but do not lay it out
2530
+ * ignored items do not get skipped in layout
2531
+ * @param {Element} elem
2532
+ */
2533
+ Outlayer.prototype.ignore = function( elem ) {
2534
+ var item = this.getItem( elem );
2535
+ if ( item ) {
2536
+ item.isIgnored = true;
2537
+ }
2538
+ };
2539
+
2540
+ /**
2541
+ * return item to layout collection
2542
+ * @param {Element} elem
2543
+ */
2544
+ Outlayer.prototype.unignore = function( elem ) {
2545
+ var item = this.getItem( elem );
2546
+ if ( item ) {
2547
+ delete item.isIgnored;
2548
+ }
2549
+ };
2550
+
2551
+ /**
2552
+ * adds elements to stamps
2553
+ * @param {NodeList, Array, Element, or String} elems
2554
+ */
2555
+ Outlayer.prototype.stamp = function( elems ) {
2556
+ elems = this._find( elems );
2557
+ if ( !elems ) {
2558
+ return;
2559
+ }
2560
+
2561
+ this.stamps = this.stamps.concat( elems );
2562
+ // ignore
2563
+ for ( var i=0, len = elems.length; i < len; i++ ) {
2564
+ var elem = elems[i];
2565
+ this.ignore( elem );
2566
+ }
2567
+ };
2568
+
2569
+ /**
2570
+ * removes elements to stamps
2571
+ * @param {NodeList, Array, or Element} elems
2572
+ */
2573
+ Outlayer.prototype.unstamp = function( elems ) {
2574
+ elems = this._find( elems );
2575
+ if ( !elems ){
2576
+ return;
2577
+ }
2578
+
2579
+ for ( var i=0, len = elems.length; i < len; i++ ) {
2580
+ var elem = elems[i];
2581
+ // filter out removed stamp elements
2582
+ utils.removeFrom( this.stamps, elem );
2583
+ this.unignore( elem );
2584
+ }
2585
+
2586
+ };
2587
+
2588
+ /**
2589
+ * finds child elements
2590
+ * @param {NodeList, Array, Element, or String} elems
2591
+ * @returns {Array} elems
2592
+ */
2593
+ Outlayer.prototype._find = function( elems ) {
2594
+ if ( !elems ) {
2595
+ return;
2596
+ }
2597
+ // if string, use argument as selector string
2598
+ if ( typeof elems === 'string' ) {
2599
+ elems = this.element.querySelectorAll( elems );
2600
+ }
2601
+ elems = utils.makeArray( elems );
2602
+ return elems;
2603
+ };
2604
+
2605
+ Outlayer.prototype._manageStamps = function() {
2606
+ if ( !this.stamps || !this.stamps.length ) {
2607
+ return;
2608
+ }
2609
+
2610
+ this._getBoundingRect();
2611
+
2612
+ for ( var i=0, len = this.stamps.length; i < len; i++ ) {
2613
+ var stamp = this.stamps[i];
2614
+ this._manageStamp( stamp );
2615
+ }
2616
+ };
2617
+
2618
+ // update boundingLeft / Top
2619
+ Outlayer.prototype._getBoundingRect = function() {
2620
+ // get bounding rect for container element
2621
+ var boundingRect = this.element.getBoundingClientRect();
2622
+ var size = this.size;
2623
+ this._boundingRect = {
2624
+ left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,
2625
+ top: boundingRect.top + size.paddingTop + size.borderTopWidth,
2626
+ right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ),
2627
+ bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth )
2628
+ };
2629
+ };
2630
+
2631
+ /**
2632
+ * @param {Element} stamp
2633
+ **/
2634
+ Outlayer.prototype._manageStamp = noop;
2635
+
2636
+ /**
2637
+ * get x/y position of element relative to container element
2638
+ * @param {Element} elem
2639
+ * @returns {Object} offset - has left, top, right, bottom
2640
+ */
2641
+ Outlayer.prototype._getElementOffset = function( elem ) {
2642
+ var boundingRect = elem.getBoundingClientRect();
2643
+ var thisRect = this._boundingRect;
2644
+ var size = getSize( elem );
2645
+ var offset = {
2646
+ left: boundingRect.left - thisRect.left - size.marginLeft,
2647
+ top: boundingRect.top - thisRect.top - size.marginTop,
2648
+ right: thisRect.right - boundingRect.right - size.marginRight,
2649
+ bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom
2650
+ };
2651
+ return offset;
2652
+ };
2653
+
2654
+ // -------------------------- resize -------------------------- //
2655
+
2656
+ // enable event handlers for listeners
2657
+ // i.e. resize -> onresize
2658
+ Outlayer.prototype.handleEvent = function( event ) {
2659
+ var method = 'on' + event.type;
2660
+ if ( this[ method ] ) {
2661
+ this[ method ]( event );
2662
+ }
2663
+ };
2664
+
2665
+ /**
2666
+ * Bind layout to window resizing
2667
+ */
2668
+ Outlayer.prototype.bindResize = function() {
2669
+ // bind just one listener
2670
+ if ( this.isResizeBound ) {
2671
+ return;
2672
+ }
2673
+ eventie.bind( window, 'resize', this );
2674
+ this.isResizeBound = true;
2675
+ };
2676
+
2677
+ /**
2678
+ * Unbind layout to window resizing
2679
+ */
2680
+ Outlayer.prototype.unbindResize = function() {
2681
+ if ( this.isResizeBound ) {
2682
+ eventie.unbind( window, 'resize', this );
2683
+ }
2684
+ this.isResizeBound = false;
2685
+ };
2686
+
2687
+ // original debounce by John Hann
2688
+ // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
2689
+
2690
+ // this fires every resize
2691
+ Outlayer.prototype.onresize = function() {
2692
+ if ( this.resizeTimeout ) {
2693
+ clearTimeout( this.resizeTimeout );
2694
+ }
2695
+
2696
+ var _this = this;
2697
+ function delayed() {
2698
+ _this.resize();
2699
+ delete _this.resizeTimeout;
2700
+ }
2701
+
2702
+ this.resizeTimeout = setTimeout( delayed, 100 );
2703
+ };
2704
+
2705
+ // debounced, layout on resize
2706
+ Outlayer.prototype.resize = function() {
2707
+ // don't trigger if size did not change
2708
+ // or if resize was unbound. See #9
2709
+ if ( !this.isResizeBound || !this.needsResizeLayout() ) {
2710
+ return;
2711
+ }
2712
+
2713
+ this.layout();
2714
+ };
2715
+
2716
+ /**
2717
+ * check if layout is needed post layout
2718
+ * @returns Boolean
2719
+ */
2720
+ Outlayer.prototype.needsResizeLayout = function() {
2721
+ var size = getSize( this.element );
2722
+ // check that this.size and size are there
2723
+ // IE8 triggers resize on body size change, so they might not be
2724
+ var hasSizes = this.size && size;
2725
+ return hasSizes && size.innerWidth !== this.size.innerWidth;
2726
+ };
2727
+
2728
+ // -------------------------- methods -------------------------- //
2729
+
2730
+ /**
2731
+ * add items to Outlayer instance
2732
+ * @param {Array or NodeList or Element} elems
2733
+ * @returns {Array} items - Outlayer.Items
2734
+ **/
2735
+ Outlayer.prototype.addItems = function( elems ) {
2736
+ var items = this._itemize( elems );
2737
+ // add items to collection
2738
+ if ( items.length ) {
2739
+ this.items = this.items.concat( items );
2740
+ }
2741
+ return items;
2742
+ };
2743
+
2744
+ /**
2745
+ * Layout newly-appended item elements
2746
+ * @param {Array or NodeList or Element} elems
2747
+ */
2748
+ Outlayer.prototype.appended = function( elems ) {
2749
+ var items = this.addItems( elems );
2750
+ if ( !items.length ) {
2751
+ return;
2752
+ }
2753
+ // layout and reveal just the new items
2754
+ this.layoutItems( items, true );
2755
+ this.reveal( items );
2756
+ };
2757
+
2758
+ /**
2759
+ * Layout prepended elements
2760
+ * @param {Array or NodeList or Element} elems
2761
+ */
2762
+ Outlayer.prototype.prepended = function( elems ) {
2763
+ var items = this._itemize( elems );
2764
+ if ( !items.length ) {
2765
+ return;
2766
+ }
2767
+ // add items to beginning of collection
2768
+ var previousItems = this.items.slice(0);
2769
+ this.items = items.concat( previousItems );
2770
+ // start new layout
2771
+ this._resetLayout();
2772
+ this._manageStamps();
2773
+ // layout new stuff without transition
2774
+ this.layoutItems( items, true );
2775
+ this.reveal( items );
2776
+ // layout previous items
2777
+ this.layoutItems( previousItems );
2778
+ };
2779
+
2780
+ /**
2781
+ * reveal a collection of items
2782
+ * @param {Array of Outlayer.Items} items
2783
+ */
2784
+ Outlayer.prototype.reveal = function( items ) {
2785
+ this._emitCompleteOnItems( 'reveal', items );
2786
+
2787
+ var len = items && items.length;
2788
+ for ( var i=0; len && i < len; i++ ) {
2789
+ var item = items[i];
2790
+ item.reveal();
2791
+ }
2792
+ };
2793
+
2794
+ /**
2795
+ * hide a collection of items
2796
+ * @param {Array of Outlayer.Items} items
2797
+ */
2798
+ Outlayer.prototype.hide = function( items ) {
2799
+ this._emitCompleteOnItems( 'hide', items );
2800
+
2801
+ var len = items && items.length;
2802
+ for ( var i=0; len && i < len; i++ ) {
2803
+ var item = items[i];
2804
+ item.hide();
2805
+ }
2806
+ };
2807
+
2808
+ /**
2809
+ * reveal item elements
2810
+ * @param {Array}, {Element}, {NodeList} items
2811
+ */
2812
+ Outlayer.prototype.revealItemElements = function( elems ) {
2813
+ var items = this.getItems( elems );
2814
+ this.reveal( items );
2815
+ };
2816
+
2817
+ /**
2818
+ * hide item elements
2819
+ * @param {Array}, {Element}, {NodeList} items
2820
+ */
2821
+ Outlayer.prototype.hideItemElements = function( elems ) {
2822
+ var items = this.getItems( elems );
2823
+ this.hide( items );
2824
+ };
2825
+
2826
+ /**
2827
+ * get Outlayer.Item, given an Element
2828
+ * @param {Element} elem
2829
+ * @param {Function} callback
2830
+ * @returns {Outlayer.Item} item
2831
+ */
2832
+ Outlayer.prototype.getItem = function( elem ) {
2833
+ // loop through items to get the one that matches
2834
+ for ( var i=0, len = this.items.length; i < len; i++ ) {
2835
+ var item = this.items[i];
2836
+ if ( item.element === elem ) {
2837
+ // return item
2838
+ return item;
2839
+ }
2840
+ }
2841
+ };
2842
+
2843
+ /**
2844
+ * get collection of Outlayer.Items, given Elements
2845
+ * @param {Array} elems
2846
+ * @returns {Array} items - Outlayer.Items
2847
+ */
2848
+ Outlayer.prototype.getItems = function( elems ) {
2849
+ elems = utils.makeArray( elems );
2850
+ var items = [];
2851
+ for ( var i=0, len = elems.length; i < len; i++ ) {
2852
+ var elem = elems[i];
2853
+ var item = this.getItem( elem );
2854
+ if ( item ) {
2855
+ items.push( item );
2856
+ }
2857
+ }
2858
+
2859
+ return items;
2860
+ };
2861
+
2862
+ /**
2863
+ * remove element(s) from instance and DOM
2864
+ * @param {Array or NodeList or Element} elems
2865
+ */
2866
+ Outlayer.prototype.remove = function( elems ) {
2867
+ var removeItems = this.getItems( elems );
2868
+
2869
+ this._emitCompleteOnItems( 'remove', removeItems );
2870
+
2871
+ // bail if no items to remove
2872
+ if ( !removeItems || !removeItems.length ) {
2873
+ return;
2874
+ }
2875
+
2876
+ for ( var i=0, len = removeItems.length; i < len; i++ ) {
2877
+ var item = removeItems[i];
2878
+ item.remove();
2879
+ // remove item from collection
2880
+ utils.removeFrom( this.items, item );
2881
+ }
2882
+ };
2883
+
2884
+ // ----- destroy ----- //
2885
+
2886
+ // remove and disable Outlayer instance
2887
+ Outlayer.prototype.destroy = function() {
2888
+ // clean up dynamic styles
2889
+ var style = this.element.style;
2890
+ style.height = '';
2891
+ style.position = '';
2892
+ style.width = '';
2893
+ // destroy items
2894
+ for ( var i=0, len = this.items.length; i < len; i++ ) {
2895
+ var item = this.items[i];
2896
+ item.destroy();
2897
+ }
2898
+
2899
+ this.unbindResize();
2900
+
2901
+ var id = this.element.outlayerGUID;
2902
+ delete instances[ id ]; // remove reference to instance by id
2903
+ delete this.element.outlayerGUID;
2904
+ // remove data for jQuery
2905
+ if ( jQuery ) {
2906
+ jQuery.removeData( this.element, this.constructor.namespace );
2907
+ }
2908
+
2909
+ };
2910
+
2911
+ // -------------------------- data -------------------------- //
2912
+
2913
+ /**
2914
+ * get Outlayer instance from element
2915
+ * @param {Element} elem
2916
+ * @returns {Outlayer}
2917
+ */
2918
+ Outlayer.data = function( elem ) {
2919
+ elem = utils.getQueryElement( elem );
2920
+ var id = elem && elem.outlayerGUID;
2921
+ return id && instances[ id ];
2922
+ };
2923
+
2924
+
2925
+ // -------------------------- create Outlayer class -------------------------- //
2926
+
2927
+ /**
2928
+ * create a layout class
2929
+ * @param {String} namespace
2930
+ */
2931
+ Outlayer.create = function( namespace, options ) {
2932
+ // sub-class Outlayer
2933
+ function Layout() {
2934
+ Outlayer.apply( this, arguments );
2935
+ }
2936
+ // inherit Outlayer prototype, use Object.create if there
2937
+ if ( Object.create ) {
2938
+ Layout.prototype = Object.create( Outlayer.prototype );
2939
+ } else {
2940
+ utils.extend( Layout.prototype, Outlayer.prototype );
2941
+ }
2942
+ // set contructor, used for namespace and Item
2943
+ Layout.prototype.constructor = Layout;
2944
+
2945
+ Layout.defaults = utils.extend( {}, Outlayer.defaults );
2946
+ // apply new options
2947
+ utils.extend( Layout.defaults, options );
2948
+ // keep prototype.settings for backwards compatibility (Packery v1.2.0)
2949
+ Layout.prototype.settings = {};
2950
+
2951
+ Layout.namespace = namespace;
2952
+
2953
+ Layout.data = Outlayer.data;
2954
+
2955
+ // sub-class Item
2956
+ Layout.Item = function LayoutItem() {
2957
+ Item.apply( this, arguments );
2958
+ };
2959
+
2960
+ Layout.Item.prototype = new Item();
2961
+
2962
+ // -------------------------- declarative -------------------------- //
2963
+
2964
+ utils.htmlInit( Layout, namespace );
2965
+
2966
+ // -------------------------- jQuery bridge -------------------------- //
2967
+
2968
+ // make into jQuery plugin
2969
+ if ( jQuery && jQuery.bridget ) {
2970
+ jQuery.bridget( namespace, Layout );
2971
+ }
2972
+
2973
+ return Layout;
2974
+ };
2975
+
2976
+ // ----- fin ----- //
2977
+
2978
+ // back in global
2979
+ Outlayer.Item = Item;
2980
+
2981
+ return Outlayer;
2982
+
2983
+ }));
2984
+
2985
+
2986
+ /**
2987
+ * Isotope Item
2988
+ **/
2989
+
2990
+ ( function( window, factory ) {
2991
+ 'use strict';
2992
+ // universal module definition
2993
+ if ( typeof define == 'function' && define.amd ) {
2994
+ // AMD
2995
+ define( 'isotope/js/item',[
2996
+ 'outlayer/outlayer'
2997
+ ],
2998
+ factory );
2999
+ } else if ( typeof exports == 'object' ) {
3000
+ // CommonJS
3001
+ module.exports = factory(
3002
+ require('outlayer')
3003
+ );
3004
+ } else {
3005
+ // browser global
3006
+ window.Isotope = window.Isotope || {};
3007
+ window.Isotope.Item = factory(
3008
+ window.Outlayer
3009
+ );
3010
+ }
3011
+
3012
+ }( window, function factory( Outlayer ) {
3013
+ 'use strict';
3014
+
3015
+ // -------------------------- Item -------------------------- //
3016
+
3017
+ // sub-class Outlayer Item
3018
+ function Item() {
3019
+ Outlayer.Item.apply( this, arguments );
3020
+ }
3021
+
3022
+ Item.prototype = new Outlayer.Item();
3023
+
3024
+ Item.prototype._create = function() {
3025
+ // assign id, used for original-order sorting
3026
+ this.id = this.layout.itemGUID++;
3027
+ Outlayer.Item.prototype._create.call( this );
3028
+ this.sortData = {};
3029
+ };
3030
+
3031
+ Item.prototype.updateSortData = function() {
3032
+ if ( this.isIgnored ) {
3033
+ return;
3034
+ }
3035
+ // default sorters
3036
+ this.sortData.id = this.id;
3037
+ // for backward compatibility
3038
+ this.sortData['original-order'] = this.id;
3039
+ this.sortData.random = Math.random();
3040
+ // go thru getSortData obj and apply the sorters
3041
+ var getSortData = this.layout.options.getSortData;
3042
+ var sorters = this.layout._sorters;
3043
+ for ( var key in getSortData ) {
3044
+ var sorter = sorters[ key ];
3045
+ this.sortData[ key ] = sorter( this.element, this );
3046
+ }
3047
+ };
3048
+
3049
+ var _destroy = Item.prototype.destroy;
3050
+ Item.prototype.destroy = function() {
3051
+ // call super
3052
+ _destroy.apply( this, arguments );
3053
+ // reset display, #741
3054
+ this.css({
3055
+ display: ''
3056
+ });
3057
+ };
3058
+
3059
+ return Item;
3060
+
3061
+ }));
3062
+
3063
+ /**
3064
+ * Isotope LayoutMode
3065
+ */
3066
+
3067
+ ( function( window, factory ) {
3068
+ 'use strict';
3069
+ // universal module definition
3070
+
3071
+ if ( typeof define == 'function' && define.amd ) {
3072
+ // AMD
3073
+ define( 'isotope/js/layout-mode',[
3074
+ 'get-size/get-size',
3075
+ 'outlayer/outlayer'
3076
+ ],
3077
+ factory );
3078
+ } else if ( typeof exports == 'object' ) {
3079
+ // CommonJS
3080
+ module.exports = factory(
3081
+ require('get-size'),
3082
+ require('outlayer')
3083
+ );
3084
+ } else {
3085
+ // browser global
3086
+ window.Isotope = window.Isotope || {};
3087
+ window.Isotope.LayoutMode = factory(
3088
+ window.getSize,
3089
+ window.Outlayer
3090
+ );
3091
+ }
3092
+
3093
+ }( window, function factory( getSize, Outlayer ) {
3094
+ 'use strict';
3095
+
3096
+ // layout mode class
3097
+ function LayoutMode( isotope ) {
3098
+ this.isotope = isotope;
3099
+ // link properties
3100
+ if ( isotope ) {
3101
+ this.options = isotope.options[ this.namespace ];
3102
+ this.element = isotope.element;
3103
+ this.items = isotope.filteredItems;
3104
+ this.size = isotope.size;
3105
+ }
3106
+ }
3107
+
3108
+ /**
3109
+ * some methods should just defer to default Outlayer method
3110
+ * and reference the Isotope instance as `this`
3111
+ **/
3112
+ ( function() {
3113
+ var facadeMethods = [
3114
+ '_resetLayout',
3115
+ '_getItemLayoutPosition',
3116
+ '_manageStamp',
3117
+ '_getContainerSize',
3118
+ '_getElementOffset',
3119
+ 'needsResizeLayout'
3120
+ ];
3121
+
3122
+ for ( var i=0, len = facadeMethods.length; i < len; i++ ) {
3123
+ var methodName = facadeMethods[i];
3124
+ LayoutMode.prototype[ methodName ] = getOutlayerMethod( methodName );
3125
+ }
3126
+
3127
+ function getOutlayerMethod( methodName ) {
3128
+ return function() {
3129
+ return Outlayer.prototype[ methodName ].apply( this.isotope, arguments );
3130
+ };
3131
+ }
3132
+ })();
3133
+
3134
+ // ----- ----- //
3135
+
3136
+ // for horizontal layout modes, check vertical size
3137
+ LayoutMode.prototype.needsVerticalResizeLayout = function() {
3138
+ // don't trigger if size did not change
3139
+ var size = getSize( this.isotope.element );
3140
+ // check that this.size and size are there
3141
+ // IE8 triggers resize on body size change, so they might not be
3142
+ var hasSizes = this.isotope.size && size;
3143
+ return hasSizes && size.innerHeight != this.isotope.size.innerHeight;
3144
+ };
3145
+
3146
+ // ----- measurements ----- //
3147
+
3148
+ LayoutMode.prototype._getMeasurement = function() {
3149
+ this.isotope._getMeasurement.apply( this, arguments );
3150
+ };
3151
+
3152
+ LayoutMode.prototype.getColumnWidth = function() {
3153
+ this.getSegmentSize( 'column', 'Width' );
3154
+ };
3155
+
3156
+ LayoutMode.prototype.getRowHeight = function() {
3157
+ this.getSegmentSize( 'row', 'Height' );
3158
+ };
3159
+
3160
+ /**
3161
+ * get columnWidth or rowHeight
3162
+ * segment: 'column' or 'row'
3163
+ * size 'Width' or 'Height'
3164
+ **/
3165
+ LayoutMode.prototype.getSegmentSize = function( segment, size ) {
3166
+ var segmentName = segment + size;
3167
+ var outerSize = 'outer' + size;
3168
+ // columnWidth / outerWidth // rowHeight / outerHeight
3169
+ this._getMeasurement( segmentName, outerSize );
3170
+ // got rowHeight or columnWidth, we can chill
3171
+ if ( this[ segmentName ] ) {
3172
+ return;
3173
+ }
3174
+ // fall back to item of first element
3175
+ var firstItemSize = this.getFirstItemSize();
3176
+ this[ segmentName ] = firstItemSize && firstItemSize[ outerSize ] ||
3177
+ // or size of container
3178
+ this.isotope.size[ 'inner' + size ];
3179
+ };
3180
+
3181
+ LayoutMode.prototype.getFirstItemSize = function() {
3182
+ var firstItem = this.isotope.filteredItems[0];
3183
+ return firstItem && firstItem.element && getSize( firstItem.element );
3184
+ };
3185
+
3186
+ // ----- methods that should reference isotope ----- //
3187
+
3188
+ LayoutMode.prototype.layout = function() {
3189
+ this.isotope.layout.apply( this.isotope, arguments );
3190
+ };
3191
+
3192
+ LayoutMode.prototype.getSize = function() {
3193
+ this.isotope.getSize();
3194
+ this.size = this.isotope.size;
3195
+ };
3196
+
3197
+ // -------------------------- create -------------------------- //
3198
+
3199
+ LayoutMode.modes = {};
3200
+
3201
+ LayoutMode.create = function( namespace, options ) {
3202
+
3203
+ function Mode() {
3204
+ LayoutMode.apply( this, arguments );
3205
+ }
3206
+
3207
+ Mode.prototype = new LayoutMode();
3208
+
3209
+ // default options
3210
+ if ( options ) {
3211
+ Mode.options = options;
3212
+ }
3213
+
3214
+ Mode.prototype.namespace = namespace;
3215
+ // register in Isotope
3216
+ LayoutMode.modes[ namespace ] = Mode;
3217
+
3218
+ return Mode;
3219
+ };
3220
+
3221
+ return LayoutMode;
3222
+
3223
+ }));
3224
+
3225
+ /*!
3226
+ * Masonry v3.3.1
3227
+ * Cascading grid layout library
3228
+ * http://masonry.desandro.com
3229
+ * MIT License
3230
+ * by David DeSandro
3231
+ */
3232
+
3233
+ ( function( window, factory ) {
3234
+ 'use strict';
3235
+ // universal module definition
3236
+ if ( typeof define === 'function' && define.amd ) {
3237
+ // AMD
3238
+ define( 'masonry/masonry',[
3239
+ 'outlayer/outlayer',
3240
+ 'get-size/get-size',
3241
+ 'fizzy-ui-utils/utils'
3242
+ ],
3243
+ factory );
3244
+ } else if ( typeof exports === 'object' ) {
3245
+ // CommonJS
3246
+ module.exports = factory(
3247
+ require('outlayer'),
3248
+ require('get-size'),
3249
+ require('fizzy-ui-utils')
3250
+ );
3251
+ } else {
3252
+ // browser global
3253
+ window.Masonry = factory(
3254
+ window.Outlayer,
3255
+ window.getSize,
3256
+ window.fizzyUIUtils
3257
+ );
3258
+ }
3259
+
3260
+ }( window, function factory( Outlayer, getSize, utils ) {
3261
+
3262
+
3263
+
3264
+ // -------------------------- masonryDefinition -------------------------- //
3265
+
3266
+ // create an Outlayer layout class
3267
+ var Masonry = Outlayer.create('masonry');
3268
+
3269
+ Masonry.prototype._resetLayout = function() {
3270
+ this.getSize();
3271
+ this._getMeasurement( 'columnWidth', 'outerWidth' );
3272
+ this._getMeasurement( 'gutter', 'outerWidth' );
3273
+ this.measureColumns();
3274
+
3275
+ // reset column Y
3276
+ var i = this.cols;
3277
+ this.colYs = [];
3278
+ while (i--) {
3279
+ this.colYs.push( 0 );
3280
+ }
3281
+
3282
+ this.maxY = 0;
3283
+ };
3284
+
3285
+ Masonry.prototype.measureColumns = function() {
3286
+ this.getContainerWidth();
3287
+ // if columnWidth is 0, default to outerWidth of first item
3288
+ if ( !this.columnWidth ) {
3289
+ var firstItem = this.items[0];
3290
+ var firstItemElem = firstItem && firstItem.element;
3291
+ // columnWidth fall back to item of first element
3292
+ this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||
3293
+ // if first elem has no width, default to size of container
3294
+ this.containerWidth;
3295
+ }
3296
+
3297
+ var columnWidth = this.columnWidth += this.gutter;
3298
+
3299
+ // calculate columns
3300
+ var containerWidth = this.containerWidth + this.gutter;
3301
+ var cols = containerWidth / columnWidth;
3302
+ // fix rounding errors, typically with gutters
3303
+ var excess = columnWidth - containerWidth % columnWidth;
3304
+ // if overshoot is less than a pixel, round up, otherwise floor it
3305
+ var mathMethod = excess && excess < 1 ? 'round' : 'floor';
3306
+ cols = Math[ mathMethod ]( cols );
3307
+ this.cols = Math.max( cols, 1 );
3308
+ };
3309
+
3310
+ Masonry.prototype.getContainerWidth = function() {
3311
+ // container is parent if fit width
3312
+ var container = this.options.isFitWidth ? this.element.parentNode : this.element;
3313
+ // check that this.size and size are there
3314
+ // IE8 triggers resize on body size change, so they might not be
3315
+ var size = getSize( container );
3316
+ this.containerWidth = size && size.innerWidth;
3317
+ };
3318
+
3319
+ Masonry.prototype._getItemLayoutPosition = function( item ) {
3320
+ item.getSize();
3321
+ // how many columns does this brick span
3322
+ var remainder = item.size.outerWidth % this.columnWidth;
3323
+ var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';
3324
+ // round if off by 1 pixel, otherwise use ceil
3325
+ var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );
3326
+ colSpan = Math.min( colSpan, this.cols );
3327
+
3328
+ var colGroup = this._getColGroup( colSpan );
3329
+ // get the minimum Y value from the columns
3330
+ var minimumY = Math.min.apply( Math, colGroup );
3331
+ var shortColIndex = utils.indexOf( colGroup, minimumY );
3332
+
3333
+ // position the brick
3334
+ var position = {
3335
+ x: this.columnWidth * shortColIndex,
3336
+ y: minimumY
3337
+ };
3338
+
3339
+ // apply setHeight to necessary columns
3340
+ var setHeight = minimumY + item.size.outerHeight;
3341
+ var setSpan = this.cols + 1 - colGroup.length;
3342
+ for ( var i = 0; i < setSpan; i++ ) {
3343
+ this.colYs[ shortColIndex + i ] = setHeight;
3344
+ }
3345
+
3346
+ return position;
3347
+ };
3348
+
3349
+ /**
3350
+ * @param {Number} colSpan - number of columns the element spans
3351
+ * @returns {Array} colGroup
3352
+ */
3353
+ Masonry.prototype._getColGroup = function( colSpan ) {
3354
+ if ( colSpan < 2 ) {
3355
+ // if brick spans only one column, use all the column Ys
3356
+ return this.colYs;
3357
+ }
3358
+
3359
+ var colGroup = [];
3360
+ // how many different places could this brick fit horizontally
3361
+ var groupCount = this.cols + 1 - colSpan;
3362
+ // for each group potential horizontal position
3363
+ for ( var i = 0; i < groupCount; i++ ) {
3364
+ // make an array of colY values for that one group
3365
+ var groupColYs = this.colYs.slice( i, i + colSpan );
3366
+ // and get the max value of the array
3367
+ colGroup[i] = Math.max.apply( Math, groupColYs );
3368
+ }
3369
+ return colGroup;
3370
+ };
3371
+
3372
+ Masonry.prototype._manageStamp = function( stamp ) {
3373
+ var stampSize = getSize( stamp );
3374
+ var offset = this._getElementOffset( stamp );
3375
+ // get the columns that this stamp affects
3376
+ var firstX = this.options.isOriginLeft ? offset.left : offset.right;
3377
+ var lastX = firstX + stampSize.outerWidth;
3378
+ var firstCol = Math.floor( firstX / this.columnWidth );
3379
+ firstCol = Math.max( 0, firstCol );
3380
+ var lastCol = Math.floor( lastX / this.columnWidth );
3381
+ // lastCol should not go over if multiple of columnWidth #425
3382
+ lastCol -= lastX % this.columnWidth ? 0 : 1;
3383
+ lastCol = Math.min( this.cols - 1, lastCol );
3384
+ // set colYs to bottom of the stamp
3385
+ var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) +
3386
+ stampSize.outerHeight;
3387
+ for ( var i = firstCol; i <= lastCol; i++ ) {
3388
+ this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );
3389
+ }
3390
+ };
3391
+
3392
+ Masonry.prototype._getContainerSize = function() {
3393
+ this.maxY = Math.max.apply( Math, this.colYs );
3394
+ var size = {
3395
+ height: this.maxY
3396
+ };
3397
+
3398
+ if ( this.options.isFitWidth ) {
3399
+ size.width = this._getContainerFitWidth();
3400
+ }
3401
+
3402
+ return size;
3403
+ };
3404
+
3405
+ Masonry.prototype._getContainerFitWidth = function() {
3406
+ var unusedCols = 0;
3407
+ // count unused columns
3408
+ var i = this.cols;
3409
+ while ( --i ) {
3410
+ if ( this.colYs[i] !== 0 ) {
3411
+ break;
3412
+ }
3413
+ unusedCols++;
3414
+ }
3415
+ // fit container to columns that have been used
3416
+ return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;
3417
+ };
3418
+
3419
+ Masonry.prototype.needsResizeLayout = function() {
3420
+ var previousWidth = this.containerWidth;
3421
+ this.getContainerWidth();
3422
+ return previousWidth !== this.containerWidth;
3423
+ };
3424
+
3425
+ return Masonry;
3426
+
3427
+ }));
3428
+
3429
+ /*!
3430
+ * Masonry layout mode
3431
+ * sub-classes Masonry
3432
+ * http://masonry.desandro.com
3433
+ */
3434
+
3435
+ ( function( window, factory ) {
3436
+ 'use strict';
3437
+ // universal module definition
3438
+ if ( typeof define == 'function' && define.amd ) {
3439
+ // AMD
3440
+ define( 'isotope/js/layout-modes/masonry',[
3441
+ '../layout-mode',
3442
+ 'masonry/masonry'
3443
+ ],
3444
+ factory );
3445
+ } else if ( typeof exports == 'object' ) {
3446
+ // CommonJS
3447
+ module.exports = factory(
3448
+ require('../layout-mode'),
3449
+ require('masonry-layout')
3450
+ );
3451
+ } else {
3452
+ // browser global
3453
+ factory(
3454
+ window.Isotope.LayoutMode,
3455
+ window.Masonry
3456
+ );
3457
+ }
3458
+
3459
+ }( window, function factory( LayoutMode, Masonry ) {
3460
+ 'use strict';
3461
+
3462
+ // -------------------------- helpers -------------------------- //
3463
+
3464
+ // extend objects
3465
+ function extend( a, b ) {
3466
+ for ( var prop in b ) {
3467
+ a[ prop ] = b[ prop ];
3468
+ }
3469
+ return a;
3470
+ }
3471
+
3472
+ // -------------------------- masonryDefinition -------------------------- //
3473
+
3474
+ // create an Outlayer layout class
3475
+ var MasonryMode = LayoutMode.create('masonry');
3476
+
3477
+ // save on to these methods
3478
+ var _getElementOffset = MasonryMode.prototype._getElementOffset;
3479
+ var layout = MasonryMode.prototype.layout;
3480
+ var _getMeasurement = MasonryMode.prototype._getMeasurement;
3481
+
3482
+ // sub-class Masonry
3483
+ extend( MasonryMode.prototype, Masonry.prototype );
3484
+
3485
+ // set back, as it was overwritten by Masonry
3486
+ MasonryMode.prototype._getElementOffset = _getElementOffset;
3487
+ MasonryMode.prototype.layout = layout;
3488
+ MasonryMode.prototype._getMeasurement = _getMeasurement;
3489
+
3490
+ var measureColumns = MasonryMode.prototype.measureColumns;
3491
+ MasonryMode.prototype.measureColumns = function() {
3492
+ // set items, used if measuring first item
3493
+ this.items = this.isotope.filteredItems;
3494
+ measureColumns.call( this );
3495
+ };
3496
+
3497
+ // HACK copy over isOriginLeft/Top options
3498
+ var _manageStamp = MasonryMode.prototype._manageStamp;
3499
+ MasonryMode.prototype._manageStamp = function() {
3500
+ this.options.isOriginLeft = this.isotope.options.isOriginLeft;
3501
+ this.options.isOriginTop = this.isotope.options.isOriginTop;
3502
+ _manageStamp.apply( this, arguments );
3503
+ };
3504
+
3505
+ return MasonryMode;
3506
+
3507
+ }));
3508
+
3509
+ /**
3510
+ * fitRows layout mode
3511
+ */
3512
+
3513
+ ( function( window, factory ) {
3514
+ 'use strict';
3515
+ // universal module definition
3516
+ if ( typeof define == 'function' && define.amd ) {
3517
+ // AMD
3518
+ define( 'isotope/js/layout-modes/fit-rows',[
3519
+ '../layout-mode'
3520
+ ],
3521
+ factory );
3522
+ } else if ( typeof exports == 'object' ) {
3523
+ // CommonJS
3524
+ module.exports = factory(
3525
+ require('../layout-mode')
3526
+ );
3527
+ } else {
3528
+ // browser global
3529
+ factory(
3530
+ window.Isotope.LayoutMode
3531
+ );
3532
+ }
3533
+
3534
+ }( window, function factory( LayoutMode ) {
3535
+ 'use strict';
3536
+
3537
+ var FitRows = LayoutMode.create('fitRows');
3538
+
3539
+ FitRows.prototype._resetLayout = function() {
3540
+ this.x = 0;
3541
+ this.y = 0;
3542
+ this.maxY = 0;
3543
+ this._getMeasurement( 'gutter', 'outerWidth' );
3544
+ };
3545
+
3546
+ FitRows.prototype._getItemLayoutPosition = function( item ) {
3547
+ item.getSize();
3548
+
3549
+ var itemWidth = item.size.outerWidth + this.gutter;
3550
+ // if this element cannot fit in the current row
3551
+ var containerWidth = this.isotope.size.innerWidth + this.gutter;
3552
+ if ( this.x !== 0 && itemWidth + this.x > containerWidth ) {
3553
+ this.x = 0;
3554
+ this.y = this.maxY;
3555
+ }
3556
+
3557
+ var position = {
3558
+ x: this.x,
3559
+ y: this.y
3560
+ };
3561
+
3562
+ this.maxY = Math.max( this.maxY, this.y + item.size.outerHeight );
3563
+ this.x += itemWidth;
3564
+
3565
+ return position;
3566
+ };
3567
+
3568
+ FitRows.prototype._getContainerSize = function() {
3569
+ return { height: this.maxY };
3570
+ };
3571
+
3572
+ return FitRows;
3573
+
3574
+ }));
3575
+
3576
+ /**
3577
+ * vertical layout mode
3578
+ */
3579
+
3580
+ ( function( window, factory ) {
3581
+ 'use strict';
3582
+ // universal module definition
3583
+ if ( typeof define == 'function' && define.amd ) {
3584
+ // AMD
3585
+ define( 'isotope/js/layout-modes/vertical',[
3586
+ '../layout-mode'
3587
+ ],
3588
+ factory );
3589
+ } else if ( typeof exports == 'object' ) {
3590
+ // CommonJS
3591
+ module.exports = factory(
3592
+ require('../layout-mode')
3593
+ );
3594
+ } else {
3595
+ // browser global
3596
+ factory(
3597
+ window.Isotope.LayoutMode
3598
+ );
3599
+ }
3600
+
3601
+ }( window, function factory( LayoutMode ) {
3602
+ 'use strict';
3603
+
3604
+ var Vertical = LayoutMode.create( 'vertical', {
3605
+ horizontalAlignment: 0
3606
+ });
3607
+
3608
+ Vertical.prototype._resetLayout = function() {
3609
+ this.y = 0;
3610
+ };
3611
+
3612
+ Vertical.prototype._getItemLayoutPosition = function( item ) {
3613
+ item.getSize();
3614
+ var x = ( this.isotope.size.innerWidth - item.size.outerWidth ) *
3615
+ this.options.horizontalAlignment;
3616
+ var y = this.y;
3617
+ this.y += item.size.outerHeight;
3618
+ return { x: x, y: y };
3619
+ };
3620
+
3621
+ Vertical.prototype._getContainerSize = function() {
3622
+ return { height: this.y };
3623
+ };
3624
+
3625
+ return Vertical;
3626
+
3627
+ }));
3628
+
3629
+ /*!
3630
+ * Isotope v2.2.2
3631
+ *
3632
+ * Licensed GPLv3 for open source use
3633
+ * or Isotope Commercial License for commercial use
3634
+ *
3635
+ * http://isotope.metafizzy.co
3636
+ * Copyright 2015 Metafizzy
3637
+ */
3638
+
3639
+ ( function( window, factory ) {
3640
+ 'use strict';
3641
+ // universal module definition
3642
+
3643
+ if ( typeof define == 'function' && define.amd ) {
3644
+ // AMD
3645
+ define( [
3646
+ 'outlayer/outlayer',
3647
+ 'get-size/get-size',
3648
+ 'matches-selector/matches-selector',
3649
+ 'fizzy-ui-utils/utils',
3650
+ 'isotope/js/item',
3651
+ 'isotope/js/layout-mode',
3652
+ // include default layout modes
3653
+ 'isotope/js/layout-modes/masonry',
3654
+ 'isotope/js/layout-modes/fit-rows',
3655
+ 'isotope/js/layout-modes/vertical'
3656
+ ],
3657
+ function( Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ) {
3658
+ return factory( window, Outlayer, getSize, matchesSelector, utils, Item, LayoutMode );
3659
+ });
3660
+ } else if ( typeof exports == 'object' ) {
3661
+ // CommonJS
3662
+ module.exports = factory(
3663
+ window,
3664
+ require('outlayer'),
3665
+ require('get-size'),
3666
+ require('desandro-matches-selector'),
3667
+ require('fizzy-ui-utils'),
3668
+ require('./item'),
3669
+ require('./layout-mode'),
3670
+ // include default layout modes
3671
+ require('./layout-modes/masonry'),
3672
+ require('./layout-modes/fit-rows'),
3673
+ require('./layout-modes/vertical')
3674
+ );
3675
+ } else {
3676
+ // browser global
3677
+ window.Isotope = factory(
3678
+ window,
3679
+ window.Outlayer,
3680
+ window.getSize,
3681
+ window.matchesSelector,
3682
+ window.fizzyUIUtils,
3683
+ window.Isotope.Item,
3684
+ window.Isotope.LayoutMode
3685
+ );
3686
+ }
3687
+
3688
+ }( window, function factory( window, Outlayer, getSize, matchesSelector, utils,
3689
+ Item, LayoutMode ) {
3690
+
3691
+
3692
+
3693
+ // -------------------------- vars -------------------------- //
3694
+
3695
+ var jQuery = window.jQuery;
3696
+
3697
+ // -------------------------- helpers -------------------------- //
3698
+
3699
+ var trim = String.prototype.trim ?
3700
+ function( str ) {
3701
+ return str.trim();
3702
+ } :
3703
+ function( str ) {
3704
+ return str.replace( /^\s+|\s+$/g, '' );
3705
+ };
3706
+
3707
+ var docElem = document.documentElement;
3708
+
3709
+ var getText = docElem.textContent ?
3710
+ function( elem ) {
3711
+ return elem.textContent;
3712
+ } :
3713
+ function( elem ) {
3714
+ return elem.innerText;
3715
+ };
3716
+
3717
+ // -------------------------- isotopeDefinition -------------------------- //
3718
+
3719
+ // create an Outlayer layout class
3720
+ var Isotope = Outlayer.create( 'isotope', {
3721
+ layoutMode: "masonry",
3722
+ isJQueryFiltering: true,
3723
+ sortAscending: true
3724
+ });
3725
+
3726
+ Isotope.Item = Item;
3727
+ Isotope.LayoutMode = LayoutMode;
3728
+
3729
+ Isotope.prototype._create = function() {
3730
+ this.itemGUID = 0;
3731
+ // functions that sort items
3732
+ this._sorters = {};
3733
+ this._getSorters();
3734
+ // call super
3735
+ Outlayer.prototype._create.call( this );
3736
+
3737
+ // create layout modes
3738
+ this.modes = {};
3739
+ // start filteredItems with all items
3740
+ this.filteredItems = this.items;
3741
+ // keep of track of sortBys
3742
+ this.sortHistory = [ 'original-order' ];
3743
+ // create from registered layout modes
3744
+ for ( var name in LayoutMode.modes ) {
3745
+ this._initLayoutMode( name );
3746
+ }
3747
+ };
3748
+
3749
+ Isotope.prototype.reloadItems = function() {
3750
+ // reset item ID counter
3751
+ this.itemGUID = 0;
3752
+ // call super
3753
+ Outlayer.prototype.reloadItems.call( this );
3754
+ };
3755
+
3756
+ Isotope.prototype._itemize = function() {
3757
+ var items = Outlayer.prototype._itemize.apply( this, arguments );
3758
+ // assign ID for original-order
3759
+ for ( var i=0, len = items.length; i < len; i++ ) {
3760
+ var item = items[i];
3761
+ item.id = this.itemGUID++;
3762
+ }
3763
+ this._updateItemsSortData( items );
3764
+ return items;
3765
+ };
3766
+
3767
+
3768
+ // -------------------------- layout -------------------------- //
3769
+
3770
+ Isotope.prototype._initLayoutMode = function( name ) {
3771
+ var Mode = LayoutMode.modes[ name ];
3772
+ // set mode options
3773
+ // HACK extend initial options, back-fill in default options
3774
+ var initialOpts = this.options[ name ] || {};
3775
+ this.options[ name ] = Mode.options ?
3776
+ utils.extend( Mode.options, initialOpts ) : initialOpts;
3777
+ // init layout mode instance
3778
+ this.modes[ name ] = new Mode( this );
3779
+ };
3780
+
3781
+
3782
+ Isotope.prototype.layout = function() {
3783
+ // if first time doing layout, do all magic
3784
+ if ( !this._isLayoutInited && this.options.isInitLayout ) {
3785
+ this.arrange();
3786
+ return;
3787
+ }
3788
+ this._layout();
3789
+ };
3790
+
3791
+ // private method to be used in layout() & magic()
3792
+ Isotope.prototype._layout = function() {
3793
+ // don't animate first layout
3794
+ var isInstant = this._getIsInstant();
3795
+ // layout flow
3796
+ this._resetLayout();
3797
+ this._manageStamps();
3798
+ this.layoutItems( this.filteredItems, isInstant );
3799
+
3800
+ // flag for initalized
3801
+ this._isLayoutInited = true;
3802
+ };
3803
+
3804
+ // filter + sort + layout
3805
+ Isotope.prototype.arrange = function( opts ) {
3806
+ // set any options pass
3807
+ this.option( opts );
3808
+ this._getIsInstant();
3809
+ // filter, sort, and layout
3810
+
3811
+ // filter
3812
+ var filtered = this._filter( this.items );
3813
+ this.filteredItems = filtered.matches;
3814
+
3815
+ var _this = this;
3816
+ function hideReveal() {
3817
+ _this.reveal( filtered.needReveal );
3818
+ _this.hide( filtered.needHide );
3819
+ }
3820
+
3821
+ this._bindArrangeComplete();
3822
+
3823
+ if ( this._isInstant ) {
3824
+ this._noTransition( hideReveal );
3825
+ } else {
3826
+ hideReveal();
3827
+ }
3828
+
3829
+ this._sort();
3830
+ this._layout();
3831
+ };
3832
+ // alias to _init for main plugin method
3833
+ Isotope.prototype._init = Isotope.prototype.arrange;
3834
+
3835
+ // HACK
3836
+ // Don't animate/transition first layout
3837
+ // Or don't animate/transition other layouts
3838
+ Isotope.prototype._getIsInstant = function() {
3839
+ var isInstant = this.options.isLayoutInstant !== undefined ?
3840
+ this.options.isLayoutInstant : !this._isLayoutInited;
3841
+ this._isInstant = isInstant;
3842
+ return isInstant;
3843
+ };
3844
+
3845
+ // listen for layoutComplete, hideComplete and revealComplete
3846
+ // to trigger arrangeComplete
3847
+ Isotope.prototype._bindArrangeComplete = function() {
3848
+ // listen for 3 events to trigger arrangeComplete
3849
+ var isLayoutComplete, isHideComplete, isRevealComplete;
3850
+ var _this = this;
3851
+ function arrangeParallelCallback() {
3852
+ if ( isLayoutComplete && isHideComplete && isRevealComplete ) {
3853
+ _this.dispatchEvent( 'arrangeComplete', null, [ _this.filteredItems ] );
3854
+ }
3855
+ }
3856
+ this.once( 'layoutComplete', function() {
3857
+ isLayoutComplete = true;
3858
+ arrangeParallelCallback();
3859
+ });
3860
+ this.once( 'hideComplete', function() {
3861
+ isHideComplete = true;
3862
+ arrangeParallelCallback();
3863
+ });
3864
+ this.once( 'revealComplete', function() {
3865
+ isRevealComplete = true;
3866
+ arrangeParallelCallback();
3867
+ });
3868
+ };
3869
+
3870
+ // -------------------------- filter -------------------------- //
3871
+
3872
+ Isotope.prototype._filter = function( items ) {
3873
+ var filter = this.options.filter;
3874
+ filter = filter || '*';
3875
+ var matches = [];
3876
+ var hiddenMatched = [];
3877
+ var visibleUnmatched = [];
3878
+
3879
+ var test = this._getFilterTest( filter );
3880
+
3881
+ // test each item
3882
+ for ( var i=0, len = items.length; i < len; i++ ) {
3883
+ var item = items[i];
3884
+ if ( item.isIgnored ) {
3885
+ continue;
3886
+ }
3887
+ // add item to either matched or unmatched group
3888
+ var isMatched = test( item );
3889
+ // item.isFilterMatched = isMatched;
3890
+ // add to matches if its a match
3891
+ if ( isMatched ) {
3892
+ matches.push( item );
3893
+ }
3894
+ // add to additional group if item needs to be hidden or revealed
3895
+ if ( isMatched && item.isHidden ) {
3896
+ hiddenMatched.push( item );
3897
+ } else if ( !isMatched && !item.isHidden ) {
3898
+ visibleUnmatched.push( item );
3899
+ }
3900
+ }
3901
+
3902
+ // return collections of items to be manipulated
3903
+ return {
3904
+ matches: matches,
3905
+ needReveal: hiddenMatched,
3906
+ needHide: visibleUnmatched
3907
+ };
3908
+ };
3909
+
3910
+ // get a jQuery, function, or a matchesSelector test given the filter
3911
+ Isotope.prototype._getFilterTest = function( filter ) {
3912
+ if ( jQuery && this.options.isJQueryFiltering ) {
3913
+ // use jQuery
3914
+ return function( item ) {
3915
+ return jQuery( item.element ).is( filter );
3916
+ };
3917
+ }
3918
+ if ( typeof filter == 'function' ) {
3919
+ // use filter as function
3920
+ return function( item ) {
3921
+ return filter( item.element );
3922
+ };
3923
+ }
3924
+ // default, use filter as selector string
3925
+ return function( item ) {
3926
+ return matchesSelector( item.element, filter );
3927
+ };
3928
+ };
3929
+
3930
+ // -------------------------- sorting -------------------------- //
3931
+
3932
+ /**
3933
+ * @params {Array} elems
3934
+ * @public
3935
+ */
3936
+ Isotope.prototype.updateSortData = function( elems ) {
3937
+ // get items
3938
+ var items;
3939
+ if ( elems ) {
3940
+ elems = utils.makeArray( elems );
3941
+ items = this.getItems( elems );
3942
+ } else {
3943
+ // update all items if no elems provided
3944
+ items = this.items;
3945
+ }
3946
+
3947
+ this._getSorters();
3948
+ this._updateItemsSortData( items );
3949
+ };
3950
+
3951
+ Isotope.prototype._getSorters = function() {
3952
+ var getSortData = this.options.getSortData;
3953
+ for ( var key in getSortData ) {
3954
+ var sorter = getSortData[ key ];
3955
+ this._sorters[ key ] = mungeSorter( sorter );
3956
+ }
3957
+ };
3958
+
3959
+ /**
3960
+ * @params {Array} items - of Isotope.Items
3961
+ * @private
3962
+ */
3963
+ Isotope.prototype._updateItemsSortData = function( items ) {
3964
+ // do not update if no items
3965
+ var len = items && items.length;
3966
+
3967
+ for ( var i=0; len && i < len; i++ ) {
3968
+ var item = items[i];
3969
+ item.updateSortData();
3970
+ }
3971
+ };
3972
+
3973
+ // ----- munge sorter ----- //
3974
+
3975
+ // encapsulate this, as we just need mungeSorter
3976
+ // other functions in here are just for munging
3977
+ var mungeSorter = ( function() {
3978
+ // add a magic layer to sorters for convienent shorthands
3979
+ // `.foo-bar` will use the text of .foo-bar querySelector
3980
+ // `[foo-bar]` will use attribute
3981
+ // you can also add parser
3982
+ // `.foo-bar parseInt` will parse that as a number
3983
+ function mungeSorter( sorter ) {
3984
+ // if not a string, return function or whatever it is
3985
+ if ( typeof sorter != 'string' ) {
3986
+ return sorter;
3987
+ }
3988
+ // parse the sorter string
3989
+ var args = trim( sorter ).split(' ');
3990
+ var query = args[0];
3991
+ // check if query looks like [an-attribute]
3992
+ var attrMatch = query.match( /^\[(.+)\]$/ );
3993
+ var attr = attrMatch && attrMatch[1];
3994
+ var getValue = getValueGetter( attr, query );
3995
+ // use second argument as a parser
3996
+ var parser = Isotope.sortDataParsers[ args[1] ];
3997
+ // parse the value, if there was a parser
3998
+ sorter = parser ? function( elem ) {
3999
+ return elem && parser( getValue( elem ) );
4000
+ } :
4001
+ // otherwise just return value
4002
+ function( elem ) {
4003
+ return elem && getValue( elem );
4004
+ };
4005
+
4006
+ return sorter;
4007
+ }
4008
+
4009
+ // get an attribute getter, or get text of the querySelector
4010
+ function getValueGetter( attr, query ) {
4011
+ var getValue;
4012
+ // if query looks like [foo-bar], get attribute
4013
+ if ( attr ) {
4014
+ getValue = function( elem ) {
4015
+ return elem.getAttribute( attr );
4016
+ };
4017
+ } else {
4018
+ // otherwise, assume its a querySelector, and get its text
4019
+ getValue = function( elem ) {
4020
+ var child = elem.querySelector( query );
4021
+ return child && getText( child );
4022
+ };
4023
+ }
4024
+ return getValue;
4025
+ }
4026
+
4027
+ return mungeSorter;
4028
+ })();
4029
+
4030
+ // parsers used in getSortData shortcut strings
4031
+ Isotope.sortDataParsers = {
4032
+ 'parseInt': function( val ) {
4033
+ return parseInt( val, 10 );
4034
+ },
4035
+ 'parseFloat': function( val ) {
4036
+ return parseFloat( val );
4037
+ }
4038
+ };
4039
+
4040
+ // ----- sort method ----- //
4041
+
4042
+ // sort filteredItem order
4043
+ Isotope.prototype._sort = function() {
4044
+ var sortByOpt = this.options.sortBy;
4045
+ if ( !sortByOpt ) {
4046
+ return;
4047
+ }
4048
+ // concat all sortBy and sortHistory
4049
+ var sortBys = [].concat.apply( sortByOpt, this.sortHistory );
4050
+ // sort magic
4051
+ var itemSorter = getItemSorter( sortBys, this.options.sortAscending );
4052
+ this.filteredItems.sort( itemSorter );
4053
+ // keep track of sortBy History
4054
+ if ( sortByOpt != this.sortHistory[0] ) {
4055
+ // add to front, oldest goes in last
4056
+ this.sortHistory.unshift( sortByOpt );
4057
+ }
4058
+ };
4059
+
4060
+ // returns a function used for sorting
4061
+ function getItemSorter( sortBys, sortAsc ) {
4062
+ return function sorter( itemA, itemB ) {
4063
+ // cycle through all sortKeys
4064
+ for ( var i = 0, len = sortBys.length; i < len; i++ ) {
4065
+ var sortBy = sortBys[i];
4066
+ var a = itemA.sortData[ sortBy ];
4067
+ var b = itemB.sortData[ sortBy ];
4068
+ if ( a > b || a < b ) {
4069
+ // if sortAsc is an object, use the value given the sortBy key
4070
+ var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;
4071
+ var direction = isAscending ? 1 : -1;
4072
+ return ( a > b ? 1 : -1 ) * direction;
4073
+ }
4074
+ }
4075
+ return 0;
4076
+ };
4077
+ }
4078
+
4079
+ // -------------------------- methods -------------------------- //
4080
+
4081
+ // get layout mode
4082
+ Isotope.prototype._mode = function() {
4083
+ var layoutMode = this.options.layoutMode;
4084
+ var mode = this.modes[ layoutMode ];
4085
+ if ( !mode ) {
4086
+ // TODO console.error
4087
+ throw new Error( 'No layout mode: ' + layoutMode );
4088
+ }
4089
+ // HACK sync mode's options
4090
+ // any options set after init for layout mode need to be synced
4091
+ mode.options = this.options[ layoutMode ];
4092
+ return mode;
4093
+ };
4094
+
4095
+ Isotope.prototype._resetLayout = function() {
4096
+ // trigger original reset layout
4097
+ Outlayer.prototype._resetLayout.call( this );
4098
+ this._mode()._resetLayout();
4099
+ };
4100
+
4101
+ Isotope.prototype._getItemLayoutPosition = function( item ) {
4102
+ return this._mode()._getItemLayoutPosition( item );
4103
+ };
4104
+
4105
+ Isotope.prototype._manageStamp = function( stamp ) {
4106
+ this._mode()._manageStamp( stamp );
4107
+ };
4108
+
4109
+ Isotope.prototype._getContainerSize = function() {
4110
+ return this._mode()._getContainerSize();
4111
+ };
4112
+
4113
+ Isotope.prototype.needsResizeLayout = function() {
4114
+ return this._mode().needsResizeLayout();
4115
+ };
4116
+
4117
+ // -------------------------- adding & removing -------------------------- //
4118
+
4119
+ // HEADS UP overwrites default Outlayer appended
4120
+ Isotope.prototype.appended = function( elems ) {
4121
+ var items = this.addItems( elems );
4122
+ if ( !items.length ) {
4123
+ return;
4124
+ }
4125
+ // filter, layout, reveal new items
4126
+ var filteredItems = this._filterRevealAdded( items );
4127
+ // add to filteredItems
4128
+ this.filteredItems = this.filteredItems.concat( filteredItems );
4129
+ };
4130
+
4131
+ // HEADS UP overwrites default Outlayer prepended
4132
+ Isotope.prototype.prepended = function( elems ) {
4133
+ var items = this._itemize( elems );
4134
+ if ( !items.length ) {
4135
+ return;
4136
+ }
4137
+ // start new layout
4138
+ this._resetLayout();
4139
+ this._manageStamps();
4140
+ // filter, layout, reveal new items
4141
+ var filteredItems = this._filterRevealAdded( items );
4142
+ // layout previous items
4143
+ this.layoutItems( this.filteredItems );
4144
+ // add to items and filteredItems
4145
+ this.filteredItems = filteredItems.concat( this.filteredItems );
4146
+ this.items = items.concat( this.items );
4147
+ };
4148
+
4149
+ Isotope.prototype._filterRevealAdded = function( items ) {
4150
+ var filtered = this._filter( items );
4151
+ this.hide( filtered.needHide );
4152
+ // reveal all new items
4153
+ this.reveal( filtered.matches );
4154
+ // layout new items, no transition
4155
+ this.layoutItems( filtered.matches, true );
4156
+ return filtered.matches;
4157
+ };
4158
+
4159
+ /**
4160
+ * Filter, sort, and layout newly-appended item elements
4161
+ * @param {Array or NodeList or Element} elems
4162
+ */
4163
+ Isotope.prototype.insert = function( elems ) {
4164
+ var items = this.addItems( elems );
4165
+ if ( !items.length ) {
4166
+ return;
4167
+ }
4168
+ // append item elements
4169
+ var i, item;
4170
+ var len = items.length;
4171
+ for ( i=0; i < len; i++ ) {
4172
+ item = items[i];
4173
+ this.element.appendChild( item.element );
4174
+ }
4175
+ // filter new stuff
4176
+ var filteredInsertItems = this._filter( items ).matches;
4177
+ // set flag
4178
+ for ( i=0; i < len; i++ ) {
4179
+ items[i].isLayoutInstant = true;
4180
+ }
4181
+ this.arrange();
4182
+ // reset flag
4183
+ for ( i=0; i < len; i++ ) {
4184
+ delete items[i].isLayoutInstant;
4185
+ }
4186
+ this.reveal( filteredInsertItems );
4187
+ };
4188
+
4189
+ var _remove = Isotope.prototype.remove;
4190
+ Isotope.prototype.remove = function( elems ) {
4191
+ elems = utils.makeArray( elems );
4192
+ var removeItems = this.getItems( elems );
4193
+ // do regular thing
4194
+ _remove.call( this, elems );
4195
+ // bail if no items to remove
4196
+ var len = removeItems && removeItems.length;
4197
+ if ( !len ) {
4198
+ return;
4199
+ }
4200
+ // remove elems from filteredItems
4201
+ for ( var i=0; i < len; i++ ) {
4202
+ var item = removeItems[i];
4203
+ // remove item from collection
4204
+ utils.removeFrom( this.filteredItems, item );
4205
+ }
4206
+ };
4207
+
4208
+ Isotope.prototype.shuffle = function() {
4209
+ // update random sortData
4210
+ for ( var i=0, len = this.items.length; i < len; i++ ) {
4211
+ var item = this.items[i];
4212
+ item.sortData.random = Math.random();
4213
+ }
4214
+ this.options.sortBy = 'random';
4215
+ this._sort();
4216
+ this._layout();
4217
+ };
4218
+
4219
+ /**
4220
+ * trigger fn without transition
4221
+ * kind of hacky to have this in the first place
4222
+ * @param {Function} fn
4223
+ * @returns ret
4224
+ * @private
4225
+ */
4226
+ Isotope.prototype._noTransition = function( fn ) {
4227
+ // save transitionDuration before disabling
4228
+ var transitionDuration = this.options.transitionDuration;
4229
+ // disable transition
4230
+ this.options.transitionDuration = 0;
4231
+ // do it
4232
+ var returnValue = fn.call( this );
4233
+ // re-enable transition for reveal
4234
+ this.options.transitionDuration = transitionDuration;
4235
+ return returnValue;
4236
+ };
4237
+
4238
+ // ----- helper methods ----- //
4239
+
4240
+ /**
4241
+ * getter method for getting filtered item elements
4242
+ * @returns {Array} elems - collection of item elements
4243
+ */
4244
+ Isotope.prototype.getFilteredItemElements = function() {
4245
+ var elems = [];
4246
+ for ( var i=0, len = this.filteredItems.length; i < len; i++ ) {
4247
+ elems.push( this.filteredItems[i].element );
4248
+ }
4249
+ return elems;
4250
+ };
4251
+
4252
+ // ----- ----- //
4253
+
4254
+ return Isotope;
4255
+
4256
+ }));
4257
+
assets/js/isotope.pkgd.min.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Isotope PACKAGED v2.2.2
3
+ *
4
+ * Licensed GPLv3 for open source use
5
+ * or Isotope Commercial License for commercial use
6
+ *
7
+ * http://isotope.metafizzy.co
8
+ * Copyright 2015 Metafizzy
9
+ */
10
+
11
+ !function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){"use strict";function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if(a instanceof RegExp)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:e.EventEmitter=a}.call(this),function(a){function b(a){if(a){if("string"==typeof d[a])return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(var b,e=0,f=c.length;f>e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a,b){function c(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function d(){}function e(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=h.length;c>b;b++){var d=h[b];a[d]=0}return a}function f(b){function d(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||g("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=b("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var f=document.body||document.documentElement;f.appendChild(e);var h=j(e);l=200===c(h.width),f.removeChild(e)}}}function f(a){if(d(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var b=j(a);if("none"===b.display)return e();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var g=f.isBorderBox=!(!k||!b[k]||"border-box"!==b[k]),m=0,n=h.length;n>m;m++){var o=h[m],p=b[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=g&&l,y=c(b.width);y!==!1&&(f.width=y+(x?0:r+v));var z=c(b.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return f}var g="undefined"==typeof console?d:function(a){console.error(a)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],f):"object"==typeof exports?module.exports=f(require("desandro-get-style-property")):a.getSize=f(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){"use strict";function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"use strict";"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){"use strict";function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){"use strict";function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.Item=b(a.Outlayer))}(window,function(a){"use strict";function b(){a.Item.apply(this,arguments)}b.prototype=new a.Item,b.prototype._create=function(){this.id=this.layout.itemGUID++,a.Item.prototype._create.call(this),this.sortData={}},b.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var a=this.layout.options.getSortData,b=this.layout._sorters;for(var c in a){var d=b[c];this.sortData[c]=d(this.element,this)}}};var c=b.prototype.destroy;return b.prototype.destroy=function(){c.apply(this,arguments),this.css({display:""})},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],b):"object"==typeof exports?module.exports=b(require("get-size"),require("outlayer")):(a.Isotope=a.Isotope||{},a.Isotope.LayoutMode=b(a.getSize,a.Outlayer))}(window,function(a,b){"use strict";function c(a){this.isotope=a,a&&(this.options=a.options[this.namespace],this.element=a.element,this.items=a.filteredItems,this.size=a.size)}return function(){function a(a){return function(){return b.prototype[a].apply(this.isotope,arguments)}}for(var d=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],e=0,f=d.length;f>e;e++){var g=d[e];c.prototype[g]=a(g)}}(),c.prototype.needsVerticalResizeLayout=function(){var b=a(this.isotope.element),c=this.isotope.size&&b;return c&&b.innerHeight!=this.isotope.size.innerHeight},c.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},c.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},c.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},c.prototype.getSegmentSize=function(a,b){var c=a+b,d="outer"+b;if(this._getMeasurement(c,d),!this[c]){var e=this.getFirstItemSize();this[c]=e&&e[d]||this.isotope.size["inner"+b]}},c.prototype.getFirstItemSize=function(){var b=this.isotope.filteredItems[0];return b&&b.element&&a(b.element)},c.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},c.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},c.modes={},c.create=function(a,b){function d(){c.apply(this,arguments)}return d.prototype=new c,b&&(d.options=b),d.prototype.namespace=a,c.modes[a]=d,d},c}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],b):"object"==typeof exports?module.exports=b(require("../layout-mode"),require("masonry-layout")):b(a.Isotope.LayoutMode,a.Masonry)}(window,function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}var d=a.create("masonry"),e=d.prototype._getElementOffset,f=d.prototype.layout,g=d.prototype._getMeasurement;
12
+ c(d.prototype,b.prototype),d.prototype._getElementOffset=e,d.prototype.layout=f,d.prototype._getMeasurement=g;var h=d.prototype.measureColumns;d.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,h.call(this)};var i=d.prototype._manageStamp;return d.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,i.apply(this,arguments)},d}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window,function(a){"use strict";var b=a.create("fitRows");return b.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth+this.gutter,c=this.isotope.size.innerWidth+this.gutter;0!==this.x&&b+this.x>c&&(this.x=0,this.y=this.maxY);var d={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+a.size.outerHeight),this.x+=b,d},b.prototype._getContainerSize=function(){return{height:this.maxY}},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],b):"object"==typeof exports?module.exports=b(require("../layout-mode")):b(a.Isotope.LayoutMode)}(window,function(a){"use strict";var b=a.create("vertical",{horizontalAlignment:0});return b.prototype._resetLayout=function(){this.y=0},b.prototype._getItemLayoutPosition=function(a){a.getSize();var b=(this.isotope.size.innerWidth-a.size.outerWidth)*this.options.horizontalAlignment,c=this.y;return this.y+=a.size.outerHeight,{x:b,y:c}},b.prototype._getContainerSize=function(){return{height:this.y}},b}),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","fizzy-ui-utils/utils","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],function(c,d,e,f,g,h){return b(a,c,d,e,f,g,h)}):"object"==typeof exports?module.exports=b(a,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/vertical")):a.Isotope=b(a,a.Outlayer,a.getSize,a.matchesSelector,a.fizzyUIUtils,a.Isotope.Item,a.Isotope.LayoutMode)}(window,function(a,b,c,d,e,f,g){function h(a,b){return function(c,d){for(var e=0,f=a.length;f>e;e++){var g=a[e],h=c.sortData[g],i=d.sortData[g];if(h>i||i>h){var j=void 0!==b[g]?b[g]:b,k=j?1:-1;return(h>i?1:-1)*k}}return 0}}var i=a.jQuery,j=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s+|\s+$/g,"")},k=document.documentElement,l=k.textContent?function(a){return a.textContent}:function(a){return a.innerText},m=b.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});m.Item=f,m.LayoutMode=g,m.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),b.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var a in g.modes)this._initLayoutMode(a)},m.prototype.reloadItems=function(){this.itemGUID=0,b.prototype.reloadItems.call(this)},m.prototype._itemize=function(){for(var a=b.prototype._itemize.apply(this,arguments),c=0,d=a.length;d>c;c++){var e=a[c];e.id=this.itemGUID++}return this._updateItemsSortData(a),a},m.prototype._initLayoutMode=function(a){var b=g.modes[a],c=this.options[a]||{};this.options[a]=b.options?e.extend(b.options,c):c,this.modes[a]=new b(this)},m.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?void this.arrange():void this._layout()},m.prototype._layout=function(){var a=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,a),this._isLayoutInited=!0},m.prototype.arrange=function(a){function b(){d.reveal(c.needReveal),d.hide(c.needHide)}this.option(a),this._getIsInstant();var c=this._filter(this.items);this.filteredItems=c.matches;var d=this;this._bindArrangeComplete(),this._isInstant?this._noTransition(b):b(),this._sort(),this._layout()},m.prototype._init=m.prototype.arrange,m.prototype._getIsInstant=function(){var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=a,a},m.prototype._bindArrangeComplete=function(){function a(){b&&c&&d&&e.dispatchEvent("arrangeComplete",null,[e.filteredItems])}var b,c,d,e=this;this.once("layoutComplete",function(){b=!0,a()}),this.once("hideComplete",function(){c=!0,a()}),this.once("revealComplete",function(){d=!0,a()})},m.prototype._filter=function(a){var b=this.options.filter;b=b||"*";for(var c=[],d=[],e=[],f=this._getFilterTest(b),g=0,h=a.length;h>g;g++){var i=a[g];if(!i.isIgnored){var j=f(i);j&&c.push(i),j&&i.isHidden?d.push(i):j||i.isHidden||e.push(i)}}return{matches:c,needReveal:d,needHide:e}},m.prototype._getFilterTest=function(a){return i&&this.options.isJQueryFiltering?function(b){return i(b.element).is(a)}:"function"==typeof a?function(b){return a(b.element)}:function(b){return d(b.element,a)}},m.prototype.updateSortData=function(a){var b;a?(a=e.makeArray(a),b=this.getItems(a)):b=this.items,this._getSorters(),this._updateItemsSortData(b)},m.prototype._getSorters=function(){var a=this.options.getSortData;for(var b in a){var c=a[b];this._sorters[b]=n(c)}},m.prototype._updateItemsSortData=function(a){for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.updateSortData()}};var n=function(){function a(a){if("string"!=typeof a)return a;var c=j(a).split(" "),d=c[0],e=d.match(/^\[(.+)\]$/),f=e&&e[1],g=b(f,d),h=m.sortDataParsers[c[1]];return a=h?function(a){return a&&h(g(a))}:function(a){return a&&g(a)}}function b(a,b){var c;return c=a?function(b){return b.getAttribute(a)}:function(a){var c=a.querySelector(b);return c&&l(c)}}return a}();m.sortDataParsers={parseInt:function(a){return parseInt(a,10)},parseFloat:function(a){return parseFloat(a)}},m.prototype._sort=function(){var a=this.options.sortBy;if(a){var b=[].concat.apply(a,this.sortHistory),c=h(b,this.options.sortAscending);this.filteredItems.sort(c),a!=this.sortHistory[0]&&this.sortHistory.unshift(a)}},m.prototype._mode=function(){var a=this.options.layoutMode,b=this.modes[a];if(!b)throw new Error("No layout mode: "+a);return b.options=this.options[a],b},m.prototype._resetLayout=function(){b.prototype._resetLayout.call(this),this._mode()._resetLayout()},m.prototype._getItemLayoutPosition=function(a){return this._mode()._getItemLayoutPosition(a)},m.prototype._manageStamp=function(a){this._mode()._manageStamp(a)},m.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},m.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},m.prototype.appended=function(a){var b=this.addItems(a);if(b.length){var c=this._filterRevealAdded(b);this.filteredItems=this.filteredItems.concat(c)}},m.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){this._resetLayout(),this._manageStamps();var c=this._filterRevealAdded(b);this.layoutItems(this.filteredItems),this.filteredItems=c.concat(this.filteredItems),this.items=b.concat(this.items)}},m.prototype._filterRevealAdded=function(a){var b=this._filter(a);return this.hide(b.needHide),this.reveal(b.matches),this.layoutItems(b.matches,!0),b.matches},m.prototype.insert=function(a){var b=this.addItems(a);if(b.length){var c,d,e=b.length;for(c=0;e>c;c++)d=b[c],this.element.appendChild(d.element);var f=this._filter(b).matches;for(c=0;e>c;c++)b[c].isLayoutInstant=!0;for(this.arrange(),c=0;e>c;c++)delete b[c].isLayoutInstant;this.reveal(f)}};var o=m.prototype.remove;return m.prototype.remove=function(a){a=e.makeArray(a);var b=this.getItems(a);o.call(this,a);var c=b&&b.length;if(c)for(var d=0;c>d;d++){var f=b[d];e.removeFrom(this.filteredItems,f)}},m.prototype.shuffle=function(){for(var a=0,b=this.items.length;b>a;a++){var c=this.items[a];c.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},m.prototype._noTransition=function(a){var b=this.options.transitionDuration;this.options.transitionDuration=0;var c=a.call(this);return this.options.transitionDuration=b,c},m.prototype.getFilteredItemElements=function(){for(var a=[],b=0,c=this.filteredItems.length;c>b;b++)a.push(this.filteredItems[b].element);return a},m});
assets/js/jquery.flexslider.js ADDED
@@ -0,0 +1,1195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery FlexSlider v2.6.0
3
+ * Copyright 2012 WooThemes
4
+ * Contributing Author: Tyler Smith
5
+ */
6
+ ;
7
+ (function ($) {
8
+
9
+ var focused = true;
10
+
11
+ //FlexSlider: Object Instance
12
+ $.flexslider = function(el, options) {
13
+ var slider = $(el);
14
+
15
+ // making variables public
16
+ slider.vars = $.extend({}, $.flexslider.defaults, options);
17
+
18
+ var namespace = slider.vars.namespace,
19
+ msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
20
+ touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch,
21
+ // depricating this idea, as devices are being released with both of these events
22
+ eventType = "click touchend MSPointerUp keyup",
23
+ watchedEvent = "",
24
+ watchedEventClearTimer,
25
+ vertical = slider.vars.direction === "vertical",
26
+ reverse = slider.vars.reverse,
27
+ carousel = (slider.vars.itemWidth > 0),
28
+ fade = slider.vars.animation === "fade",
29
+ asNav = slider.vars.asNavFor !== "",
30
+ methods = {};
31
+
32
+ // Store a reference to the slider object
33
+ $.data(el, "flexslider", slider);
34
+
35
+ // Private slider methods
36
+ methods = {
37
+ init: function() {
38
+ slider.animating = false;
39
+ // Get current slide and make sure it is a number
40
+ slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0), 10 );
41
+ if ( isNaN( slider.currentSlide ) ) { slider.currentSlide = 0; }
42
+ slider.animatingTo = slider.currentSlide;
43
+ slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last);
44
+ slider.containerSelector = slider.vars.selector.substr(0,slider.vars.selector.search(' '));
45
+ slider.slides = $(slider.vars.selector, slider);
46
+ slider.container = $(slider.containerSelector, slider);
47
+ slider.count = slider.slides.length;
48
+ // SYNC:
49
+ slider.syncExists = $(slider.vars.sync).length > 0;
50
+ // SLIDE:
51
+ if (slider.vars.animation === "slide") { slider.vars.animation = "swing"; }
52
+ slider.prop = (vertical) ? "top" : "marginLeft";
53
+ slider.args = {};
54
+ // SLIDESHOW:
55
+ slider.manualPause = false;
56
+ slider.stopped = false;
57
+ //PAUSE WHEN INVISIBLE
58
+ slider.started = false;
59
+ slider.startTimeout = null;
60
+ // TOUCH/USECSS:
61
+ slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function() {
62
+ var obj = document.createElement('div'),
63
+ props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
64
+ for (var i in props) {
65
+ if ( obj.style[ props[i] ] !== undefined ) {
66
+ slider.pfx = props[i].replace('Perspective','').toLowerCase();
67
+ slider.prop = "-" + slider.pfx + "-transform";
68
+ return true;
69
+ }
70
+ }
71
+ return false;
72
+ }());
73
+ slider.ensureAnimationEnd = '';
74
+ // CONTROLSCONTAINER:
75
+ if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer);
76
+ // MANUAL:
77
+ if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls);
78
+
79
+ // CUSTOM DIRECTION NAV:
80
+ if (slider.vars.customDirectionNav !== "") slider.customDirectionNav = $(slider.vars.customDirectionNav).length === 2 && $(slider.vars.customDirectionNav);
81
+
82
+ // RANDOMIZE:
83
+ if (slider.vars.randomize) {
84
+ slider.slides.sort(function() { return (Math.round(Math.random())-0.5); });
85
+ slider.container.empty().append(slider.slides);
86
+ }
87
+
88
+ slider.doMath();
89
+
90
+ // INIT
91
+ slider.setup("init");
92
+
93
+ // CONTROLNAV:
94
+ if (slider.vars.controlNav) { methods.controlNav.setup(); }
95
+
96
+ // DIRECTIONNAV:
97
+ if (slider.vars.directionNav) { methods.directionNav.setup(); }
98
+
99
+ // KEYBOARD:
100
+ if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) {
101
+ $(document).bind('keyup', function(event) {
102
+ var keycode = event.keyCode;
103
+ if (!slider.animating && (keycode === 39 || keycode === 37)) {
104
+ var target = (keycode === 39) ? slider.getTarget('next') :
105
+ (keycode === 37) ? slider.getTarget('prev') : false;
106
+ slider.flexAnimate(target, slider.vars.pauseOnAction);
107
+ }
108
+ });
109
+ }
110
+ // MOUSEWHEEL:
111
+ if (slider.vars.mousewheel) {
112
+ slider.bind('mousewheel', function(event, delta, deltaX, deltaY) {
113
+ event.preventDefault();
114
+ var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev');
115
+ slider.flexAnimate(target, slider.vars.pauseOnAction);
116
+ });
117
+ }
118
+
119
+ // PAUSEPLAY
120
+ if (slider.vars.pausePlay) { methods.pausePlay.setup(); }
121
+
122
+ //PAUSE WHEN INVISIBLE
123
+ if (slider.vars.slideshow && slider.vars.pauseInvisible) { methods.pauseInvisible.init(); }
124
+
125
+ // SLIDSESHOW
126
+ if (slider.vars.slideshow) {
127
+ if (slider.vars.pauseOnHover) {
128
+ slider.hover(function() {
129
+ if (!slider.manualPlay && !slider.manualPause) { slider.pause(); }
130
+ }, function() {
131
+ if (!slider.manualPause && !slider.manualPlay && !slider.stopped) { slider.play(); }
132
+ });
133
+ }
134
+ // initialize animation
135
+ //If we're visible, or we don't use PageVisibility API
136
+ if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) {
137
+ (slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play();
138
+ }
139
+ }
140
+
141
+ // ASNAV:
142
+ if (asNav) { methods.asNav.setup(); }
143
+
144
+ // TOUCH
145
+ if (touch && slider.vars.touch) { methods.touch(); }
146
+
147
+ // FADE&&SMOOTHHEIGHT || SLIDE:
148
+ if (!fade || (fade && slider.vars.smoothHeight)) { $(window).bind("resize orientationchange focus", methods.resize); }
149
+
150
+ slider.find("img").attr("draggable", "false");
151
+
152
+ // API: start() Callback
153
+ setTimeout(function(){
154
+ slider.vars.start(slider);
155
+ }, 200);
156
+ },
157
+ asNav: {
158
+ setup: function() {
159
+ slider.asNav = true;
160
+ slider.animatingTo = Math.floor(slider.currentSlide/slider.move);
161
+ slider.currentItem = slider.currentSlide;
162
+ slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
163
+ if(!msGesture){
164
+ slider.slides.on(eventType, function(e){
165
+ e.preventDefault();
166
+ var $slide = $(this),
167
+ target = $slide.index();
168
+ var posFromLeft = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container
169
+ if( posFromLeft <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) {
170
+ slider.flexAnimate(slider.getTarget("prev"), true);
171
+ } else if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass(namespace + "active-slide")) {
172
+ slider.direction = (slider.currentItem < target) ? "next" : "prev";
173
+ slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
174
+ }
175
+ });
176
+ }else{
177
+ el._slider = slider;
178
+ slider.slides.each(function (){
179
+ var that = this;
180
+ that._gesture = new MSGesture();
181
+ that._gesture.target = that;
182
+ that.addEventListener("MSPointerDown", function (e){
183
+ e.preventDefault();
184
+ if(e.currentTarget._gesture) {
185
+ e.currentTarget._gesture.addPointer(e.pointerId);
186
+ }
187
+ }, false);
188
+ that.addEventListener("MSGestureTap", function (e){
189
+ e.preventDefault();
190
+ var $slide = $(this),
191
+ target = $slide.index();
192
+ if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) {
193
+ slider.direction = (slider.currentItem < target) ? "next" : "prev";
194
+ slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
195
+ }
196
+ });
197
+ });
198
+ }
199
+ }
200
+ },
201
+ controlNav: {
202
+ setup: function() {
203
+ if (!slider.manualControls) {
204
+ methods.controlNav.setupPaging();
205
+ } else { // MANUALCONTROLS:
206
+ methods.controlNav.setupManual();
207
+ }
208
+ },
209
+ setupPaging: function() {
210
+ var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging',
211
+ j = 1,
212
+ item,
213
+ slide;
214
+
215
+ slider.controlNavScaffold = $('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>');
216
+
217
+ if (slider.pagingCount > 1) {
218
+ for (var i = 0; i < slider.pagingCount; i++) {
219
+ slide = slider.slides.eq(i);
220
+ if ( undefined === slide.attr( 'data-thumb-alt' ) ) { slide.attr( 'data-thumb-alt', '' ); }
221
+ altText = ( '' !== slide.attr( 'data-thumb-alt' ) ) ? altText = ' alt="' + slide.attr( 'data-thumb-alt' ) + '"' : '';
222
+ item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"' + altText + '/>' : '<a href="#">' + j + '</a>';
223
+ if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
224
+ var captn = slide.attr( 'data-thumbcaption' );
225
+ if ( '' !== captn && undefined !== captn ) { item += '<span class="' + namespace + 'caption">' + captn + '</span>'; }
226
+ }
227
+ slider.controlNavScaffold.append('<li>' + item + '</li>');
228
+ j++;
229
+ }
230
+ }
231
+
232
+ // CONTROLSCONTAINER:
233
+ (slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold);
234
+ methods.controlNav.set();
235
+
236
+ methods.controlNav.active();
237
+
238
+ slider.controlNavScaffold.delegate('a, img', eventType, function(event) {
239
+ event.preventDefault();
240
+
241
+ if (watchedEvent === "" || watchedEvent === event.type) {
242
+ var $this = $(this),
243
+ target = slider.controlNav.index($this);
244
+
245
+ if (!$this.hasClass(namespace + 'active')) {
246
+ slider.direction = (target > slider.currentSlide) ? "next" : "prev";
247
+ slider.flexAnimate(target, slider.vars.pauseOnAction);
248
+ }
249
+ }
250
+
251
+ // setup flags to prevent event duplication
252
+ if (watchedEvent === "") {
253
+ watchedEvent = event.type;
254
+ }
255
+ methods.setToClearWatchedEvent();
256
+
257
+ });
258
+ },
259
+ setupManual: function() {
260
+ slider.controlNav = slider.manualControls;
261
+ methods.controlNav.active();
262
+
263
+ slider.controlNav.bind(eventType, function(event) {
264
+ event.preventDefault();
265
+
266
+ if (watchedEvent === "" || watchedEvent === event.type) {
267
+ var $this = $(this),
268
+ target = slider.controlNav.index($this);
269
+
270
+ if (!$this.hasClass(namespace + 'active')) {
271
+ (target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
272
+ slider.flexAnimate(target, slider.vars.pauseOnAction);
273
+ }
274
+ }
275
+
276
+ // setup flags to prevent event duplication
277
+ if (watchedEvent === "") {
278
+ watchedEvent = event.type;
279
+ }
280
+ methods.setToClearWatchedEvent();
281
+ });
282
+ },
283
+ set: function() {
284
+ var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a';
285
+ slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider);
286
+ },
287
+ active: function() {
288
+ slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
289
+ },
290
+ update: function(action, pos) {
291
+ if (slider.pagingCount > 1 && action === "add") {
292
+ slider.controlNavScaffold.append($('<li><a href="#">' + slider.count + '</a></li>'));
293
+ } else if (slider.pagingCount === 1) {
294
+ slider.controlNavScaffold.find('li').remove();
295
+ } else {
296
+ slider.controlNav.eq(pos).closest('li').remove();
297
+ }
298
+ methods.controlNav.set();
299
+ (slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
300
+ }
301
+ },
302
+ directionNav: {
303
+ setup: function() {
304
+ var directionNavScaffold = $('<ul class="' + namespace + 'direction-nav"><li class="' + namespace + 'nav-prev"><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li class="' + namespace + 'nav-next"><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>');
305
+
306
+ // CUSTOM DIRECTION NAV:
307
+ if (slider.customDirectionNav) {
308
+ slider.directionNav = slider.customDirectionNav;
309
+ // CONTROLSCONTAINER:
310
+ } else if (slider.controlsContainer) {
311
+ $(slider.controlsContainer).append(directionNavScaffold);
312
+ slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer);
313
+ } else {
314
+ slider.append(directionNavScaffold);
315
+ slider.directionNav = $('.' + namespace + 'direction-nav li a', slider);
316
+ }
317
+
318
+ methods.directionNav.update();
319
+
320
+ slider.directionNav.bind(eventType, function(event) {
321
+ event.preventDefault();
322
+ var target;
323
+
324
+ if (watchedEvent === "" || watchedEvent === event.type) {
325
+ target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev');
326
+ slider.flexAnimate(target, slider.vars.pauseOnAction);
327
+ }
328
+
329
+ // setup flags to prevent event duplication
330
+ if (watchedEvent === "") {
331
+ watchedEvent = event.type;
332
+ }
333
+ methods.setToClearWatchedEvent();
334
+ });
335
+ },
336
+ update: function() {
337
+ var disabledClass = namespace + 'disabled';
338
+ if (slider.pagingCount === 1) {
339
+ slider.directionNav.addClass(disabledClass).attr('tabindex', '-1');
340
+ } else if (!slider.vars.animationLoop) {
341
+ if (slider.animatingTo === 0) {
342
+ slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1');
343
+ } else if (slider.animatingTo === slider.last) {
344
+ slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1');
345
+ } else {
346
+ slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
347
+ }
348
+ } else {
349
+ slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
350
+ }
351
+ }
352
+ },
353
+ pausePlay: {
354
+ setup: function() {
355
+ var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a href="#"></a></div>');
356
+
357
+ // CONTROLSCONTAINER:
358
+ if (slider.controlsContainer) {
359
+ slider.controlsContainer.append(pausePlayScaffold);
360
+ slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer);
361
+ } else {
362
+ slider.append(pausePlayScaffold);
363
+ slider.pausePlay = $('.' + namespace + 'pauseplay a', slider);
364
+ }
365
+
366
+ methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play');
367
+
368
+ slider.pausePlay.bind(eventType, function(event) {
369
+ event.preventDefault();
370
+
371
+ if (watchedEvent === "" || watchedEvent === event.type) {
372
+ if ($(this).hasClass(namespace + 'pause')) {
373
+ slider.manualPause = true;
374
+ slider.manualPlay = false;
375
+ slider.pause();
376
+ } else {
377
+ slider.manualPause = false;
378
+ slider.manualPlay = true;
379
+ slider.play();
380
+ }
381
+ }
382
+
383
+ // setup flags to prevent event duplication
384
+ if (watchedEvent === "") {
385
+ watchedEvent = event.type;
386
+ }
387
+ methods.setToClearWatchedEvent();
388
+ });
389
+ },
390
+ update: function(state) {
391
+ (state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText);
392
+ }
393
+ },
394
+ touch: function() {
395
+ var startX,
396
+ startY,
397
+ offset,
398
+ cwidth,
399
+ dx,
400
+ startT,
401
+ onTouchStart,
402
+ onTouchMove,
403
+ onTouchEnd,
404
+ scrolling = false,
405
+ localX = 0,
406
+ localY = 0,
407
+ accDx = 0;
408
+
409
+ if(!msGesture){
410
+ onTouchStart = function(e) {
411
+ if (slider.animating) {
412
+ e.preventDefault();
413
+ } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
414
+ slider.pause();
415
+ // CAROUSEL:
416
+ cwidth = (vertical) ? slider.h : slider. w;
417
+ startT = Number(new Date());
418
+ // CAROUSEL:
419
+
420
+ // Local vars for X and Y points.
421
+ localX = e.touches[0].pageX;
422
+ localY = e.touches[0].pageY;
423
+
424
+ offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
425
+ (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
426
+ (carousel && slider.currentSlide === slider.last) ? slider.limit :
427
+ (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
428
+ (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
429
+ startX = (vertical) ? localY : localX;
430
+ startY = (vertical) ? localX : localY;
431
+
432
+ el.addEventListener('touchmove', onTouchMove, false);
433
+ el.addEventListener('touchend', onTouchEnd, false);
434
+ }
435
+ };
436
+
437
+ onTouchMove = function(e) {
438
+ // Local vars for X and Y points.
439
+
440
+ localX = e.touches[0].pageX;
441
+ localY = e.touches[0].pageY;
442
+
443
+ dx = (vertical) ? startX - localY : startX - localX;
444
+ scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY));
445
+
446
+ var fxms = 500;
447
+
448
+ if ( ! scrolling || Number( new Date() ) - startT > fxms ) {
449
+ e.preventDefault();
450
+ if (!fade && slider.transitions) {
451
+ if (!slider.vars.animationLoop) {
452
+ dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
453
+ }
454
+ slider.setProps(offset + dx, "setTouch");
455
+ }
456
+ }
457
+ };
458
+
459
+ onTouchEnd = function(e) {
460
+ // finish the touch by undoing the touch session
461
+ el.removeEventListener('touchmove', onTouchMove, false);
462
+
463
+ if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
464
+ var updateDx = (reverse) ? -dx : dx,
465
+ target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
466
+
467
+ if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
468
+ slider.flexAnimate(target, slider.vars.pauseOnAction);
469
+ } else {
470
+ if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
471
+ }
472
+ }
473
+ el.removeEventListener('touchend', onTouchEnd, false);
474
+
475
+ startX = null;
476
+ startY = null;
477
+ dx = null;
478
+ offset = null;
479
+ };
480
+
481
+ el.addEventListener('touchstart', onTouchStart, false);
482
+ }else{
483
+ el.style.msTouchAction = "none";
484
+ el._gesture = new MSGesture();
485
+ el._gesture.target = el;
486
+ el.addEventListener("MSPointerDown", onMSPointerDown, false);
487
+ el._slider = slider;
488
+ el.addEventListener("MSGestureChange", onMSGestureChange, false);
489
+ el.addEventListener("MSGestureEnd", onMSGestureEnd, false);
490
+
491
+ function onMSPointerDown(e){
492
+ e.stopPropagation();
493
+ if (slider.animating) {
494
+ e.preventDefault();
495
+ }else{
496
+ slider.pause();
497
+ el._gesture.addPointer(e.pointerId);
498
+ accDx = 0;
499
+ cwidth = (vertical) ? slider.h : slider. w;
500
+ startT = Number(new Date());
501
+ // CAROUSEL:
502
+
503
+ offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
504
+ (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
505
+ (carousel && slider.currentSlide === slider.last) ? slider.limit :
506
+ (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
507
+ (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
508
+ }
509
+ }
510
+
511
+ function onMSGestureChange(e) {
512
+ e.stopPropagation();
513
+ var slider = e.target._slider;
514
+ if(!slider){
515
+ return;
516
+ }
517
+ var transX = -e.translationX,
518
+ transY = -e.translationY;
519
+
520
+ //Accumulate translations.
521
+ accDx = accDx + ((vertical) ? transY : transX);
522
+ dx = accDx;
523
+ scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY));
524
+
525
+ if(e.detail === e.MSGESTURE_FLAG_INERTIA){
526
+ setImmediate(function (){
527
+ el._gesture.stop();
528
+ });
529
+
530
+ return;
531
+ }
532
+
533
+ if (!scrolling || Number(new Date()) - startT > 500) {
534
+ e.preventDefault();
535
+ if (!fade && slider.transitions) {
536
+ if (!slider.vars.animationLoop) {
537
+ dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1);
538
+ }
539
+ slider.setProps(offset + dx, "setTouch");
540
+ }
541
+ }
542
+ }
543
+
544
+ function onMSGestureEnd(e) {
545
+ e.stopPropagation();
546
+ var slider = e.target._slider;
547
+ if(!slider){
548
+ return;
549
+ }
550
+ if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
551
+ var updateDx = (reverse) ? -dx : dx,
552
+ target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
553
+
554
+ if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
555
+ slider.flexAnimate(target, slider.vars.pauseOnAction);
556
+ } else {
557
+ if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
558
+ }
559
+ }
560
+
561
+ startX = null;
562
+ startY = null;
563
+ dx = null;
564
+ offset = null;
565
+ accDx = 0;
566
+ }
567
+ }
568
+ },
569
+ resize: function() {
570
+ if (!slider.animating && slider.is(':visible')) {
571
+ if (!carousel) { slider.doMath(); }
572
+
573
+ if (fade) {
574
+ // SMOOTH HEIGHT:
575
+ methods.smoothHeight();
576
+ } else if (carousel) { //CAROUSEL:
577
+ slider.slides.width(slider.computedW);
578
+ slider.update(slider.pagingCount);
579
+ slider.setProps();
580
+ }
581
+ else if (vertical) { //VERTICAL:
582
+ slider.viewport.height(slider.h);
583
+ slider.setProps(slider.h, "setTotal");
584
+ } else {
585
+ // SMOOTH HEIGHT:
586
+ if (slider.vars.smoothHeight) { methods.smoothHeight(); }
587
+ slider.newSlides.width(slider.computedW);
588
+ slider.setProps(slider.computedW, "setTotal");
589
+ }
590
+ }
591
+ },
592
+ smoothHeight: function(dur) {
593
+ if (!vertical || fade) {
594
+ var $obj = (fade) ? slider : slider.viewport;
595
+ (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height());
596
+ }
597
+ },
598
+ sync: function(action) {
599
+ var $obj = $(slider.vars.sync).data("flexslider"),
600
+ target = slider.animatingTo;
601
+
602
+ switch (action) {
603
+ case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break;
604
+ case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break;
605
+ case "pause": $obj.pause(); break;
606
+ }
607
+ },
608
+ uniqueID: function($clone) {
609
+ // Append _clone to current level and children elements with id attributes
610
+ $clone.filter( '[id]' ).add($clone.find( '[id]' )).each(function() {
611
+ var $this = $(this);
612
+ $this.attr( 'id', $this.attr( 'id' ) + '_clone' );
613
+ });
614
+ return $clone;
615
+ },
616
+ pauseInvisible: {
617
+ visProp: null,
618
+ init: function() {
619
+ var visProp = methods.pauseInvisible.getHiddenProp();
620
+ if (visProp) {
621
+ var evtname = visProp.replace(/[H|h]idden/,'') + 'visibilitychange';
622
+ document.addEventListener(evtname, function() {
623
+ if (methods.pauseInvisible.isHidden()) {
624
+ if(slider.startTimeout) {
625
+ clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible
626
+ } else {
627
+ slider.pause(); //Or just pause
628
+ }
629
+ }
630
+ else {
631
+ if(slider.started) {
632
+ slider.play(); //Initiated before, just play
633
+ } else {
634
+ if (slider.vars.initDelay > 0) {
635
+ setTimeout(slider.play, slider.vars.initDelay);
636
+ } else {
637
+ slider.play(); //Didn't init before: simply init or wait for it
638
+ }
639
+ }
640
+ }
641
+ });
642
+ }
643
+ },
644
+ isHidden: function() {
645
+ var prop = methods.pauseInvisible.getHiddenProp();
646
+ if (!prop) {
647
+ return false;
648
+ }
649
+ return document[prop];
650
+ },
651
+ getHiddenProp: function() {
652
+ var prefixes = ['webkit','moz','ms','o'];
653
+ // if 'hidden' is natively supported just return it
654
+ if ('hidden' in document) {
655
+ return 'hidden';
656
+ }
657
+ // otherwise loop over all the known prefixes until we find one
658
+ for ( var i = 0; i < prefixes.length; i++ ) {
659
+ if ((prefixes[i] + 'Hidden') in document) {
660
+ return prefixes[i] + 'Hidden';
661
+ }
662
+ }
663
+ // otherwise it's not supported
664
+ return null;
665
+ }
666
+ },
667
+ setToClearWatchedEvent: function() {
668
+ clearTimeout(watchedEventClearTimer);
669
+ watchedEventClearTimer = setTimeout(function() {
670
+ watchedEvent = "";
671
+ }, 3000);
672
+ }
673
+ };
674
+
675
+ // public methods
676
+ slider.flexAnimate = function(target, pause, override, withSync, fromNav) {
677
+ if (!slider.vars.animationLoop && target !== slider.currentSlide) {
678
+ slider.direction = (target > slider.currentSlide) ? "next" : "prev";
679
+ }
680
+
681
+ if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev";
682
+
683
+ if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) {
684
+ if (asNav && withSync) {
685
+ var master = $(slider.vars.asNavFor).data('flexslider');
686
+ slider.atEnd = target === 0 || target === slider.count - 1;
687
+ master.flexAnimate(target, true, false, true, fromNav);
688
+ slider.direction = (slider.currentItem < target) ? "next" : "prev";
689
+ master.direction = slider.direction;
690
+
691
+ if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) {
692
+ slider.currentItem = target;
693
+ slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
694
+ target = Math.floor(target/slider.visible);
695
+ } else {
696
+ slider.currentItem = target;
697
+ slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
698
+ return false;
699
+ }
700
+ }
701
+
702
+ slider.animating = true;
703
+ slider.animatingTo = target;
704
+
705
+ // SLIDESHOW:
706
+ if (pause) { slider.pause(); }
707
+
708
+ // API: before() animation Callback
709
+ slider.vars.before(slider);
710
+
711
+ // SYNC:
712
+ if (slider.syncExists && !fromNav) { methods.sync("animate"); }
713
+
714
+ // CONTROLNAV
715
+ if (slider.vars.controlNav) { methods.controlNav.active(); }
716
+
717
+ // !CAROUSEL:
718
+ // CANDIDATE: slide active class (for add/remove slide)
719
+ if (!carousel) { slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide'); }
720
+
721
+ // INFINITE LOOP:
722
+ // CANDIDATE: atEnd
723
+ slider.atEnd = target === 0 || target === slider.last;
724
+
725
+ // DIRECTIONNAV:
726
+ if (slider.vars.directionNav) { methods.directionNav.update(); }
727
+
728
+ if (target === slider.last) {
729
+ // API: end() of cycle Callback
730
+ slider.vars.end(slider);
731
+ // SLIDESHOW && !INFINITE LOOP:
732
+ if (!slider.vars.animationLoop) { slider.pause(); }
733
+ }
734
+
735
+ // SLIDE:
736
+ if (!fade) {
737
+ var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW,
738
+ margin, slideString, calcNext;
739
+
740
+ // INFINITE LOOP / REVERSE:
741
+ if (carousel) {
742
+ margin = slider.vars.itemMargin;
743
+ calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo;
744
+ slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext;
745
+ } else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") {
746
+ slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0;
747
+ } else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") {
748
+ slideString = (reverse) ? 0 : (slider.count + 1) * dimension;
749
+ } else {
750
+ slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
751
+ }
752
+ slider.setProps(slideString, "", slider.vars.animationSpeed);
753
+ if (slider.transitions) {
754
+ if (!slider.vars.animationLoop || !slider.atEnd) {
755
+ slider.animating = false;
756
+ slider.currentSlide = slider.animatingTo;
757
+ }
758
+
759
+ // Unbind previous transitionEnd events and re-bind new transitionEnd event
760
+ slider.container.unbind("webkitTransitionEnd transitionend");
761
+ slider.container.bind("webkitTransitionEnd transitionend", function() {
762
+ clearTimeout(slider.ensureAnimationEnd);
763
+ slider.wrapup(dimension);
764
+ });
765
+
766
+ // Insurance for the ever-so-fickle transitionEnd event
767
+ clearTimeout(slider.ensureAnimationEnd);
768
+ slider.ensureAnimationEnd = setTimeout(function() {
769
+ slider.wrapup(dimension);
770
+ }, slider.vars.animationSpeed + 100);
771
+
772
+ } else {
773
+ slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){
774
+ slider.wrapup(dimension);
775
+ });
776
+ }
777
+ } else { // FADE:
778
+ if (!touch) {
779
+ //slider.slides.eq(slider.currentSlide).fadeOut(slider.vars.animationSpeed, slider.vars.easing);
780
+ //slider.slides.eq(target).fadeIn(slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
781
+
782
+ slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing);
783
+ slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
784
+
785
+ } else {
786
+ slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
787
+ slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
788
+ slider.wrapup(dimension);
789
+ }
790
+ }
791
+ // SMOOTH HEIGHT:
792
+ if (slider.vars.smoothHeight) { methods.smoothHeight(slider.vars.animationSpeed); }
793
+ }
794
+ };
795
+ slider.wrapup = function(dimension) {
796
+ // SLIDE:
797
+ if (!fade && !carousel) {
798
+ if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) {
799
+ slider.setProps(dimension, "jumpEnd");
800
+ } else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) {
801
+ slider.setProps(dimension, "jumpStart");
802
+ }
803
+ }
804
+ slider.animating = false;
805
+ slider.currentSlide = slider.animatingTo;
806
+ // API: after() animation Callback
807
+ slider.vars.after(slider);
808
+ };
809
+
810
+ // SLIDESHOW:
811
+ slider.animateSlides = function() {
812
+ if (!slider.animating && focused ) { slider.flexAnimate(slider.getTarget("next")); }
813
+ };
814
+ // SLIDESHOW:
815
+ slider.pause = function() {
816
+ clearInterval(slider.animatedSlides);
817
+ slider.animatedSlides = null;
818
+ slider.playing = false;
819
+ // PAUSEPLAY:
820
+ if (slider.vars.pausePlay) { methods.pausePlay.update("play"); }
821
+ // SYNC:
822
+ if (slider.syncExists) { methods.sync("pause"); }
823
+ };
824
+ // SLIDESHOW:
825
+ slider.play = function() {
826
+ if (slider.playing) { clearInterval(slider.animatedSlides); }
827
+ slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
828
+ slider.started = slider.playing = true;
829
+ // PAUSEPLAY:
830
+ if (slider.vars.pausePlay) { methods.pausePlay.update("pause"); }
831
+ // SYNC:
832
+ if (slider.syncExists) { methods.sync("play"); }
833
+ };
834
+ // STOP:
835
+ slider.stop = function () {
836
+ slider.pause();
837
+ slider.stopped = true;
838
+ };
839
+ slider.canAdvance = function(target, fromNav) {
840
+ // ASNAV:
841
+ var last = (asNav) ? slider.pagingCount - 1 : slider.last;
842
+ return (fromNav) ? true :
843
+ (asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true :
844
+ (asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false :
845
+ (target === slider.currentSlide && !asNav) ? false :
846
+ (slider.vars.animationLoop) ? true :
847
+ (slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false :
848
+ (slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false :
849
+ true;
850
+ };
851
+ slider.getTarget = function(dir) {
852
+ slider.direction = dir;
853
+ if (dir === "next") {
854
+ return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1;
855
+ } else {
856
+ return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1;
857
+ }
858
+ };
859
+
860
+ // SLIDE:
861
+ slider.setProps = function(pos, special, dur) {
862
+ var target = (function() {
863
+ var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo,
864
+ posCalc = (function() {
865
+ if (carousel) {
866
+ return (special === "setTouch") ? pos :
867
+ (reverse && slider.animatingTo === slider.last) ? 0 :
868
+ (reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
869
+ (slider.animatingTo === slider.last) ? slider.limit : posCheck;
870
+ } else {
871
+ switch (special) {
872
+ case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos;
873
+ case "setTouch": return (reverse) ? pos : pos;
874
+ case "jumpEnd": return (reverse) ? pos : slider.count * pos;
875
+ case "jumpStart": return (reverse) ? slider.count * pos : pos;
876
+ default: return pos;
877
+ }
878
+ }
879
+ }());
880
+
881
+ return (posCalc * -1) + "px";
882
+ }());
883
+
884
+ if (slider.transitions) {
885
+ target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)";
886
+ dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
887
+ slider.container.css("-" + slider.pfx + "-transition-duration", dur);
888
+ slider.container.css("transition-duration", dur);
889
+ }
890
+
891
+ slider.args[slider.prop] = target;
892
+ if (slider.transitions || dur === undefined) { slider.container.css(slider.args); }
893
+
894
+ slider.container.css('transform',target);
895
+ };
896
+
897
+ slider.setup = function(type) {
898
+ // SLIDE:
899
+ if (!fade) {
900
+ var sliderOffset, arr;
901
+
902
+ if (type === "init") {
903
+ slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
904
+ // INFINITE LOOP:
905
+ slider.cloneCount = 0;
906
+ slider.cloneOffset = 0;
907
+ // REVERSE:
908
+ if (reverse) {
909
+ arr = $.makeArray(slider.slides).reverse();
910
+ slider.slides = $(arr);
911
+ slider.container.empty().append(slider.slides);
912
+ }
913
+ }
914
+ // INFINITE LOOP && !CAROUSEL:
915
+ if (slider.vars.animationLoop && !carousel) {
916
+ slider.cloneCount = 2;
917
+ slider.cloneOffset = 1;
918
+ // clear out old clones
919
+ if (type !== "init") { slider.container.find('.clone').remove(); }
920
+ slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true'))
921
+ .prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true'));
922
+ }
923
+ slider.newSlides = $(slider.vars.selector, slider);
924
+
925
+ sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset;
926
+ // VERTICAL:
927
+ if (vertical && !carousel) {
928
+ slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
929
+ setTimeout(function(){
930
+ slider.newSlides.css({"display": "block"});
931
+ slider.doMath();
932
+ slider.viewport.height(slider.h);
933
+ slider.setProps(sliderOffset * slider.h, "init");
934
+ }, (type === "init") ? 100 : 0);
935
+ } else {
936
+ slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
937
+ slider.setProps(sliderOffset * slider.computedW, "init");
938
+ setTimeout(function(){
939
+ slider.doMath();
940
+ slider.newSlides.css({"width": slider.computedW, "marginRight" : slider.computedM, "float": "left", "display": "block"});
941
+ // SMOOTH HEIGHT:
942
+ if (slider.vars.smoothHeight) { methods.smoothHeight(); }
943
+ }, (type === "init") ? 100 : 0);
944
+ }
945
+ } else { // FADE:
946
+ slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"});
947
+ if (type === "init") {
948
+ if (!touch) {
949
+ //slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing);
950
+ if (slider.vars.fadeFirstSlide == false) {
951
+ slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).css({"opacity": 1});
952
+ } else {
953
+ slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing);
954
+ }
955
+ } else {
956
+ slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2});
957
+ }
958
+ }
959
+ // SMOOTH HEIGHT:
960
+ if (slider.vars.smoothHeight) { methods.smoothHeight(); }
961
+ }
962
+ // !CAROUSEL:
963
+ // CANDIDATE: active slide
964
+ if (!carousel) { slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide"); }
965
+
966
+ //FlexSlider: init() Callback
967
+ slider.vars.init(slider);
968
+ };
969
+
970
+ slider.doMath = function() {
971
+ var slide = slider.slides.first(),
972
+ slideMargin = slider.vars.itemMargin,
973
+ minItems = slider.vars.minItems,
974
+ maxItems = slider.vars.maxItems;
975
+
976
+ slider.w = (slider.viewport===undefined) ? slider.width() : slider.viewport.width();
977
+ slider.h = slide.height();
978
+ slider.boxPadding = slide.outerWidth() - slide.width();
979
+
980
+ // CAROUSEL:
981
+ if (carousel) {
982
+ slider.itemT = slider.vars.itemWidth + slideMargin;
983
+ slider.itemM = slideMargin;
984
+ slider.minW = (minItems) ? minItems * slider.itemT : slider.w;
985
+ slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w;
986
+ slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems :
987
+ (slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems :
988
+ (slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth;
989
+
990
+ slider.visible = Math.floor(slider.w/(slider.itemW));
991
+ slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible;
992
+ slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
993
+ slider.last = slider.pagingCount - 1;
994
+ slider.limit = (slider.pagingCount === 1) ? 0 :
995
+ (slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
996
+ } else {
997
+ slider.itemW = slider.w;
998
+ slider.itemM = slideMargin;
999
+ slider.pagingCount = slider.count;
1000
+ slider.last = slider.count - 1;
1001
+ }
1002
+ slider.computedW = slider.itemW - slider.boxPadding;
1003
+ slider.computedM = slider.itemM;
1004
+ };
1005
+
1006
+ slider.update = function(pos, action) {
1007
+ slider.doMath();
1008
+
1009
+ // update currentSlide and slider.animatingTo if necessary
1010
+ if (!carousel) {
1011
+ if (pos < slider.currentSlide) {
1012
+ slider.currentSlide += 1;
1013
+ } else if (pos <= slider.currentSlide && pos !== 0) {
1014
+ slider.currentSlide -= 1;
1015
+ }
1016
+ slider.animatingTo = slider.currentSlide;
1017
+ }
1018
+
1019
+ // update controlNav
1020
+ if (slider.vars.controlNav && !slider.manualControls) {
1021
+ if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) {
1022
+ methods.controlNav.update("add");
1023
+ } else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) {
1024
+ if (carousel && slider.currentSlide > slider.last) {
1025
+ slider.currentSlide -= 1;
1026
+ slider.animatingTo -= 1;
1027
+ }
1028
+ methods.controlNav.update("remove", slider.last);
1029
+ }
1030
+ }
1031
+ // update directionNav
1032
+ if (slider.vars.directionNav) { methods.directionNav.update(); }
1033
+
1034
+ };
1035
+
1036
+ slider.addSlide = function(obj, pos) {
1037
+ var $obj = $(obj);
1038
+
1039
+ slider.count += 1;
1040
+ slider.last = slider.count - 1;
1041
+
1042
+ // append new slide
1043
+ if (vertical && reverse) {
1044
+ (pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj);
1045
+ } else {
1046
+ (pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj);
1047
+ }
1048
+
1049
+ // update currentSlide, animatingTo, controlNav, and directionNav
1050
+ slider.update(pos, "add");
1051
+
1052
+ // update slider.slides
1053
+ slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
1054
+ // re-setup the slider to accomdate new slide
1055
+ slider.setup();
1056
+
1057
+ //FlexSlider: added() Callback
1058
+ slider.vars.added(slider);
1059
+ };
1060
+ slider.removeSlide = function(obj) {
1061
+ var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;
1062
+
1063
+ // update count
1064
+ slider.count -= 1;
1065
+ slider.last = slider.count - 1;
1066
+
1067
+ // remove slide
1068
+ if (isNaN(obj)) {
1069
+ $(obj, slider.slides).remove();
1070
+ } else {
1071
+ (vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove();
1072
+ }
1073
+
1074
+ // update currentSlide, animatingTo, controlNav, and directionNav
1075
+ slider.doMath();
1076
+ slider.update(pos, "remove");
1077
+
1078
+ // update slider.slides
1079
+ slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
1080
+ // re-setup the slider to accomdate new slide
1081
+ slider.setup();
1082
+
1083
+ // FlexSlider: removed() Callback
1084
+ slider.vars.removed(slider);
1085
+ };
1086
+
1087
+ //FlexSlider: Initialize
1088
+ methods.init();
1089
+ };
1090
+
1091
+ // Ensure the slider isn't focussed if the window loses focus.
1092
+ $( window ).blur( function ( e ) {
1093
+ focused = false;
1094
+ }).focus( function ( e ) {
1095
+ focused = true;
1096
+ });
1097
+
1098
+ //FlexSlider: Default Settings
1099
+ $.flexslider.defaults = {
1100
+ namespace: "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin
1101
+ selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
1102
+ animation: "fade", //String: Select your animation type, "fade" or "slide"
1103
+ easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
1104
+ direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
1105
+ reverse: false, //{NEW} Boolean: Reverse the animation direction
1106
+ animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
1107
+ smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
1108
+ startAt: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide)
1109
+ slideshow: true, //Boolean: Animate slider automatically
1110
+ slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds
1111
+ animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds
1112
+ initDelay: 0, //{NEW} Integer: Set an initialization delay, in milliseconds
1113
+ randomize: false, //Boolean: Randomize slide order
1114
+ fadeFirstSlide: true, //Boolean: Fade in the first slide when animation type is "fade"
1115
+ thumbCaptions: false, //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav.
1116
+
1117
+ // Usability features
1118
+ pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
1119
+ pauseOnHover: false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
1120
+ pauseInvisible: true, //{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage.
1121
+ useCSS: true, //{NEW} Boolean: Slider will use CSS3 transitions if available
1122
+ touch: true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
1123
+ video: false, //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches
1124
+
1125
+ // Primary Controls
1126
+ controlNav: true, //Boolean: Create navigation for paging control of each slide? Note: Leave true for manualControls usage
1127
+ directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false)
1128
+ prevText: "Previous", //String: Set the text for the "previous" directionNav item
1129
+ nextText: "Next", //String: Set the text for the "next" directionNav item
1130
+
1131
+ // Secondary Navigation
1132
+ keyboard: true, //Boolean: Allow slider navigating via keyboard left/right keys
1133
+ multipleKeyboard: false, //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
1134
+ mousewheel: false, //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
1135
+ pausePlay: false, //Boolean: Create pause/play dynamic element
1136
+ pauseText: "Pause", //String: Set the text for the "pause" pausePlay item
1137
+ playText: "Play", //String: Set the text for the "play" pausePlay item
1138
+
1139
+ // Special properties
1140
+ controlsContainer: "", //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found.
1141
+ manualControls: "", //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
1142
+ customDirectionNav: "", //{NEW} jQuery Object/Selector: Custom prev / next button. Must be two jQuery elements. In order to make the events work they have to have the classes "prev" and "next" (plus namespace)
1143
+ sync: "", //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
1144
+ asNavFor: "", //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider
1145
+
1146
+ // Carousel Options
1147
+ itemWidth: 0, //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
1148
+ itemMargin: 0, //{NEW} Integer: Margin between carousel items.
1149
+ minItems: 1, //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
1150
+ maxItems: 0, //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
1151
+ move: 0, //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
1152
+ allowOneSlide: true, //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide
1153
+
1154
+ // Callback API
1155
+ start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide
1156
+ before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation
1157
+ after: function(){}, //Callback: function(slider) - Fires after each slider animation completes
1158
+ end: function(){}, //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
1159
+ added: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is added
1160
+ removed: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is removed
1161
+ init: function() {} //{NEW} Callback: function(slider) - Fires after the slider is initially setup
1162
+ };
1163
+
1164
+ //FlexSlider: Plugin Function
1165
+ $.fn.flexslider = function(options) {
1166
+ if (options === undefined) { options = {}; }
1167
+
1168
+ if (typeof options === "object") {
1169
+ return this.each(function() {
1170
+ var $this = $(this),
1171
+ selector = (options.selector) ? options.selector : ".slides > li",
1172
+ $slides = $this.find(selector);
1173
+
1174
+ if ( ( $slides.length === 1 && options.allowOneSlide === true ) || $slides.length === 0 ) {
1175
+ $slides.fadeIn(400);
1176
+ if (options.start) { options.start($this); }
1177
+ } else if ($this.data('flexslider') === undefined) {
1178
+ new $.flexslider(this, options);
1179
+ }
1180
+ });
1181
+ } else {
1182
+ // Helper strings to quickly perform functions on the slider
1183
+ var $slider = $(this).data('flexslider');
1184
+ switch (options) {
1185
+ case "play": $slider.play(); break;
1186
+ case "pause": $slider.pause(); break;
1187
+ case "stop": $slider.stop(); break;
1188
+ case "next": $slider.flexAnimate($slider.getTarget("next"), true); break;
1189
+ case "prev":
1190
+ case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break;
1191
+ default: if (typeof options === "number") { $slider.flexAnimate(options, true); }
1192
+ }
1193
+ }
1194
+ };
1195
+ })(jQuery);
assets/js/jquery.flexslider.min.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ /*
2
+ * jQuery FlexSlider v2.6.0
3
+ * Copyright 2012 WooThemes
4
+ * Contributing Author: Tyler Smith
5
+ */!function($){var e=!0;$.flexslider=function(t,a){var n=$(t);n.vars=$.extend({},$.flexslider.defaults,a);var i=n.vars.namespace,s=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,r=("ontouchstart"in window||s||window.DocumentTouch&&document instanceof DocumentTouch)&&n.vars.touch,o="click touchend MSPointerUp keyup",l="",c,d="vertical"===n.vars.direction,u=n.vars.reverse,v=n.vars.itemWidth>0,p="fade"===n.vars.animation,m=""!==n.vars.asNavFor,f={};$.data(t,"flexslider",n),f={init:function(){n.animating=!1,n.currentSlide=parseInt(n.vars.startAt?n.vars.startAt:0,10),isNaN(n.currentSlide)&&(n.currentSlide=0),n.animatingTo=n.currentSlide,n.atEnd=0===n.currentSlide||n.currentSlide===n.last,n.containerSelector=n.vars.selector.substr(0,n.vars.selector.search(" ")),n.slides=$(n.vars.selector,n),n.container=$(n.containerSelector,n),n.count=n.slides.length,n.syncExists=$(n.vars.sync).length>0,"slide"===n.vars.animation&&(n.vars.animation="swing"),n.prop=d?"top":"marginLeft",n.args={},n.manualPause=!1,n.stopped=!1,n.started=!1,n.startTimeout=null,n.transitions=!n.vars.video&&!p&&n.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var a in t)if(void 0!==e.style[t[a]])return n.pfx=t[a].replace("Perspective","").toLowerCase(),n.prop="-"+n.pfx+"-transform",!0;return!1}(),n.ensureAnimationEnd="",""!==n.vars.controlsContainer&&(n.controlsContainer=$(n.vars.controlsContainer).length>0&&$(n.vars.controlsContainer)),""!==n.vars.manualControls&&(n.manualControls=$(n.vars.manualControls).length>0&&$(n.vars.manualControls)),""!==n.vars.customDirectionNav&&(n.customDirectionNav=2===$(n.vars.customDirectionNav).length&&$(n.vars.customDirectionNav)),n.vars.randomize&&(n.slides.sort(function(){return Math.round(Math.random())-.5}),n.container.empty().append(n.slides)),n.doMath(),n.setup("init"),n.vars.controlNav&&f.controlNav.setup(),n.vars.directionNav&&f.directionNav.setup(),n.vars.keyboard&&(1===$(n.containerSelector).length||n.vars.multipleKeyboard)&&$(document).bind("keyup",function(e){var t=e.keyCode;if(!n.animating&&(39===t||37===t)){var a=39===t?n.getTarget("next"):37===t?n.getTarget("prev"):!1;n.flexAnimate(a,n.vars.pauseOnAction)}}),n.vars.mousewheel&&n.bind("mousewheel",function(e,t,a,i){e.preventDefault();var s=0>t?n.getTarget("next"):n.getTarget("prev");n.flexAnimate(s,n.vars.pauseOnAction)}),n.vars.pausePlay&&f.pausePlay.setup(),n.vars.slideshow&&n.vars.pauseInvisible&&f.pauseInvisible.init(),n.vars.slideshow&&(n.vars.pauseOnHover&&n.hover(function(){n.manualPlay||n.manualPause||n.pause()},function(){n.manualPause||n.manualPlay||n.stopped||n.play()}),n.vars.pauseInvisible&&f.pauseInvisible.isHidden()||(n.vars.initDelay>0?n.startTimeout=setTimeout(n.play,n.vars.initDelay):n.play())),m&&f.asNav.setup(),r&&n.vars.touch&&f.touch(),(!p||p&&n.vars.smoothHeight)&&$(window).bind("resize orientationchange focus",f.resize),n.find("img").attr("draggable","false"),setTimeout(function(){n.vars.start(n)},200)},asNav:{setup:function(){n.asNav=!0,n.animatingTo=Math.floor(n.currentSlide/n.move),n.currentItem=n.currentSlide,n.slides.removeClass(i+"active-slide").eq(n.currentItem).addClass(i+"active-slide"),s?(t._slider=n,n.slides.each(function(){var e=this;e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),e.addEventListener("MSGestureTap",function(e){e.preventDefault();var t=$(this),a=t.index();$(n.vars.asNavFor).data("flexslider").animating||t.hasClass("active")||(n.direction=n.currentItem<a?"next":"prev",n.flexAnimate(a,n.vars.pauseOnAction,!1,!0,!0))})})):n.slides.on(o,function(e){e.preventDefault();var t=$(this),a=t.index(),s=t.offset().left-$(n).scrollLeft();0>=s&&t.hasClass(i+"active-slide")?n.flexAnimate(n.getTarget("prev"),!0):$(n.vars.asNavFor).data("flexslider").animating||t.hasClass(i+"active-slide")||(n.direction=n.currentItem<a?"next":"prev",n.flexAnimate(a,n.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){n.manualControls?f.controlNav.setupManual():f.controlNav.setupPaging()},setupPaging:function(){var e="thumbnails"===n.vars.controlNav?"control-thumbs":"control-paging",t=1,a,s;if(n.controlNavScaffold=$('<ol class="'+i+"control-nav "+i+e+'"></ol>'),n.pagingCount>1)for(var r=0;r<n.pagingCount;r++){if(s=n.slides.eq(r),void 0===s.attr("data-thumb-alt")&&s.attr("data-thumb-alt",""),altText=""!==s.attr("data-thumb-alt")?altText=' alt="'+s.attr("data-thumb-alt")+'"':"",a="thumbnails"===n.vars.controlNav?'<img src="'+s.attr("data-thumb")+'"'+altText+"/>":'<a href="#">'+t+"</a>","thumbnails"===n.vars.controlNav&&!0===n.vars.thumbCaptions){var c=s.attr("data-thumbcaption");""!==c&&void 0!==c&&(a+='<span class="'+i+'caption">'+c+"</span>")}n.controlNavScaffold.append("<li>"+a+"</li>"),t++}n.controlsContainer?$(n.controlsContainer).append(n.controlNavScaffold):n.append(n.controlNavScaffold),f.controlNav.set(),f.controlNav.active(),n.controlNavScaffold.delegate("a, img",o,function(e){if(e.preventDefault(),""===l||l===e.type){var t=$(this),a=n.controlNav.index(t);t.hasClass(i+"active")||(n.direction=a>n.currentSlide?"next":"prev",n.flexAnimate(a,n.vars.pauseOnAction))}""===l&&(l=e.type),f.setToClearWatchedEvent()})},setupManual:function(){n.controlNav=n.manualControls,f.controlNav.active(),n.controlNav.bind(o,function(e){if(e.preventDefault(),""===l||l===e.type){var t=$(this),a=n.controlNav.index(t);t.hasClass(i+"active")||(a>n.currentSlide?n.direction="next":n.direction="prev",n.flexAnimate(a,n.vars.pauseOnAction))}""===l&&(l=e.type),f.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===n.vars.controlNav?"img":"a";n.controlNav=$("."+i+"control-nav li "+e,n.controlsContainer?n.controlsContainer:n)},active:function(){n.controlNav.removeClass(i+"active").eq(n.animatingTo).addClass(i+"active")},update:function(e,t){n.pagingCount>1&&"add"===e?n.controlNavScaffold.append($('<li><a href="#">'+n.count+"</a></li>")):1===n.pagingCount?n.controlNavScaffold.find("li").remove():n.controlNav.eq(t).closest("li").remove(),f.controlNav.set(),n.pagingCount>1&&n.pagingCount!==n.controlNav.length?n.update(t,e):f.controlNav.active()}},directionNav:{setup:function(){var e=$('<ul class="'+i+'direction-nav"><li class="'+i+'nav-prev"><a class="'+i+'prev" href="#">'+n.vars.prevText+'</a></li><li class="'+i+'nav-next"><a class="'+i+'next" href="#">'+n.vars.nextText+"</a></li></ul>");n.customDirectionNav?n.directionNav=n.customDirectionNav:n.controlsContainer?($(n.controlsContainer).append(e),n.directionNav=$("."+i+"direction-nav li a",n.controlsContainer)):(n.append(e),n.directionNav=$("."+i+"direction-nav li a",n)),f.directionNav.update(),n.directionNav.bind(o,function(e){e.preventDefault();var t;(""===l||l===e.type)&&(t=$(this).hasClass(i+"next")?n.getTarget("next"):n.getTarget("prev"),n.flexAnimate(t,n.vars.pauseOnAction)),""===l&&(l=e.type),f.setToClearWatchedEvent()})},update:function(){var e=i+"disabled";1===n.pagingCount?n.directionNav.addClass(e).attr("tabindex","-1"):n.vars.animationLoop?n.directionNav.removeClass(e).removeAttr("tabindex"):0===n.animatingTo?n.directionNav.removeClass(e).filter("."+i+"prev").addClass(e).attr("tabindex","-1"):n.animatingTo===n.last?n.directionNav.removeClass(e).filter("."+i+"next").addClass(e).attr("tabindex","-1"):n.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=$('<div class="'+i+'pauseplay"><a href="#"></a></div>');n.controlsContainer?(n.controlsContainer.append(e),n.pausePlay=$("."+i+"pauseplay a",n.controlsContainer)):(n.append(e),n.pausePlay=$("."+i+"pauseplay a",n)),f.pausePlay.update(n.vars.slideshow?i+"pause":i+"play"),n.pausePlay.bind(o,function(e){e.preventDefault(),(""===l||l===e.type)&&($(this).hasClass(i+"pause")?(n.manualPause=!0,n.manualPlay=!1,n.pause()):(n.manualPause=!1,n.manualPlay=!0,n.play())),""===l&&(l=e.type),f.setToClearWatchedEvent()})},update:function(e){"play"===e?n.pausePlay.removeClass(i+"pause").addClass(i+"play").html(n.vars.playText):n.pausePlay.removeClass(i+"play").addClass(i+"pause").html(n.vars.pauseText)}},touch:function(){function e(e){e.stopPropagation(),n.animating?e.preventDefault():(n.pause(),t._gesture.addPointer(e.pointerId),T=0,c=d?n.h:n.w,f=Number(new Date),l=v&&u&&n.animatingTo===n.last?0:v&&u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:v&&n.currentSlide===n.last?n.limit:v?(n.itemW+n.vars.itemMargin)*n.move*n.currentSlide:u?(n.last-n.currentSlide+n.cloneOffset)*c:(n.currentSlide+n.cloneOffset)*c)}function a(e){e.stopPropagation();var a=e.target._slider;if(a){var n=-e.translationX,i=-e.translationY;return T+=d?i:n,m=T,x=d?Math.abs(T)<Math.abs(-n):Math.abs(T)<Math.abs(-i),e.detail===e.MSGESTURE_FLAG_INERTIA?void setImmediate(function(){t._gesture.stop()}):void((!x||Number(new Date)-f>500)&&(e.preventDefault(),!p&&a.transitions&&(a.vars.animationLoop||(m=T/(0===a.currentSlide&&0>T||a.currentSlide===a.last&&T>0?Math.abs(T)/c+2:1)),a.setProps(l+m,"setTouch"))))}}function i(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!x&&null!==m){var a=u?-m:m,n=a>0?t.getTarget("next"):t.getTarget("prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>c/2)?t.flexAnimate(n,t.vars.pauseOnAction):p||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}r=null,o=null,m=null,l=null,T=0}}var r,o,l,c,m,f,g,h,S,x=!1,y=0,b=0,T=0;s?(t.style.msTouchAction="none",t._gesture=new MSGesture,t._gesture.target=t,t.addEventListener("MSPointerDown",e,!1),t._slider=n,t.addEventListener("MSGestureChange",a,!1),t.addEventListener("MSGestureEnd",i,!1)):(g=function(e){n.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(n.pause(),c=d?n.h:n.w,f=Number(new Date),y=e.touches[0].pageX,b=e.touches[0].pageY,l=v&&u&&n.animatingTo===n.last?0:v&&u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:v&&n.currentSlide===n.last?n.limit:v?(n.itemW+n.vars.itemMargin)*n.move*n.currentSlide:u?(n.last-n.currentSlide+n.cloneOffset)*c:(n.currentSlide+n.cloneOffset)*c,r=d?b:y,o=d?y:b,t.addEventListener("touchmove",h,!1),t.addEventListener("touchend",S,!1))},h=function(e){y=e.touches[0].pageX,b=e.touches[0].pageY,m=d?r-b:r-y,x=d?Math.abs(m)<Math.abs(y-o):Math.abs(m)<Math.abs(b-o);var t=500;(!x||Number(new Date)-f>t)&&(e.preventDefault(),!p&&n.transitions&&(n.vars.animationLoop||(m/=0===n.currentSlide&&0>m||n.currentSlide===n.last&&m>0?Math.abs(m)/c+2:1),n.setProps(l+m,"setTouch")))},S=function(e){if(t.removeEventListener("touchmove",h,!1),n.animatingTo===n.currentSlide&&!x&&null!==m){var a=u?-m:m,i=a>0?n.getTarget("next"):n.getTarget("prev");n.canAdvance(i)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>c/2)?n.flexAnimate(i,n.vars.pauseOnAction):p||n.flexAnimate(n.currentSlide,n.vars.pauseOnAction,!0)}t.removeEventListener("touchend",S,!1),r=null,o=null,m=null,l=null},t.addEventListener("touchstart",g,!1))},resize:function(){!n.animating&&n.is(":visible")&&(v||n.doMath(),p?f.smoothHeight():v?(n.slides.width(n.computedW),n.update(n.pagingCount),n.setProps()):d?(n.viewport.height(n.h),n.setProps(n.h,"setTotal")):(n.vars.smoothHeight&&f.smoothHeight(),n.newSlides.width(n.computedW),n.setProps(n.computedW,"setTotal")))},smoothHeight:function(e){if(!d||p){var t=p?n:n.viewport;e?t.animate({height:n.slides.eq(n.animatingTo).height()},e):t.height(n.slides.eq(n.animatingTo).height())}},sync:function(e){var t=$(n.vars.sync).data("flexslider"),a=n.animatingTo;switch(e){case"animate":t.flexAnimate(a,n.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause()}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=$(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=f.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){f.pauseInvisible.isHidden()?n.startTimeout?clearTimeout(n.startTimeout):n.pause():n.started?n.play():n.vars.initDelay>0?setTimeout(n.play,n.vars.initDelay):n.play()})}},isHidden:function(){var e=f.pauseInvisible.getHiddenProp();return e?document[e]:!1},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}},setToClearWatchedEvent:function(){clearTimeout(c),c=setTimeout(function(){l=""},3e3)}},n.flexAnimate=function(e,t,a,s,o){if(n.vars.animationLoop||e===n.currentSlide||(n.direction=e>n.currentSlide?"next":"prev"),m&&1===n.pagingCount&&(n.direction=n.currentItem<e?"next":"prev"),!n.animating&&(n.canAdvance(e,o)||a)&&n.is(":visible")){if(m&&s){var l=$(n.vars.asNavFor).data("flexslider");if(n.atEnd=0===e||e===n.count-1,l.flexAnimate(e,!0,!1,!0,o),n.direction=n.currentItem<e?"next":"prev",l.direction=n.direction,Math.ceil((e+1)/n.visible)-1===n.currentSlide||0===e)return n.currentItem=e,n.slides.removeClass(i+"active-slide").eq(e).addClass(i+"active-slide"),!1;n.currentItem=e,n.slides.removeClass(i+"active-slide").eq(e).addClass(i+"active-slide"),e=Math.floor(e/n.visible)}if(n.animating=!0,n.animatingTo=e,t&&n.pause(),n.vars.before(n),n.syncExists&&!o&&f.sync("animate"),n.vars.controlNav&&f.controlNav.active(),v||n.slides.removeClass(i+"active-slide").eq(e).addClass(i+"active-slide"),n.atEnd=0===e||e===n.last,n.vars.directionNav&&f.directionNav.update(),e===n.last&&(n.vars.end(n),n.vars.animationLoop||n.pause()),p)r?(n.slides.eq(n.currentSlide).css({opacity:0,zIndex:1}),n.slides.eq(e).css({opacity:1,zIndex:2}),n.wrapup(c)):(n.slides.eq(n.currentSlide).css({zIndex:1}).animate({opacity:0},n.vars.animationSpeed,n.vars.easing),n.slides.eq(e).css({zIndex:2}).animate({opacity:1},n.vars.animationSpeed,n.vars.easing,n.wrapup));else{var c=d?n.slides.filter(":first").height():n.computedW,g,h,S;v?(g=n.vars.itemMargin,S=(n.itemW+g)*n.move*n.animatingTo,h=S>n.limit&&1!==n.visible?n.limit:S):h=0===n.currentSlide&&e===n.count-1&&n.vars.animationLoop&&"next"!==n.direction?u?(n.count+n.cloneOffset)*c:0:n.currentSlide===n.last&&0===e&&n.vars.animationLoop&&"prev"!==n.direction?u?0:(n.count+1)*c:u?(n.count-1-e+n.cloneOffset)*c:(e+n.cloneOffset)*c,n.setProps(h,"",n.vars.animationSpeed),n.transitions?(n.vars.animationLoop&&n.atEnd||(n.animating=!1,n.currentSlide=n.animatingTo),n.container.unbind("webkitTransitionEnd transitionend"),n.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(n.ensureAnimationEnd),n.wrapup(c)}),clearTimeout(n.ensureAnimationEnd),n.ensureAnimationEnd=setTimeout(function(){n.wrapup(c)},n.vars.animationSpeed+100)):n.container.animate(n.args,n.vars.animationSpeed,n.vars.easing,function(){n.wrapup(c)})}n.vars.smoothHeight&&f.smoothHeight(n.vars.animationSpeed)}},n.wrapup=function(e){p||v||(0===n.currentSlide&&n.animatingTo===n.last&&n.vars.animationLoop?n.setProps(e,"jumpEnd"):n.currentSlide===n.last&&0===n.animatingTo&&n.vars.animationLoop&&n.setProps(e,"jumpStart")),n.animating=!1,n.currentSlide=n.animatingTo,n.vars.after(n)},n.animateSlides=function(){!n.animating&&e&&n.flexAnimate(n.getTarget("next"))},n.pause=function(){clearInterval(n.animatedSlides),n.animatedSlides=null,n.playing=!1,n.vars.pausePlay&&f.pausePlay.update("play"),n.syncExists&&f.sync("pause")},n.play=function(){n.playing&&clearInterval(n.animatedSlides),n.animatedSlides=n.animatedSlides||setInterval(n.animateSlides,n.vars.slideshowSpeed),n.started=n.playing=!0,n.vars.pausePlay&&f.pausePlay.update("pause"),n.syncExists&&f.sync("play")},n.stop=function(){n.pause(),n.stopped=!0},n.canAdvance=function(e,t){var a=m?n.pagingCount-1:n.last;return t?!0:m&&n.currentItem===n.count-1&&0===e&&"prev"===n.direction?!0:m&&0===n.currentItem&&e===n.pagingCount-1&&"next"!==n.direction?!1:e!==n.currentSlide||m?n.vars.animationLoop?!0:n.atEnd&&0===n.currentSlide&&e===a&&"next"!==n.direction?!1:n.atEnd&&n.currentSlide===a&&0===e&&"next"===n.direction?!1:!0:!1},n.getTarget=function(e){return n.direction=e,"next"===e?n.currentSlide===n.last?0:n.currentSlide+1:0===n.currentSlide?n.last:n.currentSlide-1},n.setProps=function(e,t,a){var i=function(){var a=e?e:(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo,i=function(){if(v)return"setTouch"===t?e:u&&n.animatingTo===n.last?0:u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:n.animatingTo===n.last?n.limit:a;switch(t){case"setTotal":return u?(n.count-1-n.currentSlide+n.cloneOffset)*e:(n.currentSlide+n.cloneOffset)*e;case"setTouch":return u?e:e;case"jumpEnd":return u?e:n.count*e;case"jumpStart":return u?n.count*e:e;default:return e}}();return-1*i+"px"}();n.transitions&&(i=d?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)",a=void 0!==a?a/1e3+"s":"0s",n.container.css("-"+n.pfx+"-transition-duration",a),n.container.css("transition-duration",a)),n.args[n.prop]=i,(n.transitions||void 0===a)&&n.container.css(n.args),n.container.css("transform",i)},n.setup=function(e){if(p)n.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===e&&(r?n.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+n.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(n.currentSlide).css({opacity:1,zIndex:2}):0==n.vars.fadeFirstSlide?n.slides.css({opacity:0,display:"block",zIndex:1}).eq(n.currentSlide).css({zIndex:2}).css({opacity:1}):n.slides.css({opacity:0,display:"block",zIndex:1}).eq(n.currentSlide).css({zIndex:2}).animate({opacity:1},n.vars.animationSpeed,n.vars.easing)),n.vars.smoothHeight&&f.smoothHeight();else{var t,a;"init"===e&&(n.viewport=$('<div class="'+i+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(n).append(n.container),n.cloneCount=0,n.cloneOffset=0,u&&(a=$.makeArray(n.slides).reverse(),n.slides=$(a),n.container.empty().append(n.slides))),n.vars.animationLoop&&!v&&(n.cloneCount=2,n.cloneOffset=1,"init"!==e&&n.container.find(".clone").remove(),n.container.append(f.uniqueID(n.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(f.uniqueID(n.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),n.newSlides=$(n.vars.selector,n),t=u?n.count-1-n.currentSlide+n.cloneOffset:n.currentSlide+n.cloneOffset,d&&!v?(n.container.height(200*(n.count+n.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){n.newSlides.css({display:"block"}),n.doMath(),n.viewport.height(n.h),n.setProps(t*n.h,"init")},"init"===e?100:0)):(n.container.width(200*(n.count+n.cloneCount)+"%"),n.setProps(t*n.computedW,"init"),setTimeout(function(){n.doMath(),n.newSlides.css({width:n.computedW,marginRight:n.computedM,"float":"left",display:"block"}),n.vars.smoothHeight&&f.smoothHeight()},"init"===e?100:0))}v||n.slides.removeClass(i+"active-slide").eq(n.currentSlide).addClass(i+"active-slide"),n.vars.init(n)},n.doMath=function(){var e=n.slides.first(),t=n.vars.itemMargin,a=n.vars.minItems,i=n.vars.maxItems;n.w=void 0===n.viewport?n.width():n.viewport.width(),n.h=e.height(),n.boxPadding=e.outerWidth()-e.width(),v?(n.itemT=n.vars.itemWidth+t,n.itemM=t,n.minW=a?a*n.itemT:n.w,n.maxW=i?i*n.itemT-t:n.w,n.itemW=n.minW>n.w?(n.w-t*(a-1))/a:n.maxW<n.w?(n.w-t*(i-1))/i:n.vars.itemWidth>n.w?n.w:n.vars.itemWidth,n.visible=Math.floor(n.w/n.itemW),n.move=n.vars.move>0&&n.vars.move<n.visible?n.vars.move:n.visible,n.pagingCount=Math.ceil((n.count-n.visible)/n.move+1),n.last=n.pagingCount-1,n.limit=1===n.pagingCount?0:n.vars.itemWidth>n.w?n.itemW*(n.count-1)+t*(n.count-1):(n.itemW+t)*n.count-n.w-t):(n.itemW=n.w,n.itemM=t,n.pagingCount=n.count,n.last=n.count-1),n.computedW=n.itemW-n.boxPadding,n.computedM=n.itemM},n.update=function(e,t){n.doMath(),v||(e<n.currentSlide?n.currentSlide+=1:e<=n.currentSlide&&0!==e&&(n.currentSlide-=1),n.animatingTo=n.currentSlide),n.vars.controlNav&&!n.manualControls&&("add"===t&&!v||n.pagingCount>n.controlNav.length?f.controlNav.update("add"):("remove"===t&&!v||n.pagingCount<n.controlNav.length)&&(v&&n.currentSlide>n.last&&(n.currentSlide-=1,n.animatingTo-=1),f.controlNav.update("remove",n.last))),n.vars.directionNav&&f.directionNav.update()},n.addSlide=function(e,t){var a=$(e);n.count+=1,n.last=n.count-1,d&&u?void 0!==t?n.slides.eq(n.count-t).after(a):n.container.prepend(a):void 0!==t?n.slides.eq(t).before(a):n.container.append(a),n.update(t,"add"),n.slides=$(n.vars.selector+":not(.clone)",n),n.setup(),n.vars.added(n)},n.removeSlide=function(e){var t=isNaN(e)?n.slides.index($(e)):e;n.count-=1,n.last=n.count-1,isNaN(e)?$(e,n.slides).remove():d&&u?n.slides.eq(n.last).remove():n.slides.eq(e).remove(),n.doMath(),n.update(t,"remove"),n.slides=$(n.vars.selector+":not(.clone)",n),n.setup(),n.vars.removed(n)},f.init()},$(window).blur(function(t){e=!1}).focus(function(t){e=!0}),$.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},$.fn.flexslider=function(e){if(void 0===e&&(e={}),"object"==typeof e)return this.each(function(){var t=$(this),a=e.selector?e.selector:".slides > li",n=t.find(a);1===n.length&&e.allowOneSlide===!0||0===n.length?(n.fadeIn(400),e.start&&e.start(t)):void 0===t.data("flexslider")&&new $.flexslider(this,e)});var t=$(this).data("flexslider");switch(e){case"play":t.play();break;case"pause":t.pause();break;case"stop":t.stop();break;case"next":t.flexAnimate(t.getTarget("next"),!0);break;case"prev":case"previous":t.flexAnimate(t.getTarget("prev"),!0);break;default:"number"==typeof e&&t.flexAnimate(e,!0)}}}(jQuery);
assets/js/jquery.magnific-popup.js ADDED
@@ -0,0 +1,2060 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! Magnific Popup - v1.0.0 - 2015-09-17
2
+ * http://dimsemenov.com/plugins/magnific-popup/
3
+ * Copyright (c) 2015 Dmitry Semenov; */
4
+ ;(function (factory) {
5
+ if (typeof define === 'function' && define.amd) {
6
+ // AMD. Register as an anonymous module.
7
+ define(['jquery'], factory);
8
+ } else if (typeof exports === 'object') {
9
+ // Node/CommonJS
10
+ factory(require('jquery'));
11
+ } else {
12
+ // Browser globals
13
+ factory(window.jQuery || window.Zepto);
14
+ }
15
+ }(function($) {
16
+
17
+ /*>>core*/
18
+ /**
19
+ *
20
+ * Magnific Popup Core JS file
21
+ *
22
+ */
23
+
24
+
25
+ /**
26
+ * Private static constants
27
+ */
28
+ var CLOSE_EVENT = 'Close',
29
+ BEFORE_CLOSE_EVENT = 'BeforeClose',
30
+ AFTER_CLOSE_EVENT = 'AfterClose',
31
+ BEFORE_APPEND_EVENT = 'BeforeAppend',
32
+ MARKUP_PARSE_EVENT = 'MarkupParse',
33
+ OPEN_EVENT = 'Open',
34
+ CHANGE_EVENT = 'Change',
35
+ NS = 'mfp',
36
+ EVENT_NS = '.' + NS,
37
+ READY_CLASS = 'mfp-ready',
38
+ REMOVING_CLASS = 'mfp-removing',
39
+ PREVENT_CLOSE_CLASS = 'mfp-prevent-close';
40
+
41
+
42
+ /**
43
+ * Private vars
44
+ */
45
+ /*jshint -W079 */
46
+ var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this'
47
+ MagnificPopup = function(){},
48
+ _isJQ = !!(window.jQuery),
49
+ _prevStatus,
50
+ _window = $(window),
51
+ _document,
52
+ _prevContentType,
53
+ _wrapClasses,
54
+ _currPopupType;
55
+
56
+
57
+ /**
58
+ * Private functions
59
+ */
60
+ var _mfpOn = function(name, f) {
61
+ mfp.ev.on(NS + name + EVENT_NS, f);
62
+ },
63
+ _getEl = function(className, appendTo, html, raw) {
64
+ var el = document.createElement('div');
65
+ el.className = 'mfp-'+className;
66
+ if(html) {
67
+ el.innerHTML = html;
68
+ }
69
+ if(!raw) {
70
+ el = $(el);
71
+ if(appendTo) {
72
+ el.appendTo(appendTo);
73
+ }
74
+ } else if(appendTo) {
75
+ appendTo.appendChild(el);
76
+ }
77
+ return el;
78
+ },
79
+ _mfpTrigger = function(e, data) {
80
+ mfp.ev.triggerHandler(NS + e, data);
81
+
82
+ if(mfp.st.callbacks) {
83
+ // converts "mfpEventName" to "eventName" callback and triggers it if it's present
84
+ e = e.charAt(0).toLowerCase() + e.slice(1);
85
+ if(mfp.st.callbacks[e]) {
86
+ mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]);
87
+ }
88
+ }
89
+ },
90
+ _getCloseBtn = function(type) {
91
+ if(type !== _currPopupType || !mfp.currTemplate.closeBtn) {
92
+ mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) );
93
+ _currPopupType = type;
94
+ }
95
+ return mfp.currTemplate.closeBtn;
96
+ },
97
+ // Initialize Magnific Popup only when called at least once
98
+ _checkInstance = function() {
99
+ if(!$.magnificPopup.instance) {
100
+ /*jshint -W020 */
101
+ mfp = new MagnificPopup();
102
+ mfp.init();
103
+ $.magnificPopup.instance = mfp;
104
+ }
105
+ },
106
+ // CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr
107
+ supportsTransitions = function() {
108
+ var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist
109
+ v = ['ms','O','Moz','Webkit']; // 'v' for vendor
110
+
111
+ if( s['transition'] !== undefined ) {
112
+ return true;
113
+ }
114
+
115
+ while( v.length ) {
116
+ if( v.pop() + 'Transition' in s ) {
117
+ return true;
118
+ }
119
+ }
120
+
121
+ return false;
122
+ };
123
+
124
+
125
+
126
+ /**
127
+ * Public functions
128
+ */
129
+ MagnificPopup.prototype = {
130
+
131
+ constructor: MagnificPopup,
132
+
133
+ /**
134
+ * Initializes Magnific Popup plugin.
135
+ * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed
136
+ */
137
+ init: function() {
138
+ var appVersion = navigator.appVersion;
139
+ mfp.isIE7 = appVersion.indexOf("MSIE 7.") !== -1;
140
+ mfp.isIE8 = appVersion.indexOf("MSIE 8.") !== -1;
141
+ mfp.isLowIE = mfp.isIE7 || mfp.isIE8;
142
+ mfp.isAndroid = (/android/gi).test(appVersion);
143
+ mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion);
144
+ mfp.supportsTransition = supportsTransitions();
145
+
146
+ // We disable fixed positioned lightbox on devices that don't handle it nicely.
147
+ // If you know a better way of detecting this - let me know.
148
+ mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );
149
+ _document = $(document);
150
+
151
+ mfp.popupsCache = {};
152
+ },
153
+
154
+ /**
155
+ * Opens popup
156
+ * @param data [description]
157
+ */
158
+ open: function(data) {
159
+
160
+ var i;
161
+
162
+ if(data.isObj === false) {
163
+ // convert jQuery collection to array to avoid conflicts later
164
+ mfp.items = data.items.toArray();
165
+
166
+ mfp.index = 0;
167
+ var items = data.items,
168
+ item;
169
+ for(i = 0; i < items.length; i++) {
170
+ item = items[i];
171
+ if(item.parsed) {
172
+ item = item.el[0];
173
+ }
174
+ if(item === data.el[0]) {
175
+ mfp.index = i;
176
+ break;
177
+ }
178
+ }
179
+ } else {
180
+ mfp.items = $.isArray(data.items) ? data.items : [data.items];
181
+ mfp.index = data.index || 0;
182
+ }
183
+
184
+ // if popup is already opened - we just update the content
185
+ if(mfp.isOpen) {
186
+ mfp.updateItemHTML();
187
+ return;
188
+ }
189
+
190
+ mfp.types = [];
191
+ _wrapClasses = '';
192
+ if(data.mainEl && data.mainEl.length) {
193
+ mfp.ev = data.mainEl.eq(0);
194
+ } else {
195
+ mfp.ev = _document;
196
+ }
197
+
198
+ if(data.key) {
199
+ if(!mfp.popupsCache[data.key]) {
200
+ mfp.popupsCache[data.key] = {};
201
+ }
202
+ mfp.currTemplate = mfp.popupsCache[data.key];
203
+ } else {
204
+ mfp.currTemplate = {};
205
+ }
206
+
207
+
208
+
209
+ mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data );
210
+ mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos;
211
+
212
+ if(mfp.st.modal) {
213
+ mfp.st.closeOnContentClick = false;
214
+ mfp.st.closeOnBgClick = false;
215
+ mfp.st.showCloseBtn = false;
216
+ mfp.st.enableEscapeKey = false;
217
+ }
218
+
219
+
220
+ // Building markup
221
+ // main containers are created only once
222
+ if(!mfp.bgOverlay) {
223
+
224
+ // Dark overlay
225
+ mfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() {
226
+ mfp.close();
227
+ });
228
+
229
+ mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) {
230
+ if(mfp._checkIfClose(e.target)) {
231
+ mfp.close();
232
+ }
233
+ });
234
+
235
+ mfp.container = _getEl('container', mfp.wrap);
236
+ }
237
+
238
+ mfp.contentContainer = _getEl('content');
239
+ if(mfp.st.preloader) {
240
+ mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading);
241
+ }
242
+
243
+
244
+ // Initializing modules
245
+ var modules = $.magnificPopup.modules;
246
+ for(i = 0; i < modules.length; i++) {
247
+ var n = modules[i];
248
+ n = n.charAt(0).toUpperCase() + n.slice(1);
249
+ mfp['init'+n].call(mfp);
250
+ }
251
+ _mfpTrigger('BeforeOpen');
252
+
253
+
254
+ if(mfp.st.showCloseBtn) {
255
+ // Close button
256
+ if(!mfp.st.closeBtnInside) {
257
+ mfp.wrap.append( _getCloseBtn() );
258
+ } else {
259
+ _mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) {
260
+ values.close_replaceWith = _getCloseBtn(item.type);
261
+ });
262
+ _wrapClasses += ' mfp-close-btn-in';
263
+ }
264
+ }
265
+
266
+ if(mfp.st.alignTop) {
267
+ _wrapClasses += ' mfp-align-top';
268
+ }
269
+
270
+
271
+
272
+ if(mfp.fixedContentPos) {
273
+ mfp.wrap.css({
274
+ overflow: mfp.st.overflowY,
275
+ overflowX: 'hidden',
276
+ overflowY: mfp.st.overflowY
277
+ });
278
+ } else {
279
+ mfp.wrap.css({
280
+ top: _window.scrollTop(),
281
+ position: 'absolute'
282
+ });
283
+ }
284
+ if( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) {
285
+ mfp.bgOverlay.css({
286
+ height: _document.height(),
287
+ position: 'absolute'
288
+ });
289
+ }
290
+
291
+
292
+
293
+ if(mfp.st.enableEscapeKey) {
294
+ // Close on ESC key
295
+ _document.on('keyup' + EVENT_NS, function(e) {
296
+ if(e.keyCode === 27) {
297
+ mfp.close();
298
+ }
299
+ });
300
+ }
301
+
302
+ _window.on('resize' + EVENT_NS, function() {
303
+ mfp.updateSize();
304
+ });
305
+
306
+
307
+ if(!mfp.st.closeOnContentClick) {
308
+ _wrapClasses += ' mfp-auto-cursor';
309
+ }
310
+
311
+ if(_wrapClasses)
312
+ mfp.wrap.addClass(_wrapClasses);
313
+
314
+
315
+ // this triggers recalculation of layout, so we get it once to not to trigger twice
316
+ var windowHeight = mfp.wH = _window.height();
317
+
318
+
319
+ var windowStyles = {};
320
+
321
+ if( mfp.fixedContentPos ) {
322
+ if(mfp._hasScrollBar(windowHeight)){
323
+ var s = mfp._getScrollbarSize();
324
+ if(s) {
325
+ windowStyles.marginRight = s;
326
+ }
327
+ }
328
+ }
329
+
330
+ if(mfp.fixedContentPos) {
331
+ if(!mfp.isIE7) {
332
+ windowStyles.overflow = 'hidden';
333
+ } else {
334
+ // ie7 double-scroll bug
335
+ $('body, html').css('overflow', 'hidden');
336
+ }
337
+ }
338
+
339
+
340
+
341
+ var classesToadd = mfp.st.mainClass;
342
+ if(mfp.isIE7) {
343
+ classesToadd += ' mfp-ie7';
344
+ }
345
+ if(classesToadd) {
346
+ mfp._addClassToMFP( classesToadd );
347
+ }
348
+
349
+ // add content
350
+ mfp.updateItemHTML();
351
+
352
+ _mfpTrigger('BuildControls');
353
+
354
+ // remove scrollbar, add margin e.t.c
355
+ $('html').css(windowStyles);
356
+
357
+ // add everything to DOM
358
+ mfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || $(document.body) );
359
+
360
+ // Save last focused element
361
+ mfp._lastFocusedEl = document.activeElement;
362
+
363
+ // Wait for next cycle to allow CSS transition
364
+ setTimeout(function() {
365
+
366
+ if(mfp.content) {
367
+ mfp._addClassToMFP(READY_CLASS);
368
+ mfp._setFocus();
369
+ } else {
370
+ // if content is not defined (not loaded e.t.c) we add class only for BG
371
+ mfp.bgOverlay.addClass(READY_CLASS);
372
+ }
373
+
374
+ // Trap the focus in popup
375
+ _document.on('focusin' + EVENT_NS, mfp._onFocusIn);
376
+
377
+ }, 16);
378
+
379
+ mfp.isOpen = true;
380
+ mfp.updateSize(windowHeight);
381
+ _mfpTrigger(OPEN_EVENT);
382
+
383
+ return data;
384
+ },
385
+
386
+ /**
387
+ * Closes the popup
388
+ */
389
+ close: function() {
390
+ if(!mfp.isOpen) return;
391
+ _mfpTrigger(BEFORE_CLOSE_EVENT);
392
+
393
+ mfp.isOpen = false;
394
+ // for CSS3 animation
395
+ if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) {
396
+ mfp._addClassToMFP(REMOVING_CLASS);
397
+ setTimeout(function() {
398
+ mfp._close();
399
+ }, mfp.st.removalDelay);
400
+ } else {
401
+ mfp._close();
402
+ }
403
+ },
404
+
405
+ /**
406
+ * Helper for close() function
407
+ */
408
+ _close: function() {
409
+ _mfpTrigger(CLOSE_EVENT);
410
+
411
+ var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';
412
+
413
+ mfp.bgOverlay.detach();
414
+ mfp.wrap.detach();
415
+ mfp.container.empty();
416
+
417
+ if(mfp.st.mainClass) {
418
+ classesToRemove += mfp.st.mainClass + ' ';
419
+ }
420
+
421
+ mfp._removeClassFromMFP(classesToRemove);
422
+
423
+ if(mfp.fixedContentPos) {
424
+ var windowStyles = {marginRight: ''};
425
+ if(mfp.isIE7) {
426
+ $('body, html').css('overflow', '');
427
+ } else {
428
+ windowStyles.overflow = '';
429
+ }
430
+ $('html').css(windowStyles);
431
+ }
432
+
433
+ _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);
434
+ mfp.ev.off(EVENT_NS);
435
+
436
+ // clean up DOM elements that aren't removed
437
+ mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style');
438
+ mfp.bgOverlay.attr('class', 'mfp-bg');
439
+ mfp.container.attr('class', 'mfp-container');
440
+
441
+ // remove close button from target element
442
+ if(mfp.st.showCloseBtn &&
443
+ (!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) {
444
+ if(mfp.currTemplate.closeBtn)
445
+ mfp.currTemplate.closeBtn.detach();
446
+ }
447
+
448
+
449
+ if(mfp._lastFocusedEl) {
450
+ $(mfp._lastFocusedEl).focus(); // put tab focus back
451
+ }
452
+ mfp.currItem = null;
453
+ mfp.content = null;
454
+ mfp.currTemplate = null;
455
+ mfp.prevHeight = 0;
456
+
457
+ _mfpTrigger(AFTER_CLOSE_EVENT);
458
+ },
459
+
460
+ updateSize: function(winHeight) {
461
+
462
+ if(mfp.isIOS) {
463
+ // fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2
464
+ var zoomLevel = document.documentElement.clientWidth / window.innerWidth;
465
+ var height = window.innerHeight * zoomLevel;
466
+ mfp.wrap.css('height', height);
467
+ mfp.wH = height;
468
+ } else {
469
+ mfp.wH = winHeight || _window.height();
470
+ }
471
+ // Fixes #84: popup incorrectly positioned with position:relative on body
472
+ if(!mfp.fixedContentPos) {
473
+ mfp.wrap.css('height', mfp.wH);
474
+ }
475
+
476
+ _mfpTrigger('Resize');
477
+
478
+ },
479
+
480
+ /**
481
+ * Set content of popup based on current index
482
+ */
483
+ updateItemHTML: function() {
484
+ var item = mfp.items[mfp.index];
485
+
486
+ // Detach and perform modifications
487
+ mfp.contentContainer.detach();
488
+
489
+ if(mfp.content)
490
+ mfp.content.detach();
491
+
492
+ if(!item.parsed) {
493
+ item = mfp.parseEl( mfp.index );
494
+ }
495
+
496
+ var type = item.type;
497
+
498
+ _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]);
499
+ // BeforeChange event works like so:
500
+ // _mfpOn('BeforeChange', function(e, prevType, newType) { });
501
+
502
+ mfp.currItem = item;
503
+
504
+
505
+
506
+
507
+
508
+ if(!mfp.currTemplate[type]) {
509
+ var markup = mfp.st[type] ? mfp.st[type].markup : false;
510
+
511
+ // allows to modify markup
512
+ _mfpTrigger('FirstMarkupParse', markup);
513
+
514
+ if(markup) {
515
+ mfp.currTemplate[type] = $(markup);
516
+ } else {
517
+ // if there is no markup found we just define that template is parsed
518
+ mfp.currTemplate[type] = true;
519
+ }
520
+ }
521
+
522
+ if(_prevContentType && _prevContentType !== item.type) {
523
+ mfp.container.removeClass('mfp-'+_prevContentType+'-holder');
524
+ }
525
+
526
+ var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]);
527
+ mfp.appendContent(newContent, type);
528
+
529
+ item.preloaded = true;
530
+
531
+ _mfpTrigger(CHANGE_EVENT, item);
532
+ _prevContentType = item.type;
533
+
534
+ // Append container back after its content changed
535
+ mfp.container.prepend(mfp.contentContainer);
536
+
537
+ _mfpTrigger('AfterChange');
538
+ },
539
+
540
+
541
+ /**
542
+ * Set HTML content of popup
543
+ */
544
+ appendContent: function(newContent, type) {
545
+ mfp.content = newContent;
546
+
547
+ if(newContent) {
548
+ if(mfp.st.showCloseBtn && mfp.st.closeBtnInside &&
549
+ mfp.currTemplate[type] === true) {
550
+ // if there is no markup, we just append close button element inside
551
+ if(!mfp.content.find('.mfp-close').length) {
552
+ mfp.content.append(_getCloseBtn());
553
+ }
554
+ } else {
555
+ mfp.content = newContent;
556
+ }
557
+ } else {
558
+ mfp.content = '';
559
+ }
560
+
561
+ _mfpTrigger(BEFORE_APPEND_EVENT);
562
+ mfp.container.addClass('mfp-'+type+'-holder');
563
+
564
+ mfp.contentContainer.append(mfp.content);
565
+ },
566
+
567
+
568
+
569
+
570
+ /**
571
+ * Creates Magnific Popup data object based on given data
572
+ * @param {int} index Index of item to parse
573
+ */
574
+ parseEl: function(index) {
575
+ var item = mfp.items[index],
576
+ type;
577
+
578
+ if(item.tagName) {
579
+ item = { el: $(item) };
580
+ } else {
581
+ type = item.type;
582
+ item = { data: item, src: item.src };
583
+ }
584
+
585
+ if(item.el) {
586
+ var types = mfp.types;
587
+
588
+ // check for 'mfp-TYPE' class
589
+ for(var i = 0; i < types.length; i++) {
590
+ if( item.el.hasClass('mfp-'+types[i]) ) {
591
+ type = types[i];
592
+ break;
593
+ }
594
+ }
595
+
596
+ item.src = item.el.attr('data-mfp-src');
597
+ if(!item.src) {
598
+ item.src = item.el.attr('href');
599
+ }
600
+ }
601
+
602
+ item.type = type || mfp.st.type || 'inline';
603
+ item.index = index;
604
+ item.parsed = true;
605
+ mfp.items[index] = item;
606
+ _mfpTrigger('ElementParse', item);
607
+
608
+ return mfp.items[index];
609
+ },
610
+
611
+
612
+ /**
613
+ * Initializes single popup or a group of popups
614
+ */
615
+ addGroup: function(el, options) {
616
+ var eHandler = function(e) {
617
+ e.mfpEl = this;
618
+ mfp._openClick(e, el, options);
619
+ };
620
+
621
+ if(!options) {
622
+ options = {};
623
+ }
624
+
625
+ var eName = 'click.magnificPopup';
626
+ options.mainEl = el;
627
+
628
+ if(options.items) {
629
+ options.isObj = true;
630
+ el.off(eName).on(eName, eHandler);
631
+ } else {
632
+ options.isObj = false;
633
+ if(options.delegate) {
634
+ el.off(eName).on(eName, options.delegate , eHandler);
635
+ } else {
636
+ options.items = el;
637
+ el.off(eName).on(eName, eHandler);
638
+ }
639
+ }
640
+ },
641
+ _openClick: function(e, el, options) {
642
+ var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;
643
+
644
+
645
+ if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) {
646
+ return;
647
+ }
648
+
649
+ var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;
650
+
651
+ if(disableOn) {
652
+ if($.isFunction(disableOn)) {
653
+ if( !disableOn.call(mfp) ) {
654
+ return true;
655
+ }
656
+ } else { // else it's number
657
+ if( _window.width() < disableOn ) {
658
+ return true;
659
+ }
660
+ }
661
+ }
662
+
663
+ if(e.type) {
664
+ e.preventDefault();
665
+
666
+ // This will prevent popup from closing if element is inside and popup is already opened
667
+ if(mfp.isOpen) {
668
+ e.stopPropagation();
669
+ }
670
+ }
671
+
672
+
673
+ options.el = $(e.mfpEl);
674
+ if(options.delegate) {
675
+ options.items = el.find(options.delegate);
676
+ }
677
+ mfp.open(options);
678
+ },
679
+
680
+
681
+ /**
682
+ * Updates text on preloader
683
+ */
684
+ updateStatus: function(status, text) {
685
+
686
+ if(mfp.preloader) {
687
+ if(_prevStatus !== status) {
688
+ mfp.container.removeClass('mfp-s-'+_prevStatus);
689
+ }
690
+
691
+ if(!text && status === 'loading') {
692
+ text = mfp.st.tLoading;
693
+ }
694
+
695
+ var data = {
696
+ status: status,
697
+ text: text
698
+ };
699
+ // allows to modify status
700
+ _mfpTrigger('UpdateStatus', data);
701
+
702
+ status = data.status;
703
+ text = data.text;
704
+
705
+ mfp.preloader.html(text);
706
+
707
+ mfp.preloader.find('a').on('click', function(e) {
708
+ e.stopImmediatePropagation();
709
+ });
710
+
711
+ mfp.container.addClass('mfp-s-'+status);
712
+ _prevStatus = status;
713
+ }
714
+ },
715
+
716
+
717
+ /*
718
+ "Private" helpers that aren't private at all
719
+ */
720
+ // Check to close popup or not
721
+ // "target" is an element that was clicked
722
+ _checkIfClose: function(target) {
723
+
724
+ if($(target).hasClass(PREVENT_CLOSE_CLASS)) {
725
+ return;
726
+ }
727
+
728
+ var closeOnContent = mfp.st.closeOnContentClick;
729
+ var closeOnBg = mfp.st.closeOnBgClick;
730
+
731
+ if(closeOnContent && closeOnBg) {
732
+ return true;
733
+ } else {
734
+
735
+ // We close the popup if click is on close button or on preloader. Or if there is no content.
736
+ if(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {
737
+ return true;
738
+ }
739
+
740
+ // if click is outside the content
741
+ if( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) {
742
+ if(closeOnBg) {
743
+ // last check, if the clicked element is in DOM, (in case it's removed onclick)
744
+ if( $.contains(document, target) ) {
745
+ return true;
746
+ }
747
+ }
748
+ } else if(closeOnContent) {
749
+ return true;
750
+ }
751
+
752
+ }
753
+ return false;
754
+ },
755
+ _addClassToMFP: function(cName) {
756
+ mfp.bgOverlay.addClass(cName);
757
+ mfp.wrap.addClass(cName);
758
+ },
759
+ _removeClassFromMFP: function(cName) {
760
+ this.bgOverlay.removeClass(cName);
761
+ mfp.wrap.removeClass(cName);
762
+ },
763
+ _hasScrollBar: function(winHeight) {
764
+ return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );
765
+ },
766
+ _setFocus: function() {
767
+ (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();
768
+ },
769
+ _onFocusIn: function(e) {
770
+ if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {
771
+ mfp._setFocus();
772
+ return false;
773
+ }
774
+ },
775
+ _parseMarkup: function(template, values, item) {
776
+ var arr;
777
+ if(item.data) {
778
+ values = $.extend(item.data, values);
779
+ }
780
+ _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] );
781
+
782
+ $.each(values, function(key, value) {
783
+ if(value === undefined || value === false) {
784
+ return true;
785
+ }
786
+ arr = key.split('_');
787
+ if(arr.length > 1) {
788
+ var el = template.find(EVENT_NS + '-'+arr[0]);
789
+
790
+ if(el.length > 0) {
791
+ var attr = arr[1];
792
+ if(attr === 'replaceWith') {
793
+ if(el[0] !== value[0]) {
794
+ el.replaceWith(value);
795
+ }
796
+ } else if(attr === 'img') {
797
+ if(el.is('img')) {
798
+ el.attr('src', value);
799
+ } else {
800
+ el.replaceWith( '<img src="'+value+'" class="' + el.attr('class') + '" />' );
801
+ }
802
+ } else {
803
+ el.attr(arr[1], value);
804
+ }
805
+ }
806
+
807
+ } else {
808
+ template.find(EVENT_NS + '-'+key).html(value);
809
+ }
810
+ });
811
+ },
812
+
813
+ _getScrollbarSize: function() {
814
+ // thx David
815
+ if(mfp.scrollbarSize === undefined) {
816
+ var scrollDiv = document.createElement("div");
817
+ scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';
818
+ document.body.appendChild(scrollDiv);
819
+ mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;
820
+ document.body.removeChild(scrollDiv);
821
+ }
822
+ return mfp.scrollbarSize;
823
+ }
824
+
825
+ }; /* MagnificPopup core prototype end */
826
+
827
+
828
+
829
+
830
+ /**
831
+ * Public static functions
832
+ */
833
+ $.magnificPopup = {
834
+ instance: null,
835
+ proto: MagnificPopup.prototype,
836
+ modules: [],
837
+
838
+ open: function(options, index) {
839
+ _checkInstance();
840
+
841
+ if(!options) {
842
+ options = {};
843
+ } else {
844
+ options = $.extend(true, {}, options);
845
+ }
846
+
847
+
848
+ options.isObj = true;
849
+ options.index = index || 0;
850
+ return this.instance.open(options);
851
+ },
852
+
853
+ close: function() {
854
+ return $.magnificPopup.instance && $.magnificPopup.instance.close();
855
+ },
856
+
857
+ registerModule: function(name, module) {
858
+ if(module.options) {
859
+ $.magnificPopup.defaults[name] = module.options;
860
+ }
861
+ $.extend(this.proto, module.proto);
862
+ this.modules.push(name);
863
+ },
864
+
865
+ defaults: {
866
+
867
+ // Info about options is in docs:
868
+ // http://dimsemenov.com/plugins/magnific-popup/documentation.html#options
869
+
870
+ disableOn: 0,
871
+
872
+ key: null,
873
+
874
+ midClick: false,
875
+
876
+ mainClass: '',
877
+
878
+ preloader: true,
879
+
880
+ focus: '', // CSS selector of input to focus after popup is opened
881
+
882
+ closeOnContentClick: false,
883
+
884
+ closeOnBgClick: true,
885
+
886
+ closeBtnInside: true,
887
+
888
+ showCloseBtn: true,
889
+
890
+ enableEscapeKey: true,
891
+
892
+ modal: false,
893
+
894
+ alignTop: false,
895
+
896
+ removalDelay: 0,
897
+
898
+ prependTo: null,
899
+
900
+ fixedContentPos: 'auto',
901
+
902
+ fixedBgPos: 'auto',
903
+
904
+ overflowY: 'auto',
905
+
906
+ closeMarkup: '<button title="%title%" type="button" class="mfp-close">&#215;</button>',
907
+
908
+ tClose: 'Close (Esc)',
909
+
910
+ tLoading: 'Loading...'
911
+
912
+ }
913
+ };
914
+
915
+
916
+
917
+ $.fn.magnificPopup = function(options) {
918
+ _checkInstance();
919
+
920
+ var jqEl = $(this);
921
+
922
+ // We call some API method of first param is a string
923
+ if (typeof options === "string" ) {
924
+
925
+ if(options === 'open') {
926
+ var items,
927
+ itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup,
928
+ index = parseInt(arguments[1], 10) || 0;
929
+
930
+ if(itemOpts.items) {
931
+ items = itemOpts.items[index];
932
+ } else {
933
+ items = jqEl;
934
+ if(itemOpts.delegate) {
935
+ items = items.find(itemOpts.delegate);
936
+ }
937
+ items = items.eq( index );
938
+ }
939
+ mfp._openClick({mfpEl:items}, jqEl, itemOpts);
940
+ } else {
941
+ if(mfp.isOpen)
942
+ mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));
943
+ }
944
+
945
+ } else {
946
+ // clone options obj
947
+ options = $.extend(true, {}, options);
948
+
949
+ /*
950
+ * As Zepto doesn't support .data() method for objects
951
+ * and it works only in normal browsers
952
+ * we assign "options" object directly to the DOM element. FTW!
953
+ */
954
+ if(_isJQ) {
955
+ jqEl.data('magnificPopup', options);
956
+ } else {
957
+ jqEl[0].magnificPopup = options;
958
+ }
959
+
960
+ mfp.addGroup(jqEl, options);
961
+
962
+ }
963
+ return jqEl;
964
+ };
965
+
966
+
967
+ //Quick benchmark
968
+ /*
969
+ var start = performance.now(),
970
+ i,
971
+ rounds = 1000;
972
+
973
+ for(i = 0; i < rounds; i++) {
974
+
975
+ }
976
+ console.log('Test #1:', performance.now() - start);
977
+
978
+ start = performance.now();
979
+ for(i = 0; i < rounds; i++) {
980
+
981
+ }
982
+ console.log('Test #2:', performance.now() - start);
983
+ */
984
+
985
+
986
+ /*>>core*/
987
+
988
+ /*>>inline*/
989
+
990
+ var INLINE_NS = 'inline',
991
+ _hiddenClass,
992
+ _inlinePlaceholder,
993
+ _lastInlineElement,
994
+ _putInlineElementsBack = function() {
995
+ if(_lastInlineElement) {
996
+ _inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach();
997
+ _lastInlineElement = null;
998
+ }
999
+ };
1000
+
1001
+ $.magnificPopup.registerModule(INLINE_NS, {
1002
+ options: {
1003
+ hiddenClass: 'hide', // will be appended with `mfp-` prefix
1004
+ markup: '',
1005
+ tNotFound: 'Content not found'
1006
+ },
1007
+ proto: {
1008
+
1009
+ initInline: function() {
1010
+ mfp.types.push(INLINE_NS);
1011
+
1012
+ _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() {
1013
+ _putInlineElementsBack();
1014
+ });
1015
+ },
1016
+
1017
+ getInline: function(item, template) {
1018
+
1019
+ _putInlineElementsBack();
1020
+
1021
+ if(item.src) {
1022
+ var inlineSt = mfp.st.inline,
1023
+ el = $(item.src);
1024
+
1025
+ if(el.length) {
1026
+
1027
+ // If target element has parent - we replace it with placeholder and put it back after popup is closed
1028
+ var parent = el[0].parentNode;
1029
+ if(parent && parent.tagName) {
1030
+ if(!_inlinePlaceholder) {
1031
+ _hiddenClass = inlineSt.hiddenClass;
1032
+ _inlinePlaceholder = _getEl(_hiddenClass);
1033
+ _hiddenClass = 'mfp-'+_hiddenClass;
1034
+ }
1035
+ // replace target inline element with placeholder
1036
+ _lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);
1037
+ }
1038
+
1039
+ mfp.updateStatus('ready');
1040
+ } else {
1041
+ mfp.updateStatus('error', inlineSt.tNotFound);
1042
+ el = $('<div>');
1043
+ }
1044
+
1045
+ item.inlineElement = el;
1046
+ return el;
1047
+ }
1048
+
1049
+ mfp.updateStatus('ready');
1050
+ mfp._parseMarkup(template, {}, item);
1051
+ return template;
1052
+ }
1053
+ }
1054
+ });
1055
+
1056
+ /*>>inline*/
1057
+
1058
+ /*>>ajax*/
1059
+ var AJAX_NS = 'ajax',
1060
+ _ajaxCur,
1061
+ _removeAjaxCursor = function() {
1062
+ if(_ajaxCur) {
1063
+ $(document.body).removeClass(_ajaxCur);
1064
+ }
1065
+ },
1066
+ _destroyAjaxRequest = function() {
1067
+ _removeAjaxCursor();
1068
+ if(mfp.req) {
1069
+ mfp.req.abort();
1070
+ }
1071
+ };
1072
+
1073
+ $.magnificPopup.registerModule(AJAX_NS, {
1074
+
1075
+ options: {
1076
+ settings: null,
1077
+ cursor: 'mfp-ajax-cur',
1078
+ tError: '<a href="%url%">The content</a> could not be loaded.'
1079
+ },
1080
+
1081
+ proto: {
1082
+ initAjax: function() {
1083
+ mfp.types.push(AJAX_NS);
1084
+ _ajaxCur = mfp.st.ajax.cursor;
1085
+
1086
+ _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest);
1087
+ _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest);
1088
+ },
1089
+ getAjax: function(item) {
1090
+
1091
+ if(_ajaxCur) {
1092
+ $(document.body).addClass(_ajaxCur);
1093
+ }
1094
+
1095
+ mfp.updateStatus('loading');
1096
+
1097
+ var opts = $.extend({
1098
+ url: item.src,
1099
+ success: function(data, textStatus, jqXHR) {
1100
+ var temp = {
1101
+ data:data,
1102
+ xhr:jqXHR
1103
+ };
1104
+
1105
+ _mfpTrigger('ParseAjax', temp);
1106
+
1107
+ mfp.appendContent( $(temp.data), AJAX_NS );
1108
+
1109
+ item.finished = true;
1110
+
1111
+ _removeAjaxCursor();
1112
+
1113
+ mfp._setFocus();
1114
+
1115
+ setTimeout(function() {
1116
+ mfp.wrap.addClass(READY_CLASS);
1117
+ }, 16);
1118
+
1119
+ mfp.updateStatus('ready');
1120
+
1121
+ _mfpTrigger('AjaxContentAdded');
1122
+ },
1123
+ error: function() {
1124
+ _removeAjaxCursor();
1125
+ item.finished = item.loadError = true;
1126
+ mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));
1127
+ }
1128
+ }, mfp.st.ajax.settings);
1129
+
1130
+ mfp.req = $.ajax(opts);
1131
+
1132
+ return '';
1133
+ }
1134
+ }
1135
+ });
1136
+
1137
+
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+ /*>>ajax*/
1144
+
1145
+ /*>>image*/
1146
+ var _imgInterval,
1147
+ _getTitle = function(item) {
1148
+ if(item.data && item.data.title !== undefined)
1149
+ return item.data.title;
1150
+
1151
+ var src = mfp.st.image.titleSrc;
1152
+
1153
+ if(src) {
1154
+ if($.isFunction(src)) {
1155
+ return src.call(mfp, item);
1156
+ } else if(item.el) {
1157
+ return item.el.attr(src) || '';
1158
+ }
1159
+ }
1160
+ return '';
1161
+ };
1162
+
1163
+ $.magnificPopup.registerModule('image', {
1164
+
1165
+ options: {
1166
+ markup: '<div class="mfp-figure">'+
1167
+ '<div class="mfp-close"></div>'+
1168
+ '<figure>'+
1169
+ '<div class="mfp-img"></div>'+
1170
+ '<figcaption>'+
1171
+ '<div class="mfp-bottom-bar">'+
1172
+ '<div class="mfp-title"></div>'+
1173
+ '<div class="mfp-counter"></div>'+
1174
+ '</div>'+
1175
+ '</figcaption>'+
1176
+ '</figure>'+
1177
+ '</div>',
1178
+ cursor: 'mfp-zoom-out-cur',
1179
+ titleSrc: 'title',
1180
+ verticalFit: true,
1181
+ tError: '<a href="%url%">The image</a> could not be loaded.'
1182
+ },
1183
+
1184
+ proto: {
1185
+ initImage: function() {
1186
+ var imgSt = mfp.st.image,
1187
+ ns = '.image';
1188
+
1189
+ mfp.types.push('image');
1190
+
1191
+ _mfpOn(OPEN_EVENT+ns, function() {
1192
+ if(mfp.currItem.type === 'image' && imgSt.cursor) {
1193
+ $(document.body).addClass(imgSt.cursor);
1194
+ }
1195
+ });
1196
+
1197
+ _mfpOn(CLOSE_EVENT+ns, function() {
1198
+ if(imgSt.cursor) {
1199
+ $(document.body).removeClass(imgSt.cursor);
1200
+ }
1201
+ _window.off('resize' + EVENT_NS);
1202
+ });
1203
+
1204
+ _mfpOn('Resize'+ns, mfp.resizeImage);
1205
+ if(mfp.isLowIE) {
1206
+ _mfpOn('AfterChange', mfp.resizeImage);
1207
+ }
1208
+ },
1209
+ resizeImage: function() {
1210
+ var item = mfp.currItem;
1211
+ if(!item || !item.img) return;
1212
+
1213
+ if(mfp.st.image.verticalFit) {
1214
+ var decr = 0;
1215
+ // fix box-sizing in ie7/8
1216
+ if(mfp.isLowIE) {
1217
+ decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);
1218
+ }
1219
+ item.img.css('max-height', mfp.wH-decr);
1220
+ }
1221
+ },
1222
+ _onImageHasSize: function(item) {
1223
+ if(item.img) {
1224
+
1225
+ item.hasSize = true;
1226
+
1227
+ if(_imgInterval) {
1228
+ clearInterval(_imgInterval);
1229
+ }
1230
+
1231
+ item.isCheckingImgSize = false;
1232
+
1233
+ _mfpTrigger('ImageHasSize', item);
1234
+
1235
+ if(item.imgHidden) {
1236
+ if(mfp.content)
1237
+ mfp.content.removeClass('mfp-loading');
1238
+
1239
+ item.imgHidden = false;
1240
+ }
1241
+
1242
+ }
1243
+ },
1244
+
1245
+ /**
1246
+ * Function that loops until the image has size to display elements that rely on it asap
1247
+ */
1248
+ findImageSize: function(item) {
1249
+
1250
+ var counter = 0,
1251
+ img = item.img[0],
1252
+ mfpSetInterval = function(delay) {
1253
+
1254
+ if(_imgInterval) {
1255
+ clearInterval(_imgInterval);
1256
+ }
1257
+ // decelerating interval that checks for size of an image
1258
+ _imgInterval = setInterval(function() {
1259
+ if(img.naturalWidth > 0) {
1260
+ mfp._onImageHasSize(item);
1261
+ return;
1262
+ }
1263
+
1264
+ if(counter > 200) {
1265
+ clearInterval(_imgInterval);
1266
+ }
1267
+
1268
+ counter++;
1269
+ if(counter === 3) {
1270
+ mfpSetInterval(10);
1271
+ } else if(counter === 40) {
1272
+ mfpSetInterval(50);
1273
+ } else if(counter === 100) {
1274
+ mfpSetInterval(500);
1275
+ }
1276
+ }, delay);
1277
+ };
1278
+
1279
+ mfpSetInterval(1);
1280
+ },
1281
+
1282
+ getImage: function(item, template) {
1283
+
1284
+ var guard = 0,
1285
+
1286
+ // image load complete handler
1287
+ onLoadComplete = function() {
1288
+ if(item) {
1289
+ if (item.img[0].complete) {
1290
+ item.img.off('.mfploader');
1291
+
1292
+ if(item === mfp.currItem){
1293
+ mfp._onImageHasSize(item);
1294
+
1295
+ mfp.updateStatus('ready');
1296
+ }
1297
+
1298
+ item.hasSize = true;
1299
+ item.loaded = true;
1300
+
1301
+ _mfpTrigger('ImageLoadComplete');
1302
+
1303
+ }
1304
+ else {
1305
+ // if image complete check fails 200 times (20 sec), we assume that there was an error.
1306
+ guard++;
1307
+ if(guard < 200) {
1308
+ setTimeout(onLoadComplete,100);
1309
+ } else {
1310
+ onLoadError();
1311
+ }
1312
+ }
1313
+ }
1314
+ },
1315
+
1316
+ // image error handler
1317
+ onLoadError = function() {
1318
+ if(item) {
1319
+ item.img.off('.mfploader');
1320
+ if(item === mfp.currItem){
1321
+ mfp._onImageHasSize(item);
1322
+ mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1323
+ }
1324
+
1325
+ item.hasSize = true;
1326
+ item.loaded = true;
1327
+ item.loadError = true;
1328
+ }
1329
+ },
1330
+ imgSt = mfp.st.image;
1331
+
1332
+
1333
+ var el = template.find('.mfp-img');
1334
+ if(el.length) {
1335
+ var img = document.createElement('img');
1336
+ img.className = 'mfp-img';
1337
+ if(item.el && item.el.find('img').length) {
1338
+ img.alt = item.el.find('img').attr('alt');
1339
+ }
1340
+ item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);
1341
+ img.src = item.src;
1342
+
1343
+ // without clone() "error" event is not firing when IMG is replaced by new IMG
1344
+ // TODO: find a way to avoid such cloning
1345
+ if(el.is('img')) {
1346
+ item.img = item.img.clone();
1347
+ }
1348
+
1349
+ img = item.img[0];
1350
+ if(img.naturalWidth > 0) {
1351
+ item.hasSize = true;
1352
+ } else if(!img.width) {
1353
+ item.hasSize = false;
1354
+ }
1355
+ }
1356
+
1357
+ mfp._parseMarkup(template, {
1358
+ title: _getTitle(item),
1359
+ img_replaceWith: item.img
1360
+ }, item);
1361
+
1362
+ mfp.resizeImage();
1363
+
1364
+ if(item.hasSize) {
1365
+ if(_imgInterval) clearInterval(_imgInterval);
1366
+
1367
+ if(item.loadError) {
1368
+ template.addClass('mfp-loading');
1369
+ mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1370
+ } else {
1371
+ template.removeClass('mfp-loading');
1372
+ mfp.updateStatus('ready');
1373
+ }
1374
+ return template;
1375
+ }
1376
+
1377
+ mfp.updateStatus('loading');
1378
+ item.loading = true;
1379
+
1380
+ if(!item.hasSize) {
1381
+ item.imgHidden = true;
1382
+ template.addClass('mfp-loading');
1383
+ mfp.findImageSize(item);
1384
+ }
1385
+
1386
+ return template;
1387
+ }
1388
+ }
1389
+ });
1390
+
1391
+
1392
+
1393
+ /*>>image*/
1394
+
1395
+ /*>>zoom*/
1396
+ var hasMozTransform,
1397
+ getHasMozTransform = function() {
1398
+ if(hasMozTransform === undefined) {
1399
+ hasMozTransform = document.createElement('p').style.MozTransform !== undefined;
1400
+ }
1401
+ return hasMozTransform;
1402
+ };
1403
+
1404
+ $.magnificPopup.registerModule('zoom', {
1405
+
1406
+ options: {
1407
+ enabled: false,
1408
+ easing: 'ease-in-out',
1409
+ duration: 300,
1410
+ opener: function(element) {
1411
+ return element.is('img') ? element : element.find('img');
1412
+ }
1413
+ },
1414
+
1415
+ proto: {
1416
+
1417
+ initZoom: function() {
1418
+ var zoomSt = mfp.st.zoom,
1419
+ ns = '.zoom',
1420
+ image;
1421
+
1422
+ if(!zoomSt.enabled || !mfp.supportsTransition) {
1423
+ return;
1424
+ }
1425
+
1426
+ var duration = zoomSt.duration,
1427
+ getElToAnimate = function(image) {
1428
+ var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),
1429
+ transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,
1430
+ cssObj = {
1431
+ position: 'fixed',
1432
+ zIndex: 9999,
1433
+ left: 0,
1434
+ top: 0,
1435
+ '-webkit-backface-visibility': 'hidden'
1436
+ },
1437
+ t = 'transition';
1438
+
1439
+ cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;
1440
+
1441
+ newImg.css(cssObj);
1442
+ return newImg;
1443
+ },
1444
+ showMainContent = function() {
1445
+ mfp.content.css('visibility', 'visible');
1446
+ },
1447
+ openTimeout,
1448
+ animatedImg;
1449
+
1450
+ _mfpOn('BuildControls'+ns, function() {
1451
+ if(mfp._allowZoom()) {
1452
+
1453
+ clearTimeout(openTimeout);
1454
+ mfp.content.css('visibility', 'hidden');
1455
+
1456
+ // Basically, all code below does is clones existing image, puts in on top of the current one and animated it
1457
+
1458
+ image = mfp._getItemToZoom();
1459
+
1460
+ if(!image) {
1461
+ showMainContent();
1462
+ return;
1463
+ }
1464
+
1465
+ animatedImg = getElToAnimate(image);
1466
+
1467
+ animatedImg.css( mfp._getOffset() );
1468
+
1469
+ mfp.wrap.append(animatedImg);
1470
+
1471
+ openTimeout = setTimeout(function() {
1472
+ animatedImg.css( mfp._getOffset( true ) );
1473
+ openTimeout = setTimeout(function() {
1474
+
1475
+ showMainContent();
1476
+
1477
+ setTimeout(function() {
1478
+ animatedImg.remove();
1479
+ image = animatedImg = null;
1480
+ _mfpTrigger('ZoomAnimationEnded');
1481
+ }, 16); // avoid blink when switching images
1482
+
1483
+ }, duration); // this timeout equals animation duration
1484
+
1485
+ }, 16); // by adding this timeout we avoid short glitch at the beginning of animation
1486
+
1487
+
1488
+ // Lots of timeouts...
1489
+ }
1490
+ });
1491
+ _mfpOn(BEFORE_CLOSE_EVENT+ns, function() {
1492
+ if(mfp._allowZoom()) {
1493
+
1494
+ clearTimeout(openTimeout);
1495
+
1496
+ mfp.st.removalDelay = duration;
1497
+
1498
+ if(!image) {
1499
+ image = mfp._getItemToZoom();
1500
+ if(!image) {
1501
+ return;
1502
+ }
1503
+ animatedImg = getElToAnimate(image);
1504
+ }
1505
+
1506
+
1507
+ animatedImg.css( mfp._getOffset(true) );
1508
+ mfp.wrap.append(animatedImg);
1509
+ mfp.content.css('visibility', 'hidden');
1510
+
1511
+ setTimeout(function() {
1512
+ animatedImg.css( mfp._getOffset() );
1513
+ }, 16);
1514
+ }
1515
+
1516
+ });
1517
+
1518
+ _mfpOn(CLOSE_EVENT+ns, function() {
1519
+ if(mfp._allowZoom()) {
1520
+ showMainContent();
1521
+ if(animatedImg) {
1522
+ animatedImg.remove();
1523
+ }
1524
+ image = null;
1525
+ }
1526
+ });
1527
+ },
1528
+
1529
+ _allowZoom: function() {
1530
+ return mfp.currItem.type === 'image';
1531
+ },
1532
+
1533
+ _getItemToZoom: function() {
1534
+ if(mfp.currItem.hasSize) {
1535
+ return mfp.currItem.img;
1536
+ } else {
1537
+ return false;
1538
+ }
1539
+ },
1540
+
1541
+ // Get element postion relative to viewport
1542
+ _getOffset: function(isLarge) {
1543
+ var el;
1544
+ if(isLarge) {
1545
+ el = mfp.currItem.img;
1546
+ } else {
1547
+ el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);
1548
+ }
1549
+
1550
+ var offset = el.offset();
1551
+ var paddingTop = parseInt(el.css('padding-top'),10);
1552
+ var paddingBottom = parseInt(el.css('padding-bottom'),10);
1553
+ offset.top -= ( $(window).scrollTop() - paddingTop );
1554
+
1555
+
1556
+ /*
1557
+
1558
+ Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.
1559
+
1560
+ */
1561
+ var obj = {
1562
+ width: el.width(),
1563
+ // fix Zepto height+padding issue
1564
+ height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop
1565
+ };
1566
+
1567
+ // I hate to do this, but there is no another option
1568
+ if( getHasMozTransform() ) {
1569
+ obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
1570
+ } else {
1571
+ obj.left = offset.left;
1572
+ obj.top = offset.top;
1573
+ }
1574
+ return obj;
1575
+ }
1576
+
1577
+ }
1578
+ });
1579
+
1580
+
1581
+
1582
+ /*>>zoom*/
1583
+
1584
+ /*>>iframe*/
1585
+
1586
+ var IFRAME_NS = 'iframe',
1587
+ _emptyPage = '//about:blank',
1588
+
1589
+ _fixIframeBugs = function(isShowing) {
1590
+ if(mfp.currTemplate[IFRAME_NS]) {
1591
+ var el = mfp.currTemplate[IFRAME_NS].find('iframe');
1592
+ if(el.length) {
1593
+ // reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug
1594
+ if(!isShowing) {
1595
+ el[0].src = _emptyPage;
1596
+ }
1597
+
1598
+ // IE8 black screen bug fix
1599
+ if(mfp.isIE8) {
1600
+ el.css('display', isShowing ? 'block' : 'none');
1601
+ }
1602
+ }
1603
+ }
1604
+ };
1605
+
1606
+ $.magnificPopup.registerModule(IFRAME_NS, {
1607
+
1608
+ options: {
1609
+ markup: '<div class="mfp-iframe-scaler">'+
1610
+ '<div class="mfp-close"></div>'+
1611
+ '<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+
1612
+ '</div>',
1613
+
1614
+ srcAction: 'iframe_src',
1615
+
1616
+ // we don't care and support only one default type of URL by default
1617
+ patterns: {
1618
+ youtube: {
1619
+ index: 'youtube.com',
1620
+ id: 'v=',
1621
+ src: '//www.youtube.com/embed/%id%?autoplay=1'
1622
+ },
1623
+ vimeo: {
1624
+ index: 'vimeo.com/',
1625
+ id: '/',
1626
+ src: '//player.vimeo.com/video/%id%?autoplay=1'
1627
+ },
1628
+ gmaps: {
1629
+ index: '//maps.google.',
1630
+ src: '%id%&output=embed'
1631
+ }
1632
+ }
1633
+ },
1634
+
1635
+ proto: {
1636
+ initIframe: function() {
1637
+ mfp.types.push(IFRAME_NS);
1638
+
1639
+ _mfpOn('BeforeChange', function(e, prevType, newType) {
1640
+ if(prevType !== newType) {
1641
+ if(prevType === IFRAME_NS) {
1642
+ _fixIframeBugs(); // iframe if removed
1643
+ } else if(newType === IFRAME_NS) {
1644
+ _fixIframeBugs(true); // iframe is showing
1645
+ }
1646
+ }// else {
1647
+ // iframe source is switched, don't do anything
1648
+ //}
1649
+ });
1650
+
1651
+ _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {
1652
+ _fixIframeBugs();
1653
+ });
1654
+ },
1655
+
1656
+ getIframe: function(item, template) {
1657
+ var embedSrc = item.src;
1658
+ var iframeSt = mfp.st.iframe;
1659
+
1660
+ $.each(iframeSt.patterns, function() {
1661
+ if(embedSrc.indexOf( this.index ) > -1) {
1662
+ if(this.id) {
1663
+ if(typeof this.id === 'string') {
1664
+ embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);
1665
+ } else {
1666
+ embedSrc = this.id.call( this, embedSrc );
1667
+ }
1668
+ }
1669
+ embedSrc = this.src.replace('%id%', embedSrc );
1670
+ return false; // break;
1671
+ }
1672
+ });
1673
+
1674
+ var dataObj = {};
1675
+ if(iframeSt.srcAction) {
1676
+ dataObj[iframeSt.srcAction] = embedSrc;
1677
+ }
1678
+ mfp._parseMarkup(template, dataObj, item);
1679
+
1680
+ mfp.updateStatus('ready');
1681
+
1682
+ return template;
1683
+ }
1684
+ }
1685
+ });
1686
+
1687
+
1688
+
1689
+ /*>>iframe*/
1690
+
1691
+ /*>>gallery*/
1692
+ /**
1693
+ * Get looped index depending on number of slides
1694
+ */
1695
+ var _getLoopedId = function(index) {
1696
+ var numSlides = mfp.items.length;
1697
+ if(index > numSlides - 1) {
1698
+ return index - numSlides;
1699
+ } else if(index < 0) {
1700
+ return numSlides + index;
1701
+ }
1702
+ return index;
1703
+ },
1704
+ _replaceCurrTotal = function(text, curr, total) {
1705
+ return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total);
1706
+ };
1707
+
1708
+ $.magnificPopup.registerModule('gallery', {
1709
+
1710
+ options: {
1711
+ enabled: false,
1712
+ arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
1713
+ preload: [0,2],
1714
+ navigateByImgClick: true,
1715
+ arrows: true,
1716
+
1717
+ tPrev: 'Previous (Left arrow key)',
1718
+ tNext: 'Next (Right arrow key)',
1719
+ tCounter: '%curr% of %total%'
1720
+ },
1721
+
1722
+ proto: {
1723
+ initGallery: function() {
1724
+
1725
+ var gSt = mfp.st.gallery,
1726
+ ns = '.mfp-gallery',
1727
+ supportsFastClick = Boolean($.fn.mfpFastClick);
1728
+
1729
+ mfp.direction = true; // true - next, false - prev
1730
+
1731
+ if(!gSt || !gSt.enabled ) return false;
1732
+
1733
+ _wrapClasses += ' mfp-gallery';
1734
+
1735
+ _mfpOn(OPEN_EVENT+ns, function() {
1736
+
1737
+ if(gSt.navigateByImgClick) {
1738
+ mfp.wrap.on('click'+ns, '.mfp-img', function() {
1739
+ if(mfp.items.length > 1) {
1740
+ mfp.next();
1741
+ return false;
1742
+ }
1743
+ });
1744
+ }
1745
+
1746
+ _document.on('keydown'+ns, function(e) {
1747
+ if (e.keyCode === 37) {
1748
+ mfp.prev();
1749
+ } else if (e.keyCode === 39) {
1750
+ mfp.next();
1751
+ }
1752
+ });
1753
+ });
1754
+
1755
+ _mfpOn('UpdateStatus'+ns, function(e, data) {
1756
+ if(data.text) {
1757
+ data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);
1758
+ }
1759
+ });
1760
+
1761
+ _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {
1762
+ var l = mfp.items.length;
1763
+ values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';
1764
+ });
1765
+
1766
+ _mfpOn('BuildControls' + ns, function() {
1767
+ if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {
1768
+ var markup = gSt.arrowMarkup,
1769
+ arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS),
1770
+ arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS);
1771
+
1772
+ var eName = supportsFastClick ? 'mfpFastClick' : 'click';
1773
+ arrowLeft[eName](function() {
1774
+ mfp.prev();
1775
+ });
1776
+ arrowRight[eName](function() {
1777
+ mfp.next();
1778
+ });
1779
+
1780
+ // Polyfill for :before and :after (adds elements with classes mfp-a and mfp-b)
1781
+ if(mfp.isIE7) {
1782
+ _getEl('b', arrowLeft[0], false, true);
1783
+ _getEl('a', arrowLeft[0], false, true);
1784
+ _getEl('b', arrowRight[0], false, true);
1785
+ _getEl('a', arrowRight[0], false, true);
1786
+ }
1787
+
1788
+ mfp.container.append(arrowLeft.add(arrowRight));
1789
+ }
1790
+ });
1791
+
1792
+ _mfpOn(CHANGE_EVENT+ns, function() {
1793
+ if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);
1794
+
1795
+ mfp._preloadTimeout = setTimeout(function() {
1796
+ mfp.preloadNearbyImages();
1797
+ mfp._preloadTimeout = null;
1798
+ }, 16);
1799
+ });
1800
+
1801
+
1802
+ _mfpOn(CLOSE_EVENT+ns, function() {
1803
+ _document.off(ns);
1804
+ mfp.wrap.off('click'+ns);
1805
+
1806
+ if(mfp.arrowLeft && supportsFastClick) {
1807
+ mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick();
1808
+ }
1809
+ mfp.arrowRight = mfp.arrowLeft = null;
1810
+ });
1811
+
1812
+ },
1813
+ next: function() {
1814
+ mfp.direction = true;
1815
+ mfp.index = _getLoopedId(mfp.index + 1);
1816
+ mfp.updateItemHTML();
1817
+ },
1818
+ prev: function() {
1819
+ mfp.direction = false;
1820
+ mfp.index = _getLoopedId(mfp.index - 1);
1821
+ mfp.updateItemHTML();
1822
+ },
1823
+ goTo: function(newIndex) {
1824
+ mfp.direction = (newIndex >= mfp.index);
1825
+ mfp.index = newIndex;
1826
+ mfp.updateItemHTML();
1827
+ },
1828
+ preloadNearbyImages: function() {
1829
+ var p = mfp.st.gallery.preload,
1830
+ preloadBefore = Math.min(p[0], mfp.items.length),
1831
+ preloadAfter = Math.min(p[1], mfp.items.length),
1832
+ i;
1833
+
1834
+ for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) {
1835
+ mfp._preloadItem(mfp.index+i);
1836
+ }
1837
+ for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) {
1838
+ mfp._preloadItem(mfp.index-i);
1839
+ }
1840
+ },
1841
+ _preloadItem: function(index) {
1842
+ index = _getLoopedId(index);
1843
+
1844
+ if(mfp.items[index].preloaded) {
1845
+ return;
1846
+ }
1847
+
1848
+ var item = mfp.items[index];
1849
+ if(!item.parsed) {
1850
+ item = mfp.parseEl( index );
1851
+ }
1852
+
1853
+ _mfpTrigger('LazyLoad', item);
1854
+
1855
+ if(item.type === 'image') {
1856
+ item.img = $('<img class="mfp-img" />').on('load.mfploader', function() {
1857
+ item.hasSize = true;
1858
+ }).on('error.mfploader', function() {
1859
+ item.hasSize = true;
1860
+ item.loadError = true;
1861
+ _mfpTrigger('LazyLoadError', item);
1862
+ }).attr('src', item.src);
1863
+ }
1864
+
1865
+
1866
+ item.preloaded = true;
1867
+ }
1868
+ }
1869
+ });
1870
+
1871
+ /*
1872
+ Touch Support that might be implemented some day
1873
+
1874
+ addSwipeGesture: function() {
1875
+ var startX,
1876
+ moved,
1877
+ multipleTouches;
1878
+
1879
+ return;
1880
+
1881
+ var namespace = '.mfp',
1882
+ addEventNames = function(pref, down, move, up, cancel) {
1883
+ mfp._tStart = pref + down + namespace;
1884
+ mfp._tMove = pref + move + namespace;
1885
+ mfp._tEnd = pref + up + namespace;
1886
+ mfp._tCancel = pref + cancel + namespace;
1887
+ };
1888
+
1889
+ if(window.navigator.msPointerEnabled) {
1890
+ addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel');
1891
+ } else if('ontouchstart' in window) {
1892
+ addEventNames('touch', 'start', 'move', 'end', 'cancel');
1893
+ } else {
1894
+ return;
1895
+ }
1896
+ _window.on(mfp._tStart, function(e) {
1897
+ var oE = e.originalEvent;
1898
+ multipleTouches = moved = false;
1899
+ startX = oE.pageX || oE.changedTouches[0].pageX;
1900
+ }).on(mfp._tMove, function(e) {
1901
+ if(e.originalEvent.touches.length > 1) {
1902
+ multipleTouches = e.originalEvent.touches.length;
1903
+ } else {
1904
+ //e.preventDefault();
1905
+ moved = true;
1906
+ }
1907
+ }).on(mfp._tEnd + ' ' + mfp._tCancel, function(e) {
1908
+ if(moved && !multipleTouches) {
1909
+ var oE = e.originalEvent,
1910
+ diff = startX - (oE.pageX || oE.changedTouches[0].pageX);
1911
+
1912
+ if(diff > 20) {
1913
+ mfp.next();
1914
+ } else if(diff < -20) {
1915
+ mfp.prev();
1916
+ }
1917
+ }
1918
+ });
1919
+ },
1920
+ */
1921
+
1922
+
1923
+ /*>>gallery*/
1924
+
1925
+ /*>>retina*/
1926
+
1927
+ var RETINA_NS = 'retina';
1928
+
1929
+ $.magnificPopup.registerModule(RETINA_NS, {
1930
+ options: {
1931
+ replaceSrc: function(item) {
1932
+ return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; });
1933
+ },
1934
+ ratio: 1 // Function or number. Set to 1 to disable.
1935
+ },
1936
+ proto: {
1937
+ initRetina: function() {
1938
+ if(window.devicePixelRatio > 1) {
1939
+
1940
+ var st = mfp.st.retina,
1941
+ ratio = st.ratio;
1942
+
1943
+ ratio = !isNaN(ratio) ? ratio : ratio();
1944
+
1945
+ if(ratio > 1) {
1946
+ _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) {
1947
+ item.img.css({
1948
+ 'max-width': item.img[0].naturalWidth / ratio,
1949
+ 'width': '100%'
1950
+ });
1951
+ });
1952
+ _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) {
1953
+ item.src = st.replaceSrc(item, ratio);
1954
+ });
1955
+ }
1956
+ }
1957
+
1958
+ }
1959
+ }
1960
+ });
1961
+
1962
+ /*>>retina*/
1963
+
1964
+ /*>>fastclick*/
1965
+ /**
1966
+ * FastClick event implementation. (removes 300ms delay on touch devices)
1967
+ * Based on https://developers.google.com/mobile/articles/fast_buttons
1968
+ *
1969
+ * You may use it outside the Magnific Popup by calling just:
1970
+ *
1971
+ * $('.your-el').mfpFastClick(function() {
1972
+ * console.log('Clicked!');
1973
+ * });
1974
+ *
1975
+ * To unbind:
1976
+ * $('.your-el').destroyMfpFastClick();
1977
+ *
1978
+ *
1979
+ * Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound.
1980
+ * If you need something more advanced, use plugin by FT Labs https://github.com/ftlabs/fastclick
1981
+ *
1982
+ */
1983
+
1984
+ (function() {
1985
+ var ghostClickDelay = 1000,
1986
+ supportsTouch = 'ontouchstart' in window,
1987
+ unbindTouchMove = function() {
1988
+ _window.off('touchmove'+ns+' touchend'+ns);
1989
+ },
1990
+ eName = 'mfpFastClick',
1991
+ ns = '.'+eName;
1992
+
1993
+
1994
+ // As Zepto.js doesn't have an easy way to add custom events (like jQuery), so we implement it in this way
1995
+ $.fn.mfpFastClick = function(callback) {
1996
+
1997
+ return $(this).each(function() {
1998
+
1999
+ var elem = $(this),
2000
+ lock;
2001
+
2002
+ if( supportsTouch ) {
2003
+
2004
+ var timeout,
2005
+ startX,
2006
+ startY,
2007
+ pointerMoved,
2008
+ point,
2009
+ numPointers;
2010
+
2011
+ elem.on('touchstart' + ns, function(e) {
2012
+ pointerMoved = false;
2013
+ numPointers = 1;
2014
+
2015
+ point = e.originalEvent ? e.originalEvent.touches[0] : e.touches[0];
2016
+ startX = point.clientX;
2017
+ startY = point.clientY;
2018
+
2019
+ _window.on('touchmove'+ns, function(e) {
2020
+ point = e.originalEvent ? e.originalEvent.touches : e.touches;
2021
+ numPointers = point.length;
2022
+ point = point[0];
2023
+ if (Math.abs(point.clientX - startX) > 10 ||
2024
+ Math.abs(point.clientY - startY) > 10) {
2025
+ pointerMoved = true;
2026
+ unbindTouchMove();
2027
+ }
2028
+ }).on('touchend'+ns, function(e) {
2029
+ unbindTouchMove();
2030
+ if(pointerMoved || numPointers > 1) {
2031
+ return;
2032
+ }
2033
+ lock = true;
2034
+ e.preventDefault();
2035
+ clearTimeout(timeout);
2036
+ timeout = setTimeout(function() {
2037
+ lock = false;
2038
+ }, ghostClickDelay);
2039
+ callback();
2040
+ });
2041
+ });
2042
+
2043
+ }
2044
+
2045
+ elem.on('click' + ns, function() {
2046
+ if(!lock) {
2047
+ callback();
2048
+ }
2049
+ });
2050
+ });
2051
+ };
2052
+
2053
+ $.fn.destroyMfpFastClick = function() {
2054
+ $(this).off('touchstart' + ns + ' click' + ns);
2055
+ if(supportsTouch) _window.off('touchmove'+ns+' touchend'+ns);
2056
+ };
2057
+ })();
2058
+
2059
+ /*>>fastclick*/
2060
+ _checkInstance(); }));
assets/js/jquery.magnific-popup.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /*! Magnific Popup - v1.0.0 - 2015-09-17
2
+ * http://dimsemenov.com/plugins/magnific-popup/
3
+ * Copyright (c) 2015 Dmitry Semenov; */
4
+ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()});
assets/js/jquery.mb.YTPlayer.js ADDED
@@ -0,0 +1,1544 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*___________________________________________________________________________________________________________________________________________________
2
+ _ jquery.mb.components _
3
+ _ _
4
+ _ file: jquery.mb.YTPlayer.src.js _
5
+ _ last modified: 01/07/15 19.35 _
6
+ _ _
7
+ _ Open Lab s.r.l., Florence - Italy _
8
+ _ _
9
+ _ email: matteo@open-lab.com _
10
+ _ site: http://pupunzi.com _
11
+ _ http://open-lab.com _
12
+ _ blog: http://pupunzi.open-lab.com _
13
+ _ Q&A: http://jquery.pupunzi.com _
14
+ _ _
15
+ _ Licences: MIT, GPL _
16
+ _ http://www.opensource.org/licenses/mit-license.php _
17
+ _ http://www.gnu.org/licenses/gpl.html _
18
+ _ _
19
+ _ Copyright (c) 2001-2015. Matteo Bicocchi (Pupunzi); _
20
+ ___________________________________________________________________________________________________________________________________________________*/
21
+ var ytp = ytp || {};
22
+
23
+ function onYouTubeIframeAPIReady() {
24
+ if( ytp.YTAPIReady ) return;
25
+ ytp.YTAPIReady = true;
26
+ jQuery( document ).trigger( "YTAPIReady" );
27
+ }
28
+
29
+ var getYTPVideoID = function( url ) {
30
+ var videoID, playlistID;
31
+ if( url.indexOf( "youtu.be" ) > 0 ) {
32
+ videoID = url.substr( url.lastIndexOf( "/" ) + 1, url.length );
33
+ playlistID = videoID.indexOf( "?list=" ) > 0 ? videoID.substr( videoID.lastIndexOf( "=" ), videoID.length ) : null;
34
+ videoID = playlistID ? videoID.substr( 0, videoID.lastIndexOf( "?" ) ) : videoID;
35
+ } else if( url.indexOf( "http" ) > -1 ) {
36
+ //videoID = url.match( /([\/&]v\/([^&#]*))|([\\?&]v=([^&#]*))/ )[ 1 ];
37
+ videoID = url.match( /[\\?&]v=([^&#]*)/ )[ 1 ];
38
+ playlistID = url.indexOf( "list=" ) > 0 ? url.match( /[\\?&]list=([^&#]*)/ )[ 1 ] : null;
39
+ } else {
40
+ videoID = url.length > 15 ? null : url;
41
+ playlistID = videoID ? null : url;
42
+ }
43
+ return {
44
+ videoID: videoID,
45
+ playlistID: playlistID
46
+ };
47
+ };
48
+
49
+ ( function( jQuery, ytp ) {
50
+
51
+ jQuery.mbYTPlayer = {
52
+ name: "jquery.mb.YTPlayer",
53
+ version: "2.9.5",
54
+ build: "{{ build }}",
55
+ author: "Matteo Bicocchi",
56
+ apiKey: "",
57
+ defaults: {
58
+ containment: "body",
59
+ ratio: "auto", // "auto", "16/9", "4/3"
60
+ videoURL: null,
61
+ playlistURL: null,
62
+ startAt: 0,
63
+ stopAt: 0,
64
+ autoPlay: true,
65
+ vol: 50, // 1 to 100
66
+ addRaster: false,
67
+ opacity: 1,
68
+ quality: "default", //or “small”, “medium”, “large”, “hd720”, “hd1080”, “highres”
69
+ mute: false,
70
+ loop: true,
71
+ showControls: true,
72
+ showAnnotations: false,
73
+ showYTLogo: true,
74
+ stopMovieOnBlur: true,
75
+ realfullscreen: true,
76
+ gaTrack: true,
77
+ optimizeDisplay: true,
78
+ onReady: function( player ) {}
79
+ },
80
+ /* @fontface icons */
81
+ controls: {
82
+ play: "P",
83
+ pause: "p",
84
+ mute: "M",
85
+ unmute: "A",
86
+ onlyYT: "O",
87
+ showSite: "R",
88
+ ytLogo: "Y"
89
+ },
90
+ locationProtocol: "https:",
91
+ /**
92
+ *
93
+ * @param options
94
+ * @returns [players]
95
+ */
96
+ buildPlayer: function( options ) {
97
+ return this.each( function() {
98
+ var YTPlayer = this;
99
+ var $YTPlayer = jQuery( YTPlayer );
100
+ YTPlayer.loop = 0;
101
+ YTPlayer.opt = {};
102
+ YTPlayer.state = {};
103
+ YTPlayer.filtersEnabled = true;
104
+ YTPlayer.filters = {
105
+ grayscale: {
106
+ value: 0,
107
+ unit: "%"
108
+ },
109
+ hue_rotate: {
110
+ value: 0,
111
+ unit: "deg"
112
+ },
113
+ invert: {
114
+ value: 0,
115
+ unit: "%"
116
+ },
117
+ opacity: {
118
+ value: 0,
119
+ unit: "%"
120
+ },
121
+ saturate: {
122
+ value: 0,
123
+ unit: "%"
124
+ },
125
+ sepia: {
126
+ value: 0,
127
+ unit: "%"
128
+ },
129
+ brightness: {
130
+ value: 0,
131
+ unit: "%"
132
+ },
133
+ contrast: {
134
+ value: 0,
135
+ unit: "%"
136
+ },
137
+ blur: {
138
+ value: 0,
139
+ unit: "px"
140
+ }
141
+ };
142
+ $YTPlayer.addClass( "mb_YTPlayer" );
143
+ var property = $YTPlayer.data( "property" ) && typeof $YTPlayer.data( "property" ) == "string" ? eval( '(' + $YTPlayer.data( "property" ) + ')' ) : $YTPlayer.data( "property" );
144
+ if( typeof property != "undefined" && typeof property.vol != "undefined" ) property.vol = property.vol === 0 ? property.vol = 1 : property.vol;
145
+ jQuery.extend( YTPlayer.opt, jQuery.mbYTPlayer.defaults, options, property );
146
+ if( !YTPlayer.hasChanged ) {
147
+ YTPlayer.defaultOpt = {};
148
+ jQuery.extend( YTPlayer.defaultOpt, jQuery.mbYTPlayer.defaults, options, property );
149
+ }
150
+ YTPlayer.isRetina = ( window.retina || window.devicePixelRatio > 1 );
151
+ var isIframe = function() {
152
+ var isIfr = false;
153
+ try {
154
+ if( self.location.href != top.location.href ) isIfr = true;
155
+ } catch( e ) {
156
+ isIfr = true;
157
+ }
158
+ return isIfr;
159
+ };
160
+ YTPlayer.canGoFullScreen = !( jQuery.browser.msie || jQuery.browser.opera || isIframe() );
161
+ if( !YTPlayer.canGoFullScreen ) YTPlayer.opt.realfullscreen = false;
162
+ if( !$YTPlayer.attr( "id" ) ) $YTPlayer.attr( "id", "video_" + new Date().getTime() );
163
+ var playerID = "mbYTP_" + YTPlayer.id;
164
+ YTPlayer.isAlone = false;
165
+ YTPlayer.hasFocus = true;
166
+ var videoID = this.opt.videoURL ? getYTPVideoID( this.opt.videoURL ).videoID : $YTPlayer.attr( "href" ) ? getYTPVideoID( $YTPlayer.attr( "href" ) ).videoID : false;
167
+ var playlistID = this.opt.videoURL ? getYTPVideoID( this.opt.videoURL ).playlistID : $YTPlayer.attr( "href" ) ? getYTPVideoID( $YTPlayer.attr( "href" ) ).playlistID : false;
168
+ YTPlayer.videoID = videoID;
169
+ YTPlayer.playlistID = playlistID;
170
+ YTPlayer.opt.showAnnotations = ( YTPlayer.opt.showAnnotations ) ? '0' : '3';
171
+ var playerVars = {
172
+ 'autoplay': 0,
173
+ 'modestbranding': 1,
174
+ 'controls': 0,
175
+ 'showinfo': 0,
176
+ 'rel': 0,
177
+ 'enablejsapi': 1,
178
+ 'version': 3,
179
+ 'playerapiid': playerID,
180
+ 'origin': '*',
181
+ 'allowfullscreen': true,
182
+ 'wmode': 'transparent',
183
+ 'iv_load_policy': YTPlayer.opt.showAnnotations
184
+ };
185
+ if( document.createElement( 'video' ).canPlayType ) jQuery.extend( playerVars, {
186
+ 'html5': 1
187
+ } );
188
+ if( jQuery.browser.msie && jQuery.browser.version < 9 ) this.opt.opacity = 1;
189
+ var playerBox = jQuery( "<div/>" ).attr( "id", playerID ).addClass( "playerBox" );
190
+ var overlay = jQuery( "<div/>" ).css( {
191
+ position: "absolute",
192
+ top: 0,
193
+ left: 0,
194
+ width: "100%",
195
+ height: "100%"
196
+ } ).addClass( "YTPOverlay" );
197
+ YTPlayer.isSelf = YTPlayer.opt.containment == "self";
198
+ YTPlayer.defaultOpt.containment = YTPlayer.opt.containment = YTPlayer.opt.containment == "self" ? jQuery( this ) : jQuery( YTPlayer.opt.containment );
199
+ YTPlayer.isBackground = YTPlayer.opt.containment.get( 0 ).tagName.toLowerCase() == "body";
200
+ if( YTPlayer.isBackground && ytp.backgroundIsInited ) return;
201
+ var isPlayer = YTPlayer.opt.containment.is( jQuery( this ) );
202
+ YTPlayer.canPlayOnMobile = isPlayer && jQuery( this ).children().length === 0;
203
+ if( !isPlayer ) {
204
+ $YTPlayer.hide();
205
+ } else {
206
+ YTPlayer.isPlayer = true;
207
+ }
208
+ if( jQuery.browser.mobile && !YTPlayer.canPlayOnMobile ) {
209
+ $YTPlayer.remove();
210
+ return;
211
+ }
212
+ var wrapper = jQuery( "<div/>" ).addClass( "mbYTP_wrapper" ).attr( "id", "wrapper_" + playerID );
213
+ wrapper.css( {
214
+ position: "absolute",
215
+ zIndex: 0,
216
+ minWidth: "100%",
217
+ minHeight: "100%",
218
+ left: 0,
219
+ top: 0,
220
+ overflow: "hidden",
221
+ opacity: 0
222
+ } );
223
+ playerBox.css( {
224
+ position: "absolute",
225
+ zIndex: 0,
226
+ width: "100%",
227
+ height: "100%",
228
+ top: 0,
229
+ left: 0,
230
+ overflow: "hidden"
231
+ } );
232
+ wrapper.append( playerBox );
233
+ YTPlayer.opt.containment.children().not( "script, style" ).each( function() {
234
+ if( jQuery( this ).css( "position" ) == "static" ) jQuery( this ).css( "position", "relative" );
235
+ } );
236
+ if( YTPlayer.isBackground ) {
237
+ jQuery( "body" ).css( {
238
+ boxSizing: "border-box"
239
+ } );
240
+ wrapper.css( {
241
+ position: "fixed",
242
+ top: 0,
243
+ left: 0,
244
+ zIndex: 0
245
+ } );
246
+ $YTPlayer.hide();
247
+ } else if( YTPlayer.opt.containment.css( "position" ) == "static" ) YTPlayer.opt.containment.css( {
248
+ position: "relative"
249
+ } );
250
+ YTPlayer.opt.containment.prepend( wrapper );
251
+ YTPlayer.wrapper = wrapper;
252
+ playerBox.css( {
253
+ opacity: 1
254
+ } );
255
+ if( !jQuery.browser.mobile ) {
256
+ playerBox.after( overlay );
257
+ YTPlayer.overlay = overlay;
258
+ }
259
+ if( !YTPlayer.isBackground ) {
260
+ overlay.on( "mouseenter", function() {
261
+ if( YTPlayer.controlBar ) YTPlayer.controlBar.addClass( "visible" );
262
+ } ).on( "mouseleave", function() {
263
+ if( YTPlayer.controlBar ) YTPlayer.controlBar.removeClass( "visible" );
264
+ } )
265
+ }
266
+ if( !ytp.YTAPIReady ) {
267
+ jQuery( "#YTAPI" ).remove();
268
+ var tag = jQuery( "<script></script>" ).attr( {
269
+ "src": jQuery.mbYTPlayer.locationProtocol + "//www.youtube.com/iframe_api?v=" + jQuery.mbYTPlayer.version,
270
+ "id": "YTAPI"
271
+ } );
272
+ jQuery( "head" ).prepend( tag );
273
+ } else {
274
+ setTimeout( function() {
275
+ jQuery( document ).trigger( "YTAPIReady" );
276
+ }, 100 )
277
+ }
278
+ jQuery( document ).on( "YTAPIReady", function() {
279
+ if( ( YTPlayer.isBackground && ytp.backgroundIsInited ) || YTPlayer.isInit ) return;
280
+ if( YTPlayer.isBackground ) {
281
+ ytp.backgroundIsInited = true;
282
+ }
283
+ YTPlayer.opt.autoPlay = typeof YTPlayer.opt.autoPlay == "undefined" ? ( YTPlayer.isBackground ? true : false ) : YTPlayer.opt.autoPlay;
284
+ YTPlayer.opt.vol = YTPlayer.opt.vol ? YTPlayer.opt.vol : 100;
285
+ jQuery.mbYTPlayer.getDataFromAPI( YTPlayer );
286
+ jQuery( YTPlayer ).on( "YTPChanged", function() {
287
+ if( YTPlayer.isInit ) return;
288
+ YTPlayer.isInit = true;
289
+ //if is mobile && isPlayer fallback to the default YT player
290
+ if( jQuery.browser.mobile && YTPlayer.canPlayOnMobile ) {
291
+ // Try to adjust the player dimention
292
+ if( YTPlayer.opt.containment.outerWidth() > jQuery( window ).width() ) {
293
+ YTPlayer.opt.containment.css( {
294
+ maxWidth: "100%"
295
+ } );
296
+ var h = YTPlayer.opt.containment.outerWidth() * .6;
297
+ YTPlayer.opt.containment.css( {
298
+ maxHeight: h
299
+ } );
300
+ }
301
+ new YT.Player( playerID, {
302
+ videoId: YTPlayer.videoID.toString(),
303
+ height: '100%',
304
+ width: '100%',
305
+ events: {
306
+ 'onReady': function( event ) {
307
+ YTPlayer.player = event.target;
308
+ playerBox.css( {
309
+ opacity: 1
310
+ } );
311
+ YTPlayer.wrapper.css( {
312
+ opacity: 1
313
+ } );
314
+ }
315
+ }
316
+ } );
317
+ return;
318
+ }
319
+ new YT.Player( playerID, {
320
+ videoId: YTPlayer.videoID.toString(),
321
+ playerVars: playerVars,
322
+ events: {
323
+ 'onReady': function( event ) {
324
+ YTPlayer.player = event.target;
325
+ if( YTPlayer.isReady ) return;
326
+ YTPlayer.isReady = YTPlayer.isPlayer && !YTPlayer.opt.autoPlay ? false : true;
327
+ YTPlayer.playerEl = YTPlayer.player.getIframe();
328
+ $YTPlayer.optimizeDisplay();
329
+ YTPlayer.videoID = videoID;
330
+ jQuery( window ).on( "resize.YTP", function() {
331
+ $YTPlayer.optimizeDisplay();
332
+ } );
333
+ jQuery.mbYTPlayer.checkForState( YTPlayer );
334
+ // Trigger state events
335
+ var YTPEvent = jQuery.Event( "YTPUnstarted" );
336
+ YTPEvent.time = YTPlayer.player.time;
337
+ if( YTPlayer.canTrigger ) jQuery( YTPlayer ).trigger( YTPEvent );
338
+ },
339
+ /**
340
+ *
341
+ * @param event
342
+ *
343
+ * -1 (unstarted)
344
+ * 0 (ended)
345
+ * 1 (playing)
346
+ * 2 (paused)
347
+ * 3 (buffering)
348
+ * 5 (video cued).
349
+ *
350
+ *
351
+ */
352
+ 'onStateChange': function( event ) {
353
+ if( typeof event.target.getPlayerState != "function" ) return;
354
+ var state = event.target.getPlayerState();
355
+ if( YTPlayer.state == state ) return;
356
+ YTPlayer.state = state;
357
+ var eventType;
358
+ switch( state ) {
359
+ case -1: //------------------------------------------------ unstarted
360
+ eventType = "YTPUnstarted";
361
+ break;
362
+ case 0: //------------------------------------------------ ended
363
+ eventType = "YTPEnd";
364
+ break;
365
+ case 1: //------------------------------------------------ play
366
+ eventType = "YTPStart";
367
+ if( YTPlayer.controlBar ) YTPlayer.controlBar.find( ".mb_YTPPlaypause" ).html( jQuery.mbYTPlayer.controls.pause );
368
+ if( typeof _gaq != "undefined" && eval( YTPlayer.opt.gaTrack ) ) _gaq.push( [ '_trackEvent', 'YTPlayer', 'Play', ( YTPlayer.hasData ? YTPlayer.videoData.title : YTPlayer.videoID.toString() ) ] );
369
+ if( typeof ga != "undefined" && eval( YTPlayer.opt.gaTrack ) ) ga( 'send', 'event', 'YTPlayer', 'play', ( YTPlayer.hasData ? YTPlayer.videoData.title : YTPlayer.videoID.toString() ) );
370
+ break;
371
+ case 2: //------------------------------------------------ pause
372
+ eventType = "YTPPause";
373
+ if( YTPlayer.controlBar ) YTPlayer.controlBar.find( ".mb_YTPPlaypause" ).html( jQuery.mbYTPlayer.controls.play );
374
+ break;
375
+ case 3: //------------------------------------------------ buffer
376
+ YTPlayer.player.setPlaybackQuality( YTPlayer.opt.quality );
377
+ eventType = "YTPBuffering";
378
+ if( YTPlayer.controlBar ) YTPlayer.controlBar.find( ".mb_YTPPlaypause" ).html( jQuery.mbYTPlayer.controls.play );
379
+ break;
380
+ case 5: //------------------------------------------------ cued
381
+ eventType = "YTPCued";
382
+ break;
383
+ default:
384
+ break;
385
+ }
386
+ // Trigger state events
387
+ var YTPEvent = jQuery.Event( eventType );
388
+ YTPEvent.time = YTPlayer.player.time;
389
+ if( YTPlayer.canTrigger ) jQuery( YTPlayer ).trigger( YTPEvent );
390
+ },
391
+ /**
392
+ *
393
+ * @param e
394
+ */
395
+ 'onPlaybackQualityChange': function( e ) {
396
+ var quality = e.target.getPlaybackQuality();
397
+ var YTPQualityChange = jQuery.Event( "YTPQualityChange" );
398
+ YTPQualityChange.quality = quality;
399
+ jQuery( YTPlayer ).trigger( YTPQualityChange );
400
+ },
401
+ /**
402
+ *
403
+ * @param err
404
+ */
405
+ 'onError': function( err ) {
406
+ if( err.data == 150 ) {
407
+ console.log( "Embedding this video is restricted by Youtube." );
408
+ if( YTPlayer.isPlayList ) jQuery( YTPlayer ).playNext();
409
+ }
410
+ if( err.data == 2 && YTPlayer.isPlayList ) jQuery( YTPlayer ).playNext();
411
+ if( typeof YTPlayer.opt.onError == "function" ) YTPlayer.opt.onError( $YTPlayer, err );
412
+ }
413
+ }
414
+ } );
415
+ } );
416
+ } )
417
+ } );
418
+ },
419
+ /**
420
+ *
421
+ * @param YTPlayer
422
+ */
423
+ getDataFromAPI: function( YTPlayer ) {
424
+ YTPlayer.videoData = jQuery.mbStorage.get( "YTPlayer_data_" + YTPlayer.videoID );
425
+ jQuery( YTPlayer ).off( "YTPData.YTPlayer" ).on( "YTPData.YTPlayer", function() {
426
+ if( YTPlayer.hasData ) {
427
+
428
+ if( YTPlayer.isPlayer && !YTPlayer.opt.autoPlay ) {
429
+ var bgndURL = YTPlayer.videoData.thumb_max || YTPlayer.videoData.thumb_high || YTPlayer.videoData.thumb_medium;
430
+ YTPlayer.opt.containment.css( {
431
+ background: "rgba(0,0,0,0.5) url(" + bgndURL + ") center center",
432
+ backgroundSize: "cover"
433
+ } );
434
+ YTPlayer.opt.backgroundUrl = bgndURL;
435
+ }
436
+ }
437
+ } );
438
+
439
+ if( YTPlayer.videoData ) {
440
+
441
+ setTimeout( function() {
442
+ YTPlayer.opt.ratio = YTPlayer.opt.ratio == "auto" ? "16/9" : YTPlayer.opt.ratio;
443
+ YTPlayer.dataReceived = true;
444
+ jQuery( YTPlayer ).trigger( "YTPChanged" );
445
+ var YTPData = jQuery.Event( "YTPData" );
446
+ YTPData.prop = {};
447
+ for( var x in YTPlayer.videoData ) YTPData.prop[ x ] = YTPlayer.videoData[ x ];
448
+ jQuery( YTPlayer ).trigger( YTPData );
449
+ }, 500 );
450
+
451
+ YTPlayer.hasData = true;
452
+ } else if( jQuery.mbYTPlayer.apiKey ) {
453
+ // Get video info from API3 (needs api key)
454
+ // snippet,player,contentDetails,statistics,status
455
+ jQuery.getJSON( jQuery.mbYTPlayer.locationProtocol + "//www.googleapis.com/youtube/v3/videos?id=" + YTPlayer.videoID + "&key=" + jQuery.mbYTPlayer.apiKey + "&part=snippet", function( data ) {
456
+ YTPlayer.dataReceived = true;
457
+ jQuery( YTPlayer ).trigger( "YTPChanged" );
458
+
459
+ function parseYTPlayer_data( data ) {
460
+ YTPlayer.videoData = {};
461
+ YTPlayer.videoData.id = YTPlayer.videoID;
462
+ YTPlayer.videoData.channelTitle = data.channelTitle;
463
+ YTPlayer.videoData.title = data.title;
464
+ YTPlayer.videoData.description = data.description.length < 400 ? data.description : data.description.substring( 0, 400 ) + " ...";
465
+ YTPlayer.videoData.aspectratio = YTPlayer.opt.ratio == "auto" ? "16/9" : YTPlayer.opt.ratio;
466
+ YTPlayer.opt.ratio = YTPlayer.videoData.aspectratio;
467
+ YTPlayer.videoData.thumb_max = data.thumbnails.maxres ? data.thumbnails.maxres.url : null;
468
+ YTPlayer.videoData.thumb_high = data.thumbnails.high ? data.thumbnails.high.url : null;
469
+ YTPlayer.videoData.thumb_medium = data.thumbnails.medium ? data.thumbnails.medium.url : null;
470
+ jQuery.mbStorage.set( "YTPlayer_data_" + YTPlayer.videoID, YTPlayer.videoData );
471
+ }
472
+ parseYTPlayer_data( data.items[ 0 ].snippet );
473
+ YTPlayer.hasData = true;
474
+ var YTPData = jQuery.Event( "YTPData" );
475
+ YTPData.prop = {};
476
+ for( var x in YTPlayer.videoData ) YTPData.prop[ x ] = YTPlayer.videoData[ x ];
477
+ jQuery( YTPlayer ).trigger( YTPData );
478
+ } );
479
+ } else {
480
+ setTimeout( function() {
481
+ jQuery( YTPlayer ).trigger( "YTPChanged" );
482
+ }, 50 );
483
+ if( YTPlayer.isPlayer && !YTPlayer.opt.autoPlay ) {
484
+ var bgndURL = jQuery.mbYTPlayer.locationProtocol + "//i.ytimg.com/vi/" + YTPlayer.videoID + "/hqdefault.jpg";
485
+ YTPlayer.opt.containment.css( {
486
+ background: "rgba(0,0,0,0.5) url(" + bgndURL + ") center center",
487
+ backgroundSize: "cover"
488
+ } );
489
+ YTPlayer.opt.backgroundUrl = bgndURL;
490
+ }
491
+ YTPlayer.videoData = null;
492
+ YTPlayer.opt.ratio = YTPlayer.opt.ratio == "auto" ? "16/9" : YTPlayer.opt.ratio;
493
+ }
494
+ if( YTPlayer.isPlayer && !YTPlayer.opt.autoPlay ) {
495
+ YTPlayer.loading = jQuery( "<div/>" ).addClass( "loading" ).html( "Loading" ).hide();
496
+ jQuery( YTPlayer ).append( YTPlayer.loading );
497
+ YTPlayer.loading.fadeIn();
498
+ }
499
+ },
500
+ /**
501
+ *
502
+ */
503
+ removeStoredData: function() {
504
+ jQuery.mbStorage.remove();
505
+ },
506
+ /**
507
+ *
508
+ * @returns {*|YTPlayer.videoData}
509
+ */
510
+ getVideoData: function() {
511
+ var YTPlayer = this.get( 0 );
512
+ return YTPlayer.videoData;
513
+ },
514
+ /**
515
+ *
516
+ * @returns {*|YTPlayer.videoID|boolean}
517
+ */
518
+ getVideoID: function() {
519
+ var YTPlayer = this.get( 0 );
520
+ return YTPlayer.videoID || false;
521
+ },
522
+ /**
523
+ *
524
+ * @param quality
525
+ */
526
+ setVideoQuality: function( quality ) {
527
+ var YTPlayer = this.get( 0 );
528
+ if( !jQuery.browser.chrome ) YTPlayer.player.setPlaybackQuality( quality );
529
+ },
530
+ /**
531
+ * @param videos
532
+ * @param shuffle
533
+ * @param callback
534
+ * @returns {jQuery.mbYTPlayer}
535
+ */
536
+ playlist: function( videos, shuffle, callback ) {
537
+ var $YTPlayer = this;
538
+ var YTPlayer = $YTPlayer.get( 0 );
539
+ YTPlayer.isPlayList = true;
540
+ if( shuffle ) videos = jQuery.shuffle( videos );
541
+ if( !YTPlayer.videoID ) {
542
+ YTPlayer.videos = videos;
543
+ YTPlayer.videoCounter = 0;
544
+ YTPlayer.videoLength = videos.length;
545
+ jQuery( YTPlayer ).data( "property", videos[ 0 ] );
546
+ jQuery( YTPlayer ).mb_YTPlayer();
547
+ }
548
+ if( typeof callback == "function" ) jQuery( YTPlayer ).one( "YTPChanged", function() {
549
+ callback( YTPlayer );
550
+ } );
551
+ jQuery( YTPlayer ).on( "YTPEnd", function() {
552
+ jQuery( YTPlayer ).playNext();
553
+ } );
554
+ return $YTPlayer;
555
+ },
556
+ /**
557
+ *
558
+ * @returns {jQuery.mbYTPlayer}
559
+ */
560
+ playNext: function() {
561
+ var YTPlayer = this.get( 0 );
562
+ YTPlayer.videoCounter++;
563
+ if( YTPlayer.videoCounter >= YTPlayer.videoLength ) YTPlayer.videoCounter = 0;
564
+ jQuery( YTPlayer ).changeMovie( YTPlayer.videos[ YTPlayer.videoCounter ] );
565
+ return this;
566
+ },
567
+ /**
568
+ *
569
+ * @returns {jQuery.mbYTPlayer}
570
+ */
571
+ playPrev: function() {
572
+ var YTPlayer = this.get( 0 );
573
+ YTPlayer.videoCounter--;
574
+ if( YTPlayer.videoCounter < 0 ) YTPlayer.videoCounter = YTPlayer.videoLength - 1;
575
+ jQuery( YTPlayer ).changeMovie( YTPlayer.videos[ YTPlayer.videoCounter ] );
576
+ return this;
577
+ },
578
+ /**
579
+ *
580
+ * @param opt
581
+ */
582
+ changeMovie: function( opt ) {
583
+ var YTPlayer = this.get( 0 );
584
+ YTPlayer.opt.startAt = 0;
585
+ YTPlayer.opt.stopAt = 0;
586
+ YTPlayer.opt.mute = true;
587
+ YTPlayer.hasData = false;
588
+ YTPlayer.hasChanged = true;
589
+ if( opt ) jQuery.extend( YTPlayer.opt, YTPlayer.defaultOpt, opt );
590
+ YTPlayer.videoID = getYTPVideoID( YTPlayer.opt.videoURL ).videoID;
591
+ jQuery( YTPlayer.playerEl ).CSSAnimate( {
592
+ opacity: 0
593
+ }, 200, function() {
594
+ jQuery( YTPlayer ).YTPGetPlayer().cueVideoByUrl( encodeURI( jQuery.mbYTPlayer.locationProtocol + "//www.youtube.com/v/" + YTPlayer.videoID ), 1, YTPlayer.opt.quality );
595
+ jQuery.mbYTPlayer.checkForState( YTPlayer );
596
+ jQuery( YTPlayer ).optimizeDisplay();
597
+ jQuery.mbYTPlayer.getDataFromAPI( YTPlayer );
598
+ return this;
599
+ } );
600
+ },
601
+ /**
602
+ *
603
+ * @returns {player}
604
+ */
605
+ getPlayer: function() {
606
+ return jQuery( this ).get( 0 ).player;
607
+ },
608
+ playerDestroy: function() {
609
+ var YTPlayer = this.get( 0 );
610
+ ytp.YTAPIReady = false;
611
+ ytp.backgroundIsInited = false;
612
+ YTPlayer.isInit = false;
613
+ YTPlayer.videoID = null;
614
+ var playerBox = YTPlayer.wrapper;
615
+ playerBox.remove();
616
+ jQuery( "#controlBar_" + YTPlayer.id ).remove();
617
+ clearInterval( YTPlayer.checkForStartAt );
618
+ clearInterval( YTPlayer.getState );
619
+ return this;
620
+ },
621
+ /**
622
+ *
623
+ * @param real
624
+ * @returns {jQuery.mbYTPlayer}
625
+ */
626
+ fullscreen: function( real ) {
627
+ var YTPlayer = this.get( 0 );
628
+ if( typeof real == "undefined" ) real = YTPlayer.opt.realfullscreen;
629
+ real = eval( real );
630
+ var controls = jQuery( "#controlBar_" + YTPlayer.id );
631
+ var fullScreenBtn = controls.find( ".mb_OnlyYT" );
632
+ var videoWrapper = YTPlayer.isSelf ? YTPlayer.opt.containment : YTPlayer.wrapper;
633
+ //var videoWrapper = YTPlayer.wrapper;
634
+ if( real ) {
635
+ var fullscreenchange = jQuery.browser.mozilla ? "mozfullscreenchange" : jQuery.browser.webkit ? "webkitfullscreenchange" : "fullscreenchange";
636
+ jQuery( document ).off( fullscreenchange ).on( fullscreenchange, function() {
637
+ var isFullScreen = RunPrefixMethod( document, "IsFullScreen" ) || RunPrefixMethod( document, "FullScreen" );
638
+ if( !isFullScreen ) {
639
+ YTPlayer.isAlone = false;
640
+ fullScreenBtn.html( jQuery.mbYTPlayer.controls.onlyYT );
641
+ jQuery( YTPlayer ).YTPSetVideoQuality( YTPlayer.opt.quality );
642
+ videoWrapper.removeClass( "fullscreen" );
643
+ videoWrapper.CSSAnimate( {
644
+ opacity: YTPlayer.opt.opacity
645
+ }, 500 );
646
+ videoWrapper.css( {
647
+ zIndex: 0
648
+ } );
649
+ if( YTPlayer.isBackground ) {
650
+ jQuery( "body" ).after( controls );
651
+ } else {
652
+ YTPlayer.wrapper.before( controls );
653
+ }
654
+ jQuery( window ).resize();
655
+ jQuery( YTPlayer ).trigger( "YTPFullScreenEnd" );
656
+ } else {
657
+ jQuery( YTPlayer ).YTPSetVideoQuality( "default" );
658
+ jQuery( YTPlayer ).trigger( "YTPFullScreenStart" );
659
+ }
660
+ } );
661
+ }
662
+ if( !YTPlayer.isAlone ) {
663
+ function hideMouse() {
664
+ YTPlayer.overlay.css( {
665
+ cursor: "none"
666
+ } );
667
+ }
668
+ jQuery( document ).on( "mousemove.YTPlayer", function( e ) {
669
+ YTPlayer.overlay.css( {
670
+ cursor: "auto"
671
+ } );
672
+ clearTimeout( YTPlayer.hideCursor );
673
+ if( !jQuery( e.target ).parents().is( ".mb_YTPBar" ) ) YTPlayer.hideCursor = setTimeout( hideMouse, 3000 );
674
+ } );
675
+ hideMouse();
676
+ if( real ) {
677
+ videoWrapper.css( {
678
+ opacity: 0
679
+ } );
680
+ videoWrapper.addClass( "fullscreen" );
681
+ launchFullscreen( videoWrapper.get( 0 ) );
682
+ setTimeout( function() {
683
+ videoWrapper.CSSAnimate( {
684
+ opacity: 1
685
+ }, 1000 );
686
+ YTPlayer.wrapper.append( controls );
687
+ jQuery( YTPlayer ).optimizeDisplay();
688
+ YTPlayer.player.seekTo( YTPlayer.player.getCurrentTime() + .1, true );
689
+ }, 500 )
690
+ } else videoWrapper.css( {
691
+ zIndex: 10000
692
+ } ).CSSAnimate( {
693
+ opacity: 1
694
+ }, 1000 );
695
+ fullScreenBtn.html( jQuery.mbYTPlayer.controls.showSite );
696
+ YTPlayer.isAlone = true;
697
+ } else {
698
+ jQuery( document ).off( "mousemove.YTPlayer" );
699
+ YTPlayer.overlay.css( {
700
+ cursor: "auto"
701
+ } );
702
+ if( real ) {
703
+ cancelFullscreen();
704
+ } else {
705
+ videoWrapper.CSSAnimate( {
706
+ opacity: YTPlayer.opt.opacity
707
+ }, 500 );
708
+ videoWrapper.css( {
709
+ zIndex: 0
710
+ } );
711
+ }
712
+ fullScreenBtn.html( jQuery.mbYTPlayer.controls.onlyYT );
713
+ YTPlayer.isAlone = false;
714
+ }
715
+
716
+ function RunPrefixMethod( obj, method ) {
717
+ var pfx = [ "webkit", "moz", "ms", "o", "" ];
718
+ var p = 0,
719
+ m, t;
720
+ while( p < pfx.length && !obj[ m ] ) {
721
+ m = method;
722
+ if( pfx[ p ] == "" ) {
723
+ m = m.substr( 0, 1 ).toLowerCase() + m.substr( 1 );
724
+ }
725
+ m = pfx[ p ] + m;
726
+ t = typeof obj[ m ];
727
+ if( t != "undefined" ) {
728
+ pfx = [ pfx[ p ] ];
729
+ return( t == "function" ? obj[ m ]() : obj[ m ] );
730
+ }
731
+ p++;
732
+ }
733
+ }
734
+
735
+ function launchFullscreen( element ) {
736
+ RunPrefixMethod( element, "RequestFullScreen" );
737
+ }
738
+
739
+ function cancelFullscreen() {
740
+ if( RunPrefixMethod( document, "FullScreen" ) || RunPrefixMethod( document, "IsFullScreen" ) ) {
741
+ RunPrefixMethod( document, "CancelFullScreen" );
742
+ }
743
+ }
744
+ return this;
745
+ },
746
+ /**
747
+ *
748
+ * @returns {jQuery.mbYTPlayer}
749
+ */
750
+ toggleLoops: function() {
751
+ var YTPlayer = this.get( 0 );
752
+ var data = YTPlayer.opt;
753
+ if( data.loop == 1 ) {
754
+ data.loop = 0;
755
+ } else {
756
+ if( data.startAt ) {
757
+ YTPlayer.player.seekTo( data.startAt );
758
+ } else {
759
+ YTPlayer.player.playVideo();
760
+ }
761
+ data.loop = 1;
762
+ }
763
+ return this;
764
+ },
765
+ /**
766
+ *
767
+ * @returns {jQuery.mbYTPlayer}
768
+ */
769
+ play: function() {
770
+ var YTPlayer = this.get( 0 );
771
+ if( !YTPlayer.isReady ) return;
772
+ var controls = jQuery( "#controlBar_" + YTPlayer.id );
773
+ var playBtn = controls.find( ".mb_YTPPlaypause" );
774
+ playBtn.html( jQuery.mbYTPlayer.controls.pause );
775
+ YTPlayer.player.playVideo();
776
+ YTPlayer.wrapper.CSSAnimate( {
777
+ opacity: YTPlayer.isAlone ? 1 : YTPlayer.opt.opacity
778
+ }, 2000 );
779
+ jQuery( YTPlayer.playerEl ).CSSAnimate( {
780
+ opacity: 1
781
+ }, 1000 );
782
+ jQuery( YTPlayer ).css( "background-image", "none" );
783
+ return this;
784
+ },
785
+ /**
786
+ *
787
+ * @param callback
788
+ * @returns {jQuery.mbYTPlayer}
789
+ */
790
+ togglePlay: function( callback ) {
791
+ var YTPlayer = this.get( 0 );
792
+ if( YTPlayer.state == 1 ) this.YTPPause();
793
+ else this.YTPPlay();
794
+ if( typeof callback == "function" ) {
795
+ callback( YTPlayer.state );
796
+ }
797
+ return this;
798
+ },
799
+ /**
800
+ *
801
+ * @returns {jQuery.mbYTPlayer}
802
+ */
803
+ stop: function() {
804
+ var YTPlayer = this.get( 0 );
805
+ var controls = jQuery( "#controlBar_" + YTPlayer.id );
806
+ var playBtn = controls.find( ".mb_YTPPlaypause" );
807
+ playBtn.html( jQuery.mbYTPlayer.controls.play );
808
+ YTPlayer.player.stopVideo();
809
+ return this;
810
+ },
811
+ /**
812
+ *
813
+ * @returns {jQuery.mbYTPlayer}
814
+ */
815
+ pause: function() {
816
+ var YTPlayer = this.get( 0 );
817
+ var controls = jQuery( "#controlBar_" + YTPlayer.id );
818
+ var playBtn = controls.find( ".mb_YTPPlaypause" );
819
+ playBtn.html( jQuery.mbYTPlayer.controls.play );
820
+ YTPlayer.player.pauseVideo();
821
+ return this;
822
+ },
823
+ /**
824
+ *
825
+ * @param val
826
+ * @returns {jQuery.mbYTPlayer}
827
+ */
828
+ seekTo: function( val ) {
829
+ var YTPlayer = this.get( 0 );
830
+ YTPlayer.player.seekTo( val, true );
831
+ return this;
832
+ },
833
+ /**
834
+ *
835
+ * @param val
836
+ * @returns {jQuery.mbYTPlayer}
837
+ */
838
+ setVolume: function( val ) {
839
+ var YTPlayer = this.get( 0 );
840
+ if( !val && !YTPlayer.opt.vol && YTPlayer.player.getVolume() == 0 ) jQuery( YTPlayer ).YTPUnmute();
841
+ else if( ( !val && YTPlayer.player.getVolume() > 0 ) || ( val && YTPlayer.opt.vol == val ) ) {
842
+ if( !YTPlayer.isMute ) jQuery( YTPlayer ).YTPMute();
843
+ else jQuery( YTPlayer ).YTPUnmute();
844
+ } else {
845
+ YTPlayer.opt.vol = val;
846
+ YTPlayer.player.setVolume( YTPlayer.opt.vol );
847
+ if( YTPlayer.volumeBar && YTPlayer.volumeBar.length ) YTPlayer.volumeBar.updateSliderVal( val )
848
+ }
849
+ return this;
850
+ },
851
+ /**
852
+ *
853
+ * @returns {jQuery.mbYTPlayer}
854
+ */
855
+ mute: function() {
856
+ var YTPlayer = this.get( 0 );
857
+ if( YTPlayer.isMute ) return;
858
+ YTPlayer.player.mute();
859
+ YTPlayer.isMute = true;
860
+ YTPlayer.player.setVolume( 0 );
861
+ if( YTPlayer.volumeBar && YTPlayer.volumeBar.length && YTPlayer.volumeBar.width() > 10 ) {
862
+ YTPlayer.volumeBar.updateSliderVal( 0 );
863
+ }
864
+ var controls = jQuery( "#controlBar_" + YTPlayer.id );
865
+ var muteBtn = controls.find( ".mb_YTPMuteUnmute" );
866
+ muteBtn.html( jQuery.mbYTPlayer.controls.unmute );
867
+ jQuery( YTPlayer ).addClass( "isMuted" );
868
+ if( YTPlayer.volumeBar && YTPlayer.volumeBar.length ) YTPlayer.volumeBar.addClass( "muted" );
869
+ var YTPEvent = jQuery.Event( "YTPMuted" );
870
+ YTPEvent.time = YTPlayer.player.time;
871
+ if( YTPlayer.canTrigger ) jQuery( YTPlayer ).trigger( YTPEvent );
872
+ return this;
873
+ },
874
+ /**
875
+ *
876
+ * @returns {jQuery.mbYTPlayer}
877
+ */
878
+ unmute: function() {
879
+ var YTPlayer = this.get( 0 );
880
+ if( !YTPlayer.isMute ) return;
881
+ YTPlayer.player.unMute();
882
+ YTPlayer.isMute = false;
883
+ YTPlayer.player.setVolume( YTPlayer.opt.vol );
884
+ if( YTPlayer.volumeBar && YTPlayer.volumeBar.length ) YTPlayer.volumeBar.updateSliderVal( YTPlayer.opt.vol > 10 ? YTPlayer.opt.vol : 10 );
885
+ var controls = jQuery( "#controlBar_" + YTPlayer.id );
886
+ var muteBtn = controls.find( ".mb_YTPMuteUnmute" );
887
+ muteBtn.html( jQuery.mbYTPlayer.controls.mute );
888
+ jQuery( YTPlayer ).removeClass( "isMuted" );
889
+ if( YTPlayer.volumeBar && YTPlayer.volumeBar.length ) YTPlayer.volumeBar.removeClass( "muted" );
890
+ var YTPEvent = jQuery.Event( "YTPUnmuted" );
891
+ YTPEvent.time = YTPlayer.player.time;
892
+ if( YTPlayer.canTrigger ) jQuery( YTPlayer ).trigger( YTPEvent );
893
+ return this;
894
+ },
895
+ /**
896
+ *
897
+ * @param filter
898
+ * @param value
899
+ * @returns {jQuery.mbYTPlayer}
900
+ */
901
+ applyFilter: function( filter, value ) {
902
+ var YTPlayer = this.get( 0 );
903
+ YTPlayer.filters[ filter ].value = value;
904
+ if( YTPlayer.filtersEnabled ) this.YTPEnableFilters();
905
+ return this;
906
+ },
907
+ /**
908
+ *
909
+ * @param filters
910
+ * @returns {jQuery.mbYTPlayer}
911
+ */
912
+ applyFilters: function( filters ) {
913
+ var YTPlayer = this.get( 0 );
914
+ this.on( "YTPReady", function() {
915
+ for( var key in filters ) {
916
+ YTPlayer.filters[ key ].value = filters[ key ];
917
+ jQuery( YTPlayer ).YTPApplyFilter( key, filters[ key ] );
918
+ }
919
+ jQuery( YTPlayer ).trigger( "YTPFiltersApplied" );
920
+ } );
921
+ return this;
922
+ },
923
+ /**
924
+ *
925
+ * @param filter
926
+ * @param value
927
+ * @returns {*}
928
+ */
929
+ toggleFilter: function( filter, value ) {
930
+ return this.each( function() {
931
+ var YTPlayer = this;
932
+ if( !YTPlayer.filters[ filter ].value ) YTPlayer.filters[ filter ].value = value;
933
+ else YTPlayer.filters[ filter ].value = 0;
934
+ if( YTPlayer.filtersEnabled ) jQuery( this ).YTPEnableFilters();
935
+ } )
936
+ return this;
937
+ },
938
+ /**
939
+ *
940
+ * @param callback
941
+ * @returns {*}
942
+ */
943
+ toggleFilters: function( callback ) {
944
+ return this.each( function() {
945
+ var YTPlayer = this;
946
+ if( YTPlayer.filtersEnabled ) {
947
+ jQuery( YTPlayer ).trigger( "YTPDisableFilters" );
948
+ jQuery( YTPlayer ).YTPDisableFilters();
949
+ } else {
950
+ jQuery( YTPlayer ).YTPEnableFilters();
951
+ jQuery( YTPlayer ).trigger( "YTPEnableFilters" );
952
+ }
953
+ if( typeof callback == "function" ) callback( YTPlayer.filtersEnabled );
954
+ } )
955
+ },
956
+ /**
957
+ *
958
+ * @returns {*}
959
+ */
960
+ disableFilters: function() {
961
+ return this.each( function() {
962
+ var YTPlayer = this;
963
+ var iframe = jQuery( YTPlayer.playerEl );
964
+ iframe.css( "-webkit-filter", "" );
965
+ iframe.css( "filter", "" );
966
+ YTPlayer.filtersEnabled = false;
967
+ } )
968
+ },
969
+ /**
970
+ *
971
+ * @returns {*}
972
+ */
973
+ enableFilters: function() {
974
+ return this.each( function() {
975
+ var YTPlayer = this;
976
+ var iframe = jQuery( YTPlayer.playerEl );
977
+ var filterStyle = "";
978
+ for( var key in YTPlayer.filters ) {
979
+ if( YTPlayer.filters[ key ].value ) filterStyle += key.replace( "_", "-" ) + "(" + YTPlayer.filters[ key ].value + YTPlayer.filters[ key ].unit + ") ";
980
+ }
981
+ iframe.css( "-webkit-filter", filterStyle );
982
+ iframe.css( "filter", filterStyle );
983
+ YTPlayer.filtersEnabled = true;
984
+ } )
985
+ return this;
986
+ },
987
+ /**
988
+ *
989
+ * @param filter
990
+ * @param callback
991
+ * @returns {*}
992
+ */
993
+ removeFilter: function( filter, callback ) {
994
+ return this.each( function() {
995
+ if( typeof filter == "function" ) {
996
+ callback = filter;
997
+ filter = null;
998
+ }
999
+ var YTPlayer = this;
1000
+ if( !filter )
1001
+ for( var key in YTPlayer.filters ) {
1002
+ jQuery( this ).YTPApplyFilter( key, 0 );
1003
+ if( typeof callback == "function" ) callback( key );
1004
+ } else {
1005
+ jQuery( this ).YTPApplyFilter( filter, 0 );
1006
+ if( typeof callback == "function" ) callback( filter );
1007
+ }
1008
+ } );
1009
+ return this;
1010
+ },
1011
+ /**
1012
+ *
1013
+ * @returns {{totalTime: number, currentTime: number}}
1014
+ */
1015
+ manageProgress: function() {
1016
+ var YTPlayer = this.get( 0 );
1017
+ var controls = jQuery( "#controlBar_" + YTPlayer.id );
1018
+ var progressBar = controls.find( ".mb_YTPProgress" );
1019
+ var loadedBar = controls.find( ".mb_YTPLoaded" );
1020
+ var timeBar = controls.find( ".mb_YTPseekbar" );
1021
+ var totW = progressBar.outerWidth();
1022
+ var currentTime = Math.floor( YTPlayer.player.getCurrentTime() );
1023
+ var totalTime = Math.floor( YTPlayer.player.getDuration() );
1024
+ var timeW = ( currentTime * totW ) / totalTime;
1025
+ var startLeft = 0;
1026
+ var loadedW = YTPlayer.player.getVideoLoadedFraction() * 100;
1027
+ loadedBar.css( {
1028
+ left: startLeft,
1029
+ width: loadedW + "%"
1030
+ } );
1031
+ timeBar.css( {
1032
+ left: 0,
1033
+ width: timeW
1034
+ } );
1035
+ return {
1036
+ totalTime: totalTime,
1037
+ currentTime: currentTime
1038
+ };
1039
+ },
1040
+ /**
1041
+ *
1042
+ * @param YTPlayer
1043
+ */
1044
+ buildControls: function( YTPlayer ) {
1045
+ var data = YTPlayer.opt;
1046
+ // @data.printUrl: is deprecated; use data.showYTLogo
1047
+ data.showYTLogo = data.showYTLogo || data.printUrl;
1048
+ if( jQuery( "#controlBar_" + YTPlayer.id ).length ) return;
1049
+ YTPlayer.controlBar = jQuery( "<span/>" ).attr( "id", "controlBar_" + YTPlayer.id ).addClass( "mb_YTPBar" ).css( {
1050
+ whiteSpace: "noWrap",
1051
+ position: YTPlayer.isBackground ? "fixed" : "absolute",
1052
+ zIndex: YTPlayer.isBackground ? 10000 : 1000
1053
+ } ).hide();
1054
+ var buttonBar = jQuery( "<div/>" ).addClass( "buttonBar" );
1055
+ /* play/pause button*/
1056
+ var playpause = jQuery( "<span>" + jQuery.mbYTPlayer.controls.play + "</span>" ).addClass( "mb_YTPPlaypause ytpicon" ).click( function() {
1057
+ if( YTPlayer.player.getPlayerState() == 1 ) jQuery( YTPlayer ).YTPPause();
1058
+ else jQuery( YTPlayer ).YTPPlay();
1059
+ } );
1060
+ /* mute/unmute button*/
1061
+ var MuteUnmute = jQuery( "<span>" + jQuery.mbYTPlayer.controls.mute + "</span>" ).addClass( "mb_YTPMuteUnmute ytpicon" ).click( function() {
1062
+ if( YTPlayer.player.getVolume() == 0 ) {
1063
+ jQuery( YTPlayer ).YTPUnmute();
1064
+ } else {
1065
+ jQuery( YTPlayer ).YTPMute();
1066
+ }
1067
+ } );
1068
+ /* volume bar*/
1069
+ var volumeBar = jQuery( "<div/>" ).addClass( "mb_YTPVolumeBar" ).css( {
1070
+ display: "inline-block"
1071
+ } );
1072
+ YTPlayer.volumeBar = volumeBar;
1073
+ /* time elapsed */
1074
+ var idx = jQuery( "<span/>" ).addClass( "mb_YTPTime" );
1075
+ var vURL = data.videoURL ? data.videoURL : "";
1076
+ if( vURL.indexOf( "http" ) < 0 ) vURL = jQuery.mbYTPlayer.locationProtocol + "//www.youtube.com/watch?v=" + data.videoURL;
1077
+ var movieUrl = jQuery( "<span/>" ).html( jQuery.mbYTPlayer.controls.ytLogo ).addClass( "mb_YTPUrl ytpicon" ).attr( "title", "view on YouTube" ).on( "click", function() {
1078
+ window.open( vURL, "viewOnYT" )
1079
+ } );
1080
+ var onlyVideo = jQuery( "<span/>" ).html( jQuery.mbYTPlayer.controls.onlyYT ).addClass( "mb_OnlyYT ytpicon" ).on( "click", function() {
1081
+ jQuery( YTPlayer ).YTPFullscreen( data.realfullscreen );
1082
+ } );
1083
+ var progressBar = jQuery( "<div/>" ).addClass( "mb_YTPProgress" ).css( "position", "absolute" ).click( function( e ) {
1084
+ timeBar.css( {
1085
+ width: ( e.clientX - timeBar.offset().left )
1086
+ } );
1087
+ YTPlayer.timeW = e.clientX - timeBar.offset().left;
1088
+ YTPlayer.controlBar.find( ".mb_YTPLoaded" ).css( {
1089
+ width: 0
1090
+ } );
1091
+ var totalTime = Math.floor( YTPlayer.player.getDuration() );
1092
+ YTPlayer.goto = ( timeBar.outerWidth() * totalTime ) / progressBar.outerWidth();
1093
+ YTPlayer.player.seekTo( parseFloat( YTPlayer.goto ), true );
1094
+ YTPlayer.controlBar.find( ".mb_YTPLoaded" ).css( {
1095
+ width: 0
1096
+ } );
1097
+ } );
1098
+ var loadedBar = jQuery( "<div/>" ).addClass( "mb_YTPLoaded" ).css( "position", "absolute" );
1099
+ var timeBar = jQuery( "<div/>" ).addClass( "mb_YTPseekbar" ).css( "position", "absolute" );
1100
+ progressBar.append( loadedBar ).append( timeBar );
1101
+ buttonBar.append( playpause ).append( MuteUnmute ).append( volumeBar ).append( idx );
1102
+ if( data.showYTLogo ) {
1103
+ buttonBar.append( movieUrl );
1104
+ }
1105
+ if( YTPlayer.isBackground || ( eval( YTPlayer.opt.realfullscreen ) && !YTPlayer.isBackground ) ) buttonBar.append( onlyVideo );
1106
+ YTPlayer.controlBar.append( buttonBar ).append( progressBar );
1107
+ if( !YTPlayer.isBackground ) {
1108
+ YTPlayer.controlBar.addClass( "inlinePlayer" );
1109
+ YTPlayer.wrapper.before( YTPlayer.controlBar );
1110
+ } else {
1111
+ jQuery( "body" ).after( YTPlayer.controlBar );
1112
+ }
1113
+ volumeBar.simpleSlider( {
1114
+ initialval: YTPlayer.opt.vol,
1115
+ scale: 100,
1116
+ orientation: "h",
1117
+ callback: function( el ) {
1118
+ if( el.value == 0 ) {
1119
+ jQuery( YTPlayer ).YTPMute();
1120
+ } else {
1121
+ jQuery( YTPlayer ).YTPUnmute();
1122
+ }
1123
+ YTPlayer.player.setVolume( el.value );
1124
+ if( !YTPlayer.isMute ) YTPlayer.opt.vol = el.value;
1125
+ }
1126
+ } );
1127
+ },
1128
+ /**
1129
+ *
1130
+ *
1131
+ * */
1132
+ checkForState: function( YTPlayer ) {
1133
+ var interval = YTPlayer.opt.showControls ? 100 : 400;
1134
+ clearInterval( YTPlayer.getState );
1135
+ //Checking if player has been removed from scene
1136
+ if( !jQuery.contains( document, YTPlayer ) ) {
1137
+ jQuery( YTPlayer ).YTPPlayerDestroy();
1138
+ clearInterval( YTPlayer.getState );
1139
+ clearInterval( YTPlayer.checkForStartAt );
1140
+ return;
1141
+ }
1142
+ jQuery.mbYTPlayer.checkForStart( YTPlayer );
1143
+ YTPlayer.getState = setInterval( function() {
1144
+ var prog = jQuery( YTPlayer ).YTPManageProgress();
1145
+ var $YTPlayer = jQuery( YTPlayer );
1146
+ var data = YTPlayer.opt;
1147
+ var startAt = YTPlayer.opt.startAt ? YTPlayer.opt.startAt : 1;
1148
+ var stopAt = YTPlayer.opt.stopAt > YTPlayer.opt.startAt ? YTPlayer.opt.stopAt : 0;
1149
+ stopAt = stopAt < YTPlayer.player.getDuration() ? stopAt : 0;
1150
+ if( YTPlayer.player.time != prog.currentTime ) {
1151
+ var YTPEvent = jQuery.Event( "YTPTime" );
1152
+ YTPEvent.time = YTPlayer.player.time;
1153
+ jQuery( YTPlayer ).trigger( YTPEvent );
1154
+ }
1155
+ YTPlayer.player.time = prog.currentTime;
1156
+ if( YTPlayer.player.getVolume() == 0 ) $YTPlayer.addClass( "isMuted" );
1157
+ else $YTPlayer.removeClass( "isMuted" );
1158
+ if( YTPlayer.opt.showControls )
1159
+ if( prog.totalTime ) {
1160
+ YTPlayer.controlBar.find( ".mb_YTPTime" ).html( jQuery.mbYTPlayer.formatTime( prog.currentTime ) + " / " + jQuery.mbYTPlayer.formatTime( prog.totalTime ) );
1161
+ } else {
1162
+ YTPlayer.controlBar.find( ".mb_YTPTime" ).html( "-- : -- / -- : --" );
1163
+ }
1164
+ if( eval( YTPlayer.opt.stopMovieOnBlur ) )
1165
+ if( !document.hasFocus() ) {
1166
+ if( YTPlayer.state == 1 ) {
1167
+ YTPlayer.hasFocus = false;
1168
+ $YTPlayer.YTPPause();
1169
+ }
1170
+ } else if( document.hasFocus() && !YTPlayer.hasFocus && !( YTPlayer.state == -1 || YTPlayer.state == 0 ) ) {
1171
+ YTPlayer.hasFocus = true;
1172
+ $YTPlayer.YTPPlay();
1173
+ }
1174
+ if( YTPlayer.controlBar && YTPlayer.controlBar.outerWidth() <= 400 && !YTPlayer.isCompact ) {
1175
+ YTPlayer.controlBar.addClass( "compact" );
1176
+ YTPlayer.isCompact = true;
1177
+ if( !YTPlayer.isMute && YTPlayer.volumeBar ) YTPlayer.volumeBar.updateSliderVal( YTPlayer.opt.vol );
1178
+ } else if( YTPlayer.controlBar && YTPlayer.controlBar.outerWidth() > 400 && YTPlayer.isCompact ) {
1179
+ YTPlayer.controlBar.removeClass( "compact" );
1180
+ YTPlayer.isCompact = false;
1181
+ if( !YTPlayer.isMute && YTPlayer.volumeBar ) YTPlayer.volumeBar.updateSliderVal( YTPlayer.opt.vol );
1182
+ }
1183
+ if( YTPlayer.player.getPlayerState() == 1 && ( parseFloat( YTPlayer.player.getDuration() - 1.5 ) < YTPlayer.player.getCurrentTime() || ( stopAt > 0 && parseFloat( YTPlayer.player.getCurrentTime() ) > stopAt ) ) ) {
1184
+ if( YTPlayer.isEnded ) return;
1185
+ YTPlayer.isEnded = true;
1186
+ setTimeout( function() {
1187
+ YTPlayer.isEnded = false
1188
+ }, 1000 );
1189
+ if( YTPlayer.isPlayList ) {
1190
+ clearInterval( YTPlayer.getState );
1191
+ var YTPEnd = jQuery.Event( "YTPEnd" );
1192
+ YTPEnd.time = YTPlayer.player.time;
1193
+ jQuery( YTPlayer ).trigger( YTPEnd );
1194
+ return;
1195
+ } else if( !data.loop ) {
1196
+ YTPlayer.player.pauseVideo();
1197
+ YTPlayer.wrapper.CSSAnimate( {
1198
+ opacity: 0
1199
+ }, 1000, function() {
1200
+ var YTPEnd = jQuery.Event( "YTPEnd" );
1201
+ YTPEnd.time = YTPlayer.player.time;
1202
+ jQuery( YTPlayer ).trigger( YTPEnd );
1203
+ YTPlayer.player.seekTo( startAt, true );
1204
+ if( !YTPlayer.isBackground ) {
1205
+ YTPlayer.opt.containment.css( {
1206
+ background: "rgba(0,0,0,0.5) url(" + YTPlayer.opt.backgroundUrl + ") center center",
1207
+ backgroundSize: "cover"
1208
+ } );
1209
+ }
1210
+ } );
1211
+ } else {
1212
+
1213
+ startAt = startAt || 1;
1214
+
1215
+ YTPlayer.player.pauseVideo();
1216
+ YTPlayer.player.seekTo( startAt, true );
1217
+ $YTPlayer.YTPPlay();
1218
+
1219
+ }
1220
+ }
1221
+ }, interval );
1222
+ },
1223
+ /**
1224
+ *
1225
+ * */
1226
+ checkForStart: function( YTPlayer ) {
1227
+ var $YTPlayer = jQuery( YTPlayer );
1228
+ //Checking if player has been removed from scene
1229
+ if( !jQuery.contains( document, YTPlayer ) ) {
1230
+ jQuery( YTPlayer ).YTPPlayerDestroy();
1231
+ return
1232
+ }
1233
+ if( jQuery.browser.chrome ) YTPlayer.opt.quality = "default";
1234
+ YTPlayer.player.pauseVideo();
1235
+ jQuery( YTPlayer ).muteYTPVolume();
1236
+ jQuery( "#controlBar_" + YTPlayer.id ).remove();
1237
+ if( YTPlayer.opt.showControls ) jQuery.mbYTPlayer.buildControls( YTPlayer );
1238
+ if( YTPlayer.opt.addRaster ) {
1239
+ var classN = YTPlayer.opt.addRaster == "dot" ? "raster-dot" : "raster";
1240
+ YTPlayer.overlay.addClass( YTPlayer.isRetina ? classN + " retina" : classN );
1241
+ } else {
1242
+ YTPlayer.overlay.removeClass( function( index, classNames ) {
1243
+ // change the list into an array
1244
+ var current_classes = classNames.split( " " ),
1245
+ // array of classes which are to be removed
1246
+ classes_to_remove = [];
1247
+ jQuery.each( current_classes, function( index, class_name ) {
1248
+ // if the classname begins with bg add it to the classes_to_remove array
1249
+ if( /raster.*/.test( class_name ) ) {
1250
+ classes_to_remove.push( class_name );
1251
+ }
1252
+ } );
1253
+ classes_to_remove.push( "retina" );
1254
+ // turn the array back into a string
1255
+ return classes_to_remove.join( " " );
1256
+ } )
1257
+ }
1258
+ YTPlayer.checkForStartAt = setInterval( function() {
1259
+ jQuery( YTPlayer ).YTPMute();
1260
+ var startAt = YTPlayer.opt.startAt ? YTPlayer.opt.startAt : 1;
1261
+ var canPlayVideo = ( YTPlayer.player.getVideoLoadedFraction() > startAt / YTPlayer.player.getDuration() );
1262
+ if( YTPlayer.player.getDuration() > 0 && YTPlayer.player.getCurrentTime() >= startAt && canPlayVideo ) {
1263
+ clearInterval( YTPlayer.checkForStartAt );
1264
+ YTPlayer.isReady = true;
1265
+ if( typeof YTPlayer.opt.onReady == "function" ) YTPlayer.opt.onReady( YTPlayer );
1266
+ var YTPready = jQuery.Event( "YTPReady" );
1267
+ jQuery( YTPlayer ).trigger( YTPready );
1268
+ YTPlayer.player.pauseVideo();
1269
+ if( !YTPlayer.opt.mute ) jQuery( YTPlayer ).YTPUnmute();
1270
+ YTPlayer.canTrigger = true;
1271
+ if( YTPlayer.opt.autoPlay ) {
1272
+ $YTPlayer.YTPPlay();
1273
+ $YTPlayer.css( "background-image", "none" );
1274
+ jQuery( YTPlayer.playerEl ).CSSAnimate( {
1275
+ opacity: 1
1276
+ }, 1000 );
1277
+ YTPlayer.wrapper.CSSAnimate( {
1278
+ opacity: YTPlayer.isAlone ? 1 : YTPlayer.opt.opacity
1279
+ }, 1000 );
1280
+ } else {
1281
+ YTPlayer.player.pauseVideo();
1282
+ if( !YTPlayer.isPlayer ) {
1283
+ jQuery( YTPlayer.playerEl ).CSSAnimate( {
1284
+ opacity: 1
1285
+ }, 1000 );
1286
+ YTPlayer.wrapper.CSSAnimate( {
1287
+ opacity: YTPlayer.isAlone ? 1 : YTPlayer.opt.opacity
1288
+ }, 1000 );
1289
+ }
1290
+ }
1291
+ if( YTPlayer.isPlayer && !YTPlayer.opt.autoPlay ) {
1292
+ YTPlayer.loading.html( "Ready" );
1293
+ setTimeout( function() {
1294
+ YTPlayer.loading.fadeOut();
1295
+
1296
+
1297
+ }, 100 )
1298
+ }
1299
+ if( YTPlayer.controlBar ) YTPlayer.controlBar.slideDown( 1000 );
1300
+ } else {
1301
+ //YTPlayer.player.playVideo();
1302
+ if( startAt >= 0 ) YTPlayer.player.seekTo( startAt, true );
1303
+ }
1304
+ }, 1000 );
1305
+ },
1306
+ /**
1307
+ *
1308
+ * @param s
1309
+ * @returns {string}
1310
+ */
1311
+ formatTime: function( s ) {
1312
+ var min = Math.floor( s / 60 );
1313
+ var sec = Math.floor( s - ( 60 * min ) );
1314
+ return( min <= 9 ? "0" + min : min ) + " : " + ( sec <= 9 ? "0" + sec : sec );
1315
+ }
1316
+ };
1317
+ /**
1318
+ *
1319
+ * @returns {boolean}
1320
+ */
1321
+ jQuery.fn.toggleVolume = function() {
1322
+ var YTPlayer = this.get( 0 );
1323
+ if( !YTPlayer ) return;
1324
+ if( YTPlayer.player.isMuted() ) {
1325
+ jQuery( YTPlayer ).YTPUnmute();
1326
+ return true;
1327
+ } else {
1328
+ jQuery( YTPlayer ).YTPMute();
1329
+ return false;
1330
+ }
1331
+ };
1332
+ /**
1333
+ *
1334
+ */
1335
+ jQuery.fn.optimizeDisplay = function() {
1336
+ var YTPlayer = this.get( 0 );
1337
+ var data = YTPlayer.opt;
1338
+ var playerBox = jQuery( YTPlayer.playerEl );
1339
+ var win = {};
1340
+ var el = YTPlayer.wrapper;
1341
+ win.width = el.outerWidth();
1342
+ win.height = el.outerHeight();
1343
+ var margin = 24;
1344
+ var overprint = 100;
1345
+ var vid = {};
1346
+ if( data.optimizeDisplay ) {
1347
+ vid.width = win.width + ( ( win.width * margin ) / 100 );
1348
+ vid.height = data.ratio == "16/9" ? Math.ceil( ( 9 * win.width ) / 16 ) : Math.ceil( ( 3 * win.width ) / 4 );
1349
+ vid.marginTop = -( ( vid.height - win.height ) / 2 );
1350
+ vid.marginLeft = -( ( win.width * ( margin / 2 ) ) / 100 );
1351
+ if( vid.height < win.height ) {
1352
+ vid.height = win.height + ( ( win.height * margin ) / 100 );
1353
+ vid.width = data.ratio == "16/9" ? Math.floor( ( 16 * win.height ) / 9 ) : Math.floor( ( 4 * win.height ) / 3 );
1354
+ vid.marginTop = -( ( win.height * ( margin / 2 ) ) / 100 );
1355
+ vid.marginLeft = -( ( vid.width - win.width ) / 2 );
1356
+ }
1357
+ vid.width += overprint;
1358
+ vid.height += overprint;
1359
+ vid.marginTop -= overprint / 2;
1360
+ vid.marginLeft -= overprint / 2;
1361
+ } else {
1362
+ vid.width = "100%";
1363
+ vid.height = "100%";
1364
+ vid.marginTop = 0;
1365
+ vid.marginLeft = 0;
1366
+ }
1367
+ playerBox.css( {
1368
+ width: vid.width,
1369
+ height: vid.height,
1370
+ marginTop: vid.marginTop,
1371
+ marginLeft: vid.marginLeft
1372
+ } );
1373
+ };
1374
+ /**
1375
+ *
1376
+ * @param arr
1377
+ * @returns {Array|string|Blob|*}
1378
+ *
1379
+ */
1380
+ jQuery.shuffle = function( arr ) {
1381
+ var newArray = arr.slice();
1382
+ var len = newArray.length;
1383
+ var i = len;
1384
+ while( i-- ) {
1385
+ var p = parseInt( Math.random() * len );
1386
+ var t = newArray[ i ];
1387
+ newArray[ i ] = newArray[ p ];
1388
+ newArray[ p ] = t;
1389
+ }
1390
+ return newArray;
1391
+ };
1392
+
1393
+ /* Exposed public method */
1394
+ jQuery.fn.YTPlayer = jQuery.mbYTPlayer.buildPlayer;
1395
+ jQuery.fn.YTPGetPlayer = jQuery.mbYTPlayer.getPlayer;
1396
+ jQuery.fn.YTPGetVideoID = jQuery.mbYTPlayer.getVideoID;
1397
+ jQuery.fn.YTPChangeMovie = jQuery.mbYTPlayer.changeMovie;
1398
+ jQuery.fn.YTPPlayerDestroy = jQuery.mbYTPlayer.playerDestroy;
1399
+
1400
+ jQuery.fn.YTPPlay = jQuery.mbYTPlayer.play;
1401
+ jQuery.fn.YTPTogglePlay = jQuery.mbYTPlayer.togglePlay;
1402
+ jQuery.fn.YTPStop = jQuery.mbYTPlayer.stop;
1403
+ jQuery.fn.YTPPause = jQuery.mbYTPlayer.pause;
1404
+ jQuery.fn.YTPSeekTo = jQuery.mbYTPlayer.seekTo;
1405
+
1406
+ jQuery.fn.YTPlaylist = jQuery.mbYTPlayer.playlist;
1407
+ jQuery.fn.YTPPlayNext = jQuery.mbYTPlayer.playNext;
1408
+ jQuery.fn.YTPPlayPrev = jQuery.mbYTPlayer.playPrev;
1409
+
1410
+ jQuery.fn.YTPMute = jQuery.mbYTPlayer.mute;
1411
+ jQuery.fn.YTPUnmute = jQuery.mbYTPlayer.unmute;
1412
+ jQuery.fn.YTPToggleVolume = jQuery.mbYTPlayer.toggleVolume;
1413
+ jQuery.fn.YTPSetVolume = jQuery.mbYTPlayer.setVolume;
1414
+
1415
+ jQuery.fn.YTPGetVideoData = jQuery.mbYTPlayer.getVideoData;
1416
+ jQuery.fn.YTPFullscreen = jQuery.mbYTPlayer.fullscreen;
1417
+ jQuery.fn.YTPToggleLoops = jQuery.mbYTPlayer.toggleLoops;
1418
+ jQuery.fn.YTPSetVideoQuality = jQuery.mbYTPlayer.setVideoQuality;
1419
+ jQuery.fn.YTPManageProgress = jQuery.mbYTPlayer.manageProgress;
1420
+
1421
+ jQuery.fn.YTPApplyFilter = jQuery.mbYTPlayer.applyFilter;
1422
+ jQuery.fn.YTPApplyFilters = jQuery.mbYTPlayer.applyFilters;
1423
+ jQuery.fn.YTPToggleFilter = jQuery.mbYTPlayer.toggleFilter;
1424
+ jQuery.fn.YTPToggleFilters = jQuery.mbYTPlayer.toggleFilters;
1425
+ jQuery.fn.YTPRemoveFilter = jQuery.mbYTPlayer.removeFilter;
1426
+ jQuery.fn.YTPDisableFilters = jQuery.mbYTPlayer.disableFilters;
1427
+ jQuery.fn.YTPEnableFilters = jQuery.mbYTPlayer.enableFilters;
1428
+
1429
+
1430
+ /**
1431
+ *
1432
+ * @deprecated
1433
+ *
1434
+ **/
1435
+ jQuery.fn.mb_YTPlayer = jQuery.mbYTPlayer.buildPlayer;
1436
+ jQuery.fn.playNext = jQuery.mbYTPlayer.playNext;
1437
+ jQuery.fn.playPrev = jQuery.mbYTPlayer.playPrev;
1438
+ jQuery.fn.changeMovie = jQuery.mbYTPlayer.changeMovie;
1439
+ jQuery.fn.getVideoID = jQuery.mbYTPlayer.getVideoID;
1440
+ jQuery.fn.getPlayer = jQuery.mbYTPlayer.getPlayer;
1441
+ jQuery.fn.playerDestroy = jQuery.mbYTPlayer.playerDestroy;
1442
+ jQuery.fn.fullscreen = jQuery.mbYTPlayer.fullscreen;
1443
+ jQuery.fn.buildYTPControls = jQuery.mbYTPlayer.buildControls;
1444
+ jQuery.fn.playYTP = jQuery.mbYTPlayer.play;
1445
+ jQuery.fn.toggleLoops = jQuery.mbYTPlayer.toggleLoops;
1446
+ jQuery.fn.stopYTP = jQuery.mbYTPlayer.stop;
1447
+ jQuery.fn.pauseYTP = jQuery.mbYTPlayer.pause;
1448
+ jQuery.fn.seekToYTP = jQuery.mbYTPlayer.seekTo;
1449
+ jQuery.fn.muteYTPVolume = jQuery.mbYTPlayer.mute;
1450
+ jQuery.fn.unmuteYTPVolume = jQuery.mbYTPlayer.unmute;
1451
+ jQuery.fn.setYTPVolume = jQuery.mbYTPlayer.setVolume;
1452
+ jQuery.fn.setVideoQuality = jQuery.mbYTPlayer.setVideoQuality;
1453
+ jQuery.fn.manageYTPProgress = jQuery.mbYTPlayer.manageProgress;
1454
+ jQuery.fn.YTPGetDataFromFeed = jQuery.mbYTPlayer.getVideoData;
1455
+
1456
+
1457
+ } )( jQuery, ytp );
1458
+ ;
1459
+ /*
1460
+ * ******************************************************************************
1461
+ * jquery.mb.components
1462
+ * file: jquery.mb.CSSAnimate.min.js
1463
+ *
1464
+ * Copyright (c) 2001-2014. Matteo Bicocchi (Pupunzi);
1465
+ * Open lab srl, Firenze - Italy
1466
+ * email: matteo@open-lab.com
1467
+ * site: http://pupunzi.com
1468
+ * blog: http://pupunzi.open-lab.com
1469
+ * http://open-lab.com
1470
+ *
1471
+ * Licences: MIT, GPL
1472
+ * http://www.opensource.org/licenses/mit-license.php
1473
+ * http://www.gnu.org/licenses/gpl.html
1474
+ *
1475
+ * last modified: 26/03/14 21.40
1476
+ * *****************************************************************************
1477
+ */
1478
+
1479
+ function uncamel(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function setUnit(a,b){return"string"!=typeof a||a.match(/^[\-0-9\.]+jQuery/)?""+a+b:a}function setFilter(a,b,c){var d=uncamel(b),e=jQuery.browser.mozilla?"":jQuery.CSS.sfx;a[e+"filter"]=a[e+"filter"]||"",c=setUnit(c>jQuery.CSS.filters[b].max?jQuery.CSS.filters[b].max:c,jQuery.CSS.filters[b].unit),a[e+"filter"]+=d+"("+c+") ",delete a[b]}jQuery.support.CSStransition=function(){var a=document.body||document.documentElement,b=a.style;return void 0!==b.transition||void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.MsTransition||void 0!==b.OTransition}(),jQuery.CSS={name:"mb.CSSAnimate",author:"Matteo Bicocchi",version:"2.0.0",transitionEnd:"transitionEnd",sfx:"",filters:{blur:{min:0,max:100,unit:"px"},brightness:{min:0,max:400,unit:"%"},contrast:{min:0,max:400,unit:"%"},grayscale:{min:0,max:100,unit:"%"},hueRotate:{min:0,max:360,unit:"deg"},invert:{min:0,max:100,unit:"%"},saturate:{min:0,max:400,unit:"%"},sepia:{min:0,max:100,unit:"%"}},normalizeCss:function(a){var b=jQuery.extend(!0,{},a);jQuery.browser.webkit||jQuery.browser.opera?jQuery.CSS.sfx="-webkit-":jQuery.browser.mozilla?jQuery.CSS.sfx="-moz-":jQuery.browser.msie&&(jQuery.CSS.sfx="-ms-");for(var c in b){"transform"===c&&(b[jQuery.CSS.sfx+"transform"]=b[c],delete b[c]),"transform-origin"===c&&(b[jQuery.CSS.sfx+"transform-origin"]=a[c],delete b[c]),"filter"!==c||jQuery.browser.mozilla||(b[jQuery.CSS.sfx+"filter"]=a[c],delete b[c]),"blur"===c&&setFilter(b,"blur",a[c]),"brightness"===c&&setFilter(b,"brightness",a[c]),"contrast"===c&&setFilter(b,"contrast",a[c]),"grayscale"===c&&setFilter(b,"grayscale",a[c]),"hueRotate"===c&&setFilter(b,"hueRotate",a[c]),"invert"===c&&setFilter(b,"invert",a[c]),"saturate"===c&&setFilter(b,"saturate",a[c]),"sepia"===c&&setFilter(b,"sepia",a[c]);var d="";"x"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" translateX("+setUnit(a[c],"px")+")",delete b[c]),"y"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" translateY("+setUnit(a[c],"px")+")",delete b[c]),"z"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" translateZ("+setUnit(a[c],"px")+")",delete b[c]),"rotate"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotate("+setUnit(a[c],"deg")+")",delete b[c]),"rotateX"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotateX("+setUnit(a[c],"deg")+")",delete b[c]),"rotateY"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotateY("+setUnit(a[c],"deg")+")",delete b[c]),"rotateZ"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotateZ("+setUnit(a[c],"deg")+")",delete b[c]),"scale"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" scale("+setUnit(a[c],"")+")",delete b[c]),"scaleX"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" scaleX("+setUnit(a[c],"")+")",delete b[c]),"scaleY"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" scaleY("+setUnit(a[c],"")+")",delete b[c]),"scaleZ"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" scaleZ("+setUnit(a[c],"")+")",delete b[c]),"skew"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" skew("+setUnit(a[c],"deg")+")",delete b[c]),"skewX"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" skewX("+setUnit(a[c],"deg")+")",delete b[c]),"skewY"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" skewY("+setUnit(a[c],"deg")+")",delete b[c]),"perspective"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" perspective("+setUnit(a[c],"px")+")",delete b[c])}return b},getProp:function(a){var b=[];for(var c in a)b.indexOf(c)<0&&b.push(uncamel(c));return b.join(",")},animate:function(a,b,c,d,e){return this.each(function(){function o(){f.called=!0,f.CSSAIsRunning=!1,g.off(jQuery.CSS.transitionEnd+"."+f.id),clearTimeout(f.timeout),g.css(jQuery.CSS.sfx+"transition",""),"function"==typeof e&&e.apply(f),"function"==typeof f.CSSqueue&&(f.CSSqueue(),f.CSSqueue=null)}var f=this,g=jQuery(this);f.id=f.id||"CSSA_"+(new Date).getTime();var h=h||{type:"noEvent"};if(f.CSSAIsRunning&&f.eventType==h.type&&!jQuery.browser.msie&&jQuery.browser.version<=9)return f.CSSqueue=function(){g.CSSAnimate(a,b,c,d,e)},void 0;if(f.CSSqueue=null,f.eventType=h.type,0!==g.length&&a){if(a=jQuery.normalizeCss(a),f.CSSAIsRunning=!0,"function"==typeof b&&(e=b,b=jQuery.fx.speeds._default),"function"==typeof c&&(d=c,c=0),"string"==typeof c&&(e=c,c=0),"function"==typeof d&&(e=d,d="cubic-bezier(0.65,0.03,0.36,0.72)"),"string"==typeof b)for(var i in jQuery.fx.speeds){if(b==i){b=jQuery.fx.speeds[i];break}b=jQuery.fx.speeds._default}if(b||(b=jQuery.fx.speeds._default),"string"==typeof e&&(d=e,e=null),!jQuery.support.CSStransition){for(var j in a){if("transform"===j&&delete a[j],"filter"===j&&delete a[j],"transform-origin"===j&&delete a[j],"auto"===a[j]&&delete a[j],"x"===j){var k=a[j],l="left";a[l]=k,delete a[j]}if("y"===j){var k=a[j],l="top";a[l]=k,delete a[j]}("-ms-transform"===j||"-ms-filter"===j)&&delete a[j]}return g.delay(c).animate(a,b,e),void 0}var m={"default":"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};m[d]&&(d=m[d]),g.off(jQuery.CSS.transitionEnd+"."+f.id);var n=jQuery.CSS.getProp(a),p={};jQuery.extend(p,a),p[jQuery.CSS.sfx+"transition-property"]=n,p[jQuery.CSS.sfx+"transition-duration"]=b+"ms",p[jQuery.CSS.sfx+"transition-delay"]=c+"ms",p[jQuery.CSS.sfx+"transition-timing-function"]=d,setTimeout(function(){g.one(jQuery.CSS.transitionEnd+"."+f.id,o),g.css(p)},1),f.timeout=setTimeout(function(){return f.called||!e?(f.called=!1,f.CSSAIsRunning=!1,void 0):(g.css(jQuery.CSS.sfx+"transition",""),e.apply(f),f.CSSAIsRunning=!1,"function"==typeof f.CSSqueue&&(f.CSSqueue(),f.CSSqueue=null),void 0)},b+c+10)}})}},jQuery.fn.CSSAnimate=jQuery.CSS.animate,jQuery.normalizeCss=jQuery.CSS.normalizeCss,jQuery.fn.css3=function(a){return this.each(function(){var b=jQuery(this),c=jQuery.normalizeCss(a);b.css(c)})};
1480
+ ;/*
1481
+ * ******************************************************************************
1482
+ * jquery.mb.components
1483
+ * file: jquery.mb.browser.min.js
1484
+ *
1485
+ * Copyright (c) 2001-2014. Matteo Bicocchi (Pupunzi);
1486
+ * Open lab srl, Firenze - Italy
1487
+ * email: matteo@open-lab.com
1488
+ * site: http://pupunzi.com
1489
+ * blog: http://pupunzi.open-lab.com
1490
+ * http://open-lab.com
1491
+ *
1492
+ * Licences: MIT, GPL
1493
+ * http://www.opensource.org/licenses/mit-license.php
1494
+ * http://www.gnu.org/licenses/gpl.html
1495
+ *
1496
+ * last modified: 26/03/14 21.43
1497
+ * *****************************************************************************
1498
+ */
1499
+
1500
+ var nAgt=navigator.userAgent;if(!jQuery.browser){jQuery.browser={},jQuery.browser.mozilla=!1,jQuery.browser.webkit=!1,jQuery.browser.opera=!1,jQuery.browser.safari=!1,jQuery.browser.chrome=!1,jQuery.browser.msie=!1,jQuery.browser.ua=nAgt,jQuery.browser.name=navigator.appName,jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10);var nameOffset,verOffset,ix;if(-1!=(verOffset=nAgt.indexOf("Opera")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+6),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8));else if(-1!=(verOffset=nAgt.indexOf("OPR")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+4);else if(-1!=(verOffset=nAgt.indexOf("MSIE")))jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer",jQuery.browser.fullVersion=nAgt.substring(verOffset+5);else if(-1!=nAgt.indexOf("Trident")){jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer";var start=nAgt.indexOf("rv:")+3,end=start+4;jQuery.browser.fullVersion=nAgt.substring(start,end)}else-1!=(verOffset=nAgt.indexOf("Chrome"))?(jQuery.browser.webkit=!0,jQuery.browser.chrome=!0,jQuery.browser.name="Chrome",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1!=(verOffset=nAgt.indexOf("Safari"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("AppleWebkit"))?(jQuery.browser.webkit=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("Firefox"))?(jQuery.browser.mozilla=!0,jQuery.browser.name="Firefox",jQuery.browser.fullVersion=nAgt.substring(verOffset+8)):(nameOffset=nAgt.lastIndexOf(" ")+1)<(verOffset=nAgt.lastIndexOf("/"))&&(jQuery.browser.name=nAgt.substring(nameOffset,verOffset),jQuery.browser.fullVersion=nAgt.substring(verOffset+1),jQuery.browser.name.toLowerCase()==jQuery.browser.name.toUpperCase()&&(jQuery.browser.name=navigator.appName));-1!=(ix=jQuery.browser.fullVersion.indexOf(";"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),-1!=(ix=jQuery.browser.fullVersion.indexOf(" "))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),jQuery.browser.majorVersion=parseInt(""+jQuery.browser.fullVersion,10),isNaN(jQuery.browser.majorVersion)&&(jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10)),jQuery.browser.version=jQuery.browser.majorVersion}jQuery.browser.android=/Android/i.test(nAgt),jQuery.browser.blackberry=/BlackBerry|BB|PlayBook/i.test(nAgt),jQuery.browser.ios=/iPhone|iPad|iPod|webOS/i.test(nAgt),jQuery.browser.operaMobile=/Opera Mini/i.test(nAgt),jQuery.browser.windowsMobile=/IEMobile|Windows Phone/i.test(nAgt),jQuery.browser.kindle=/Kindle|Silk/i.test(nAgt),jQuery.browser.mobile=jQuery.browser.android||jQuery.browser.blackberry||jQuery.browser.ios||jQuery.browser.windowsMobile||jQuery.browser.operaMobile||jQuery.browser.kindle,jQuery.isMobile=jQuery.browser.mobile,jQuery.isTablet=jQuery.browser.mobile&&jQuery(window).width()>765,jQuery.isAndroidDefault=jQuery.browser.android&&!/chrome/i.test(nAgt);
1501
+ ;/*___________________________________________________________________________________________________________________________________________________
1502
+ _ jquery.mb.components _
1503
+ _ _
1504
+ _ file: jquery.mb.simpleSlider.min.js _
1505
+ _ last modified: 16/05/15 23.45 _
1506
+ _ _
1507
+ _ Open Lab s.r.l., Florence - Italy _
1508
+ _ _
1509
+ _ email: matteo@open-lab.com _
1510
+ _ site: http://pupunzi.com _
1511
+ _ http://open-lab.com _
1512
+ _ blog: http://pupunzi.open-lab.com _
1513
+ _ Q&A: http://jquery.pupunzi.com _
1514
+ _ _
1515
+ _ Licences: MIT, GPL _
1516
+ _ http://www.opensource.org/licenses/mit-license.php _
1517
+ _ http://www.gnu.org/licenses/gpl.html _
1518
+ _ _
1519
+ _ Copyright (c) 2001-2015. Matteo Bicocchi (Pupunzi); _
1520
+ ___________________________________________________________________________________________________________________________________________________*/
1521
+
1522
+ !function(a){/iphone|ipod|ipad|android|ie|blackberry|fennec/.test(navigator.userAgent.toLowerCase());var c="ontouchstart"in window||window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture||window.DocumentTouch&&document instanceof DocumentTouch||!1;a.simpleSlider={defaults:{initialval:0,scale:100,orientation:"h",readonly:!1,callback:!1},events:{start:c?"touchstart":"mousedown",end:c?"touchend":"mouseup",move:c?"touchmove":"mousemove"},init:function(b){return this.each(function(){var d=this,e=a(d);e.addClass("simpleSlider"),d.opt={},a.extend(d.opt,a.simpleSlider.defaults,b),a.extend(d.opt,e.data());var f="h"==d.opt.orientation?"horizontal":"vertical",g=a("<div/>").addClass("level").addClass(f);e.prepend(g),d.level=g,e.css({cursor:"default"}),"auto"==d.opt.scale&&(d.opt.scale=a(d).outerWidth()),e.updateSliderVal(),d.opt.readonly||(e.on(a.simpleSlider.events.start,function(a){c&&(a=a.changedTouches[0]),d.canSlide=!0,e.updateSliderVal(a),e.css({cursor:"col-resize"}),a.preventDefault(),a.stopPropagation()}),a(document).on(a.simpleSlider.events.move,function(b){c&&(b=b.changedTouches[0]),d.canSlide&&(a(document).css({cursor:"default"}),e.updateSliderVal(b),b.preventDefault(),b.stopPropagation())}).on(a.simpleSlider.events.end,function(){a(document).css({cursor:"auto"}),d.canSlide=!1,e.css({cursor:"auto"})}))})},updateSliderVal:function(b){function g(a,b){return Math.floor(100*a/b)}var c=this,d=c.get(0);d.opt.initialval="number"==typeof d.opt.initialval?d.opt.initialval:d.opt.initialval(d);var e=a(d).outerWidth(),f=a(d).outerHeight();d.x="object"==typeof b?b.clientX+document.body.scrollLeft-c.offset().left:"number"==typeof b?b*e/d.opt.scale:d.opt.initialval*e/d.opt.scale,d.y="object"==typeof b?b.clientY+document.body.scrollTop-c.offset().top:"number"==typeof b?(d.opt.scale-d.opt.initialval-b)*f/d.opt.scale:d.opt.initialval*f/d.opt.scale,d.y=c.outerHeight()-d.y,d.scaleX=d.x*d.opt.scale/e,d.scaleY=d.y*d.opt.scale/f,d.outOfRangeX=d.scaleX>d.opt.scale?d.scaleX-d.opt.scale:d.scaleX<0?d.scaleX:0,d.outOfRangeY=d.scaleY>d.opt.scale?d.scaleY-d.opt.scale:d.scaleY<0?d.scaleY:0,d.outOfRange="h"==d.opt.orientation?d.outOfRangeX:d.outOfRangeY,d.value="undefined"!=typeof b?"h"==d.opt.orientation?d.x>=c.outerWidth()?d.opt.scale:d.x<=0?0:d.scaleX:d.y>=c.outerHeight()?d.opt.scale:d.y<=0?0:d.scaleY:"h"==d.opt.orientation?d.scaleX:d.scaleY,"h"==d.opt.orientation?d.level.width(g(d.x,e)+"%"):d.level.height(g(d.y,f)),"function"==typeof d.opt.callback&&d.opt.callback(d)}},a.fn.simpleSlider=a.simpleSlider.init,a.fn.updateSliderVal=a.simpleSlider.updateSliderVal}(jQuery);
1523
+ ;/*___________________________________________________________________________________________________________________________________________________
1524
+ _ jquery.mb.components _
1525
+ _ _
1526
+ _ file: jquery.mb.storage.min.js _
1527
+ _ last modified: 24/05/15 16.08 _
1528
+ _ _
1529
+ _ Open Lab s.r.l., Florence - Italy _
1530
+ _ _
1531
+ _ email: matteo@open-lab.com _
1532
+ _ site: http://pupunzi.com _
1533
+ _ http://open-lab.com _
1534
+ _ blog: http://pupunzi.open-lab.com _
1535
+ _ Q&A: http://jquery.pupunzi.com _
1536
+ _ _
1537
+ _ Licences: MIT, GPL _
1538
+ _ http://www.opensource.org/licenses/mit-license.php _
1539
+ _ http://www.gnu.org/licenses/gpl.html _
1540
+ _ _
1541
+ _ Copyright (c) 2001-2015. Matteo Bicocchi (Pupunzi); _
1542
+ ___________________________________________________________________________________________________________________________________________________*/
1543
+
1544
+ !function(a){a.mbCookie={set:function(a,b,c,d){b=JSON.stringify(b),c||(c=7),d=d?"; domain="+d:"";var f,e=new Date;e.setTime(e.getTime()+1e3*60*60*24*c),f="; expires="+e.toGMTString(),document.cookie=a+"="+b+f+"; path=/"+d},get:function(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "==e.charAt(0);)e=e.substring(1,e.length);if(0==e.indexOf(b))return JSON.parse(e.substring(b.length,e.length))}return null},remove:function(b){a.mbCookie.set(b,"",-1)}},a.mbStorage={set:function(a,b){b=JSON.stringify(b),localStorage.setItem(a,b)},get:function(a){return localStorage[a]?JSON.parse(localStorage[a]):null},remove:function(a){a?localStorage.removeItem(a):localStorage.clear()}}}(jQuery);
assets/js/jquery.mb.YTPlayer.min.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ /*jquery.mb.YTPlayer 16-10-2015
2
+ _ jquery.mb.components
3
+ _ email: matteo@open-lab.com
4
+ _ Copyright (c) 2001-2015. Matteo Bicocchi (Pupunzi);
5
+ _ blog: http://pupunzi.open-lab.com
6
+ _ Open Lab s.r.l., Florence - Italy
7
+ */
8
+ function onYouTubeIframeAPIReady(){ytp.YTAPIReady||(ytp.YTAPIReady=!0,jQuery(document).trigger("YTAPIReady"))}function uncamel(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function setUnit(a,b){return"string"!=typeof a||a.match(/^[\-0-9\.]+jQuery/)?""+a+b:a}function setFilter(a,b,c){var d=uncamel(b),e=jQuery.browser.mozilla?"":jQuery.CSS.sfx;a[e+"filter"]=a[e+"filter"]||"",c=setUnit(c>jQuery.CSS.filters[b].max?jQuery.CSS.filters[b].max:c,jQuery.CSS.filters[b].unit),a[e+"filter"]+=d+"("+c+") ",delete a[b]}var ytp=ytp||{},getYTPVideoID=function(a){var b,c;return a.indexOf("youtu.be")>0?(b=a.substr(a.lastIndexOf("/")+1,a.length),c=b.indexOf("?list=")>0?b.substr(b.lastIndexOf("="),b.length):null,b=c?b.substr(0,b.lastIndexOf("?")):b):a.indexOf("http")>-1?(b=a.match(/[\\?&]v=([^&#]*)/)[1],c=a.indexOf("list=")>0?a.match(/[\\?&]list=([^&#]*)/)[1]:null):(b=a.length>15?null:a,c=b?null:a),{videoID:b,playlistID:c}};!function(jQuery,ytp){jQuery.mbYTPlayer={name:"jquery.mb.YTPlayer",version:"2.9.5",build:"{{ build }}",author:"Matteo Bicocchi",apiKey:"",defaults:{containment:"body",ratio:"auto",videoURL:null,playlistURL:null,startAt:0,stopAt:0,autoPlay:!0,vol:50,addRaster:!1,opacity:1,quality:"default",mute:!1,loop:!0,showControls:!0,showAnnotations:!1,showYTLogo:!0,stopMovieOnBlur:!0,realfullscreen:!0,gaTrack:!0,optimizeDisplay:!0,onReady:function(a){}},controls:{play:"P",pause:"p",mute:"M",unmute:"A",onlyYT:"O",showSite:"R",ytLogo:"Y"},locationProtocol:"https:",buildPlayer:function(options){return this.each(function(){var YTPlayer=this,$YTPlayer=jQuery(YTPlayer);YTPlayer.loop=0,YTPlayer.opt={},YTPlayer.state={},YTPlayer.filtersEnabled=!0,YTPlayer.filters={grayscale:{value:0,unit:"%"},hue_rotate:{value:0,unit:"deg"},invert:{value:0,unit:"%"},opacity:{value:0,unit:"%"},saturate:{value:0,unit:"%"},sepia:{value:0,unit:"%"},brightness:{value:0,unit:"%"},contrast:{value:0,unit:"%"},blur:{value:0,unit:"px"}},$YTPlayer.addClass("mb_YTPlayer");var property=$YTPlayer.data("property")&&"string"==typeof $YTPlayer.data("property")?eval("("+$YTPlayer.data("property")+")"):$YTPlayer.data("property");"undefined"!=typeof property&&"undefined"!=typeof property.vol&&(property.vol=0===property.vol?property.vol=1:property.vol),jQuery.extend(YTPlayer.opt,jQuery.mbYTPlayer.defaults,options,property),YTPlayer.hasChanged||(YTPlayer.defaultOpt={},jQuery.extend(YTPlayer.defaultOpt,jQuery.mbYTPlayer.defaults,options,property)),YTPlayer.isRetina=window.retina||window.devicePixelRatio>1;var isIframe=function(){var a=!1;try{self.location.href!=top.location.href&&(a=!0)}catch(b){a=!0}return a};YTPlayer.canGoFullScreen=!(jQuery.browser.msie||jQuery.browser.opera||isIframe()),YTPlayer.canGoFullScreen||(YTPlayer.opt.realfullscreen=!1),$YTPlayer.attr("id")||$YTPlayer.attr("id","video_"+(new Date).getTime());var playerID="mbYTP_"+YTPlayer.id;YTPlayer.isAlone=!1,YTPlayer.hasFocus=!0;var videoID=this.opt.videoURL?getYTPVideoID(this.opt.videoURL).videoID:$YTPlayer.attr("href")?getYTPVideoID($YTPlayer.attr("href")).videoID:!1,playlistID=this.opt.videoURL?getYTPVideoID(this.opt.videoURL).playlistID:$YTPlayer.attr("href")?getYTPVideoID($YTPlayer.attr("href")).playlistID:!1;YTPlayer.videoID=videoID,YTPlayer.playlistID=playlistID,YTPlayer.opt.showAnnotations=YTPlayer.opt.showAnnotations?"0":"3";var playerVars={autoplay:0,modestbranding:1,controls:0,showinfo:0,rel:0,enablejsapi:1,version:3,playerapiid:playerID,origin:"*",allowfullscreen:!0,wmode:"transparent",iv_load_policy:YTPlayer.opt.showAnnotations};document.createElement("video").canPlayType&&jQuery.extend(playerVars,{html5:1}),jQuery.browser.msie&&jQuery.browser.version<9&&(this.opt.opacity=1);var playerBox=jQuery("<div/>").attr("id",playerID).addClass("playerBox"),overlay=jQuery("<div/>").css({position:"absolute",top:0,left:0,width:"100%",height:"100%"}).addClass("YTPOverlay");if(YTPlayer.isSelf="self"==YTPlayer.opt.containment,YTPlayer.defaultOpt.containment=YTPlayer.opt.containment=jQuery("self"==YTPlayer.opt.containment?this:YTPlayer.opt.containment),YTPlayer.isBackground="body"==YTPlayer.opt.containment.get(0).tagName.toLowerCase(),!YTPlayer.isBackground||!ytp.backgroundIsInited){var isPlayer=YTPlayer.opt.containment.is(jQuery(this));if(YTPlayer.canPlayOnMobile=isPlayer&&0===jQuery(this).children().length,isPlayer?YTPlayer.isPlayer=!0:$YTPlayer.hide(),jQuery.browser.mobile&&!YTPlayer.canPlayOnMobile)return void $YTPlayer.remove();var wrapper=jQuery("<div/>").addClass("mbYTP_wrapper").attr("id","wrapper_"+playerID);if(wrapper.css({position:"absolute",zIndex:0,minWidth:"100%",minHeight:"100%",left:0,top:0,overflow:"hidden",opacity:0}),playerBox.css({position:"absolute",zIndex:0,width:"100%",height:"100%",top:0,left:0,overflow:"hidden"}),wrapper.append(playerBox),YTPlayer.opt.containment.children().not("script, style").each(function(){"static"==jQuery(this).css("position")&&jQuery(this).css("position","relative")}),YTPlayer.isBackground?(jQuery("body").css({boxSizing:"border-box"}),wrapper.css({position:"fixed",top:0,left:0,zIndex:0}),$YTPlayer.hide()):"static"==YTPlayer.opt.containment.css("position")&&YTPlayer.opt.containment.css({position:"relative"}),YTPlayer.opt.containment.prepend(wrapper),YTPlayer.wrapper=wrapper,playerBox.css({opacity:1}),jQuery.browser.mobile||(playerBox.after(overlay),YTPlayer.overlay=overlay),YTPlayer.isBackground||overlay.on("mouseenter",function(){YTPlayer.controlBar&&YTPlayer.controlBar.addClass("visible")}).on("mouseleave",function(){YTPlayer.controlBar&&YTPlayer.controlBar.removeClass("visible")}),ytp.YTAPIReady)setTimeout(function(){jQuery(document).trigger("YTAPIReady")},100);else{jQuery("#YTAPI").remove();var tag=jQuery("<script></script>").attr({src:jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/iframe_api?v="+jQuery.mbYTPlayer.version,id:"YTAPI"});jQuery("head").prepend(tag)}jQuery(document).on("YTAPIReady",function(){YTPlayer.isBackground&&ytp.backgroundIsInited||YTPlayer.isInit||(YTPlayer.isBackground&&(ytp.backgroundIsInited=!0),YTPlayer.opt.autoPlay="undefined"==typeof YTPlayer.opt.autoPlay?YTPlayer.isBackground?!0:!1:YTPlayer.opt.autoPlay,YTPlayer.opt.vol=YTPlayer.opt.vol?YTPlayer.opt.vol:100,jQuery.mbYTPlayer.getDataFromAPI(YTPlayer),jQuery(YTPlayer).on("YTPChanged",function(){if(!YTPlayer.isInit){if(YTPlayer.isInit=!0,jQuery.browser.mobile&&YTPlayer.canPlayOnMobile){if(YTPlayer.opt.containment.outerWidth()>jQuery(window).width()){YTPlayer.opt.containment.css({maxWidth:"100%"});var h=.6*YTPlayer.opt.containment.outerWidth();YTPlayer.opt.containment.css({maxHeight:h})}return void new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),height:"100%",width:"100%",events:{onReady:function(a){YTPlayer.player=a.target,playerBox.css({opacity:1}),YTPlayer.wrapper.css({opacity:1})}}})}new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),playerVars:playerVars,events:{onReady:function(a){if(YTPlayer.player=a.target,!YTPlayer.isReady){YTPlayer.isReady=YTPlayer.isPlayer&&!YTPlayer.opt.autoPlay?!1:!0,YTPlayer.playerEl=YTPlayer.player.getIframe(),$YTPlayer.optimizeDisplay(),YTPlayer.videoID=videoID,jQuery(window).on("resize.YTP",function(){$YTPlayer.optimizeDisplay()}),jQuery.mbYTPlayer.checkForState(YTPlayer);var b=jQuery.Event("YTPUnstarted");b.time=YTPlayer.player.time,YTPlayer.canTrigger&&jQuery(YTPlayer).trigger(b)}},onStateChange:function(event){if("function"==typeof event.target.getPlayerState){var state=event.target.getPlayerState();if(YTPlayer.state!=state){YTPlayer.state=state;var eventType;switch(state){case-1:eventType="YTPUnstarted";break;case 0:eventType="YTPEnd";break;case 1:eventType="YTPStart",YTPlayer.controlBar&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.pause),"undefined"!=typeof _gaq&&eval(YTPlayer.opt.gaTrack)&&_gaq.push(["_trackEvent","YTPlayer","Play",YTPlayer.hasData?YTPlayer.videoData.title:YTPlayer.videoID.toString()]),"undefined"!=typeof ga&&eval(YTPlayer.opt.gaTrack)&&ga("send","event","YTPlayer","play",YTPlayer.hasData?YTPlayer.videoData.title:YTPlayer.videoID.toString());break;case 2:eventType="YTPPause",YTPlayer.controlBar&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);break;case 3:YTPlayer.player.setPlaybackQuality(YTPlayer.opt.quality),eventType="YTPBuffering",YTPlayer.controlBar&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);break;case 5:eventType="YTPCued"}var YTPEvent=jQuery.Event(eventType);YTPEvent.time=YTPlayer.player.time,YTPlayer.canTrigger&&jQuery(YTPlayer).trigger(YTPEvent)}}},onPlaybackQualityChange:function(a){var b=a.target.getPlaybackQuality(),c=jQuery.Event("YTPQualityChange");c.quality=b,jQuery(YTPlayer).trigger(c)},onError:function(a){150==a.data&&(console.log("Embedding this video is restricted by Youtube."),YTPlayer.isPlayList&&jQuery(YTPlayer).playNext()),2==a.data&&YTPlayer.isPlayList&&jQuery(YTPlayer).playNext(),"function"==typeof YTPlayer.opt.onError&&YTPlayer.opt.onError($YTPlayer,a)}}})}}))})}})},getDataFromAPI:function(a){if(a.videoData=jQuery.mbStorage.get("YTPlayer_data_"+a.videoID),jQuery(a).off("YTPData.YTPlayer").on("YTPData.YTPlayer",function(){if(a.hasData&&a.isPlayer&&!a.opt.autoPlay){var b=a.videoData.thumb_max||a.videoData.thumb_high||a.videoData.thumb_medium;a.opt.containment.css({background:"rgba(0,0,0,0.5) url("+b+") center center",backgroundSize:"cover"}),a.opt.backgroundUrl=b}}),a.videoData)setTimeout(function(){a.opt.ratio="auto"==a.opt.ratio?"16/9":a.opt.ratio,a.dataReceived=!0,jQuery(a).trigger("YTPChanged");var b=jQuery.Event("YTPData");b.prop={};for(var c in a.videoData)b.prop[c]=a.videoData[c];jQuery(a).trigger(b)},500),a.hasData=!0;else if(jQuery.mbYTPlayer.apiKey)jQuery.getJSON(jQuery.mbYTPlayer.locationProtocol+"//www.googleapis.com/youtube/v3/videos?id="+a.videoID+"&key="+jQuery.mbYTPlayer.apiKey+"&part=snippet",function(b){function c(b){a.videoData={},a.videoData.id=a.videoID,a.videoData.channelTitle=b.channelTitle,a.videoData.title=b.title,a.videoData.description=b.description.length<400?b.description:b.description.substring(0,400)+" ...",a.videoData.aspectratio="auto"==a.opt.ratio?"16/9":a.opt.ratio,a.opt.ratio=a.videoData.aspectratio,a.videoData.thumb_max=b.thumbnails.maxres?b.thumbnails.maxres.url:null,a.videoData.thumb_high=b.thumbnails.high?b.thumbnails.high.url:null,a.videoData.thumb_medium=b.thumbnails.medium?b.thumbnails.medium.url:null,jQuery.mbStorage.set("YTPlayer_data_"+a.videoID,a.videoData)}a.dataReceived=!0,jQuery(a).trigger("YTPChanged"),c(b.items[0].snippet),a.hasData=!0;var d=jQuery.Event("YTPData");d.prop={};for(var e in a.videoData)d.prop[e]=a.videoData[e];jQuery(a).trigger(d)});else{if(setTimeout(function(){jQuery(a).trigger("YTPChanged")},50),a.isPlayer&&!a.opt.autoPlay){var b=jQuery.mbYTPlayer.locationProtocol+"//i.ytimg.com/vi/"+a.videoID+"/hqdefault.jpg";a.opt.containment.css({background:"rgba(0,0,0,0.5) url("+b+") center center",backgroundSize:"cover"}),a.opt.backgroundUrl=b}a.videoData=null,a.opt.ratio="auto"==a.opt.ratio?"16/9":a.opt.ratio}a.isPlayer&&!a.opt.autoPlay&&(a.loading=jQuery("<div/>").addClass("loading").html("Loading").hide(),jQuery(a).append(a.loading),a.loading.fadeIn())},removeStoredData:function(){jQuery.mbStorage.remove()},getVideoData:function(){var a=this.get(0);return a.videoData},getVideoID:function(){var a=this.get(0);return a.videoID||!1},setVideoQuality:function(a){var b=this.get(0);jQuery.browser.chrome||b.player.setPlaybackQuality(a)},playlist:function(a,b,c){var d=this,e=d.get(0);return e.isPlayList=!0,b&&(a=jQuery.shuffle(a)),e.videoID||(e.videos=a,e.videoCounter=0,e.videoLength=a.length,jQuery(e).data("property",a[0]),jQuery(e).mb_YTPlayer()),"function"==typeof c&&jQuery(e).one("YTPChanged",function(){c(e)}),jQuery(e).on("YTPEnd",function(){jQuery(e).playNext()}),d},playNext:function(){var a=this.get(0);return a.videoCounter++,a.videoCounter>=a.videoLength&&(a.videoCounter=0),jQuery(a).changeMovie(a.videos[a.videoCounter]),this},playPrev:function(){var a=this.get(0);return a.videoCounter--,a.videoCounter<0&&(a.videoCounter=a.videoLength-1),jQuery(a).changeMovie(a.videos[a.videoCounter]),this},changeMovie:function(a){var b=this.get(0);b.opt.startAt=0,b.opt.stopAt=0,b.opt.mute=!0,b.hasData=!1,b.hasChanged=!0,a&&jQuery.extend(b.opt,b.defaultOpt,a),b.videoID=getYTPVideoID(b.opt.videoURL).videoID,jQuery(b.playerEl).CSSAnimate({opacity:0},200,function(){return jQuery(b).YTPGetPlayer().cueVideoByUrl(encodeURI(jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/v/"+b.videoID),1,b.opt.quality),jQuery.mbYTPlayer.checkForState(b),jQuery(b).optimizeDisplay(),jQuery.mbYTPlayer.getDataFromAPI(b),this})},getPlayer:function(){return jQuery(this).get(0).player},playerDestroy:function(){var a=this.get(0);ytp.YTAPIReady=!1,ytp.backgroundIsInited=!1,a.isInit=!1,a.videoID=null;var b=a.wrapper;return b.remove(),jQuery("#controlBar_"+a.id).remove(),clearInterval(a.checkForStartAt),clearInterval(a.getState),this},fullscreen:function(real){function hideMouse(){YTPlayer.overlay.css({cursor:"none"})}function RunPrefixMethod(a,b){for(var c,d,e=["webkit","moz","ms","o",""],f=0;f<e.length&&!a[c];){if(c=b,""==e[f]&&(c=c.substr(0,1).toLowerCase()+c.substr(1)),c=e[f]+c,d=typeof a[c],"undefined"!=d)return e=[e[f]],"function"==d?a[c]():a[c];f++}}function launchFullscreen(a){RunPrefixMethod(a,"RequestFullScreen")}function cancelFullscreen(){(RunPrefixMethod(document,"FullScreen")||RunPrefixMethod(document,"IsFullScreen"))&&RunPrefixMethod(document,"CancelFullScreen")}var YTPlayer=this.get(0);"undefined"==typeof real&&(real=YTPlayer.opt.realfullscreen),real=eval(real);var controls=jQuery("#controlBar_"+YTPlayer.id),fullScreenBtn=controls.find(".mb_OnlyYT"),videoWrapper=YTPlayer.isSelf?YTPlayer.opt.containment:YTPlayer.wrapper;if(real){var fullscreenchange=jQuery.browser.mozilla?"mozfullscreenchange":jQuery.browser.webkit?"webkitfullscreenchange":"fullscreenchange";jQuery(document).off(fullscreenchange).on(fullscreenchange,function(){var a=RunPrefixMethod(document,"IsFullScreen")||RunPrefixMethod(document,"FullScreen");a?(jQuery(YTPlayer).YTPSetVideoQuality("default"),jQuery(YTPlayer).trigger("YTPFullScreenStart")):(YTPlayer.isAlone=!1,fullScreenBtn.html(jQuery.mbYTPlayer.controls.onlyYT),jQuery(YTPlayer).YTPSetVideoQuality(YTPlayer.opt.quality),videoWrapper.removeClass("fullscreen"),videoWrapper.CSSAnimate({opacity:YTPlayer.opt.opacity},500),videoWrapper.css({zIndex:0}),YTPlayer.isBackground?jQuery("body").after(controls):YTPlayer.wrapper.before(controls),jQuery(window).resize(),jQuery(YTPlayer).trigger("YTPFullScreenEnd"))})}return YTPlayer.isAlone?(jQuery(document).off("mousemove.YTPlayer"),YTPlayer.overlay.css({cursor:"auto"}),real?cancelFullscreen():(videoWrapper.CSSAnimate({opacity:YTPlayer.opt.opacity},500),videoWrapper.css({zIndex:0})),fullScreenBtn.html(jQuery.mbYTPlayer.controls.onlyYT),YTPlayer.isAlone=!1):(jQuery(document).on("mousemove.YTPlayer",function(a){YTPlayer.overlay.css({cursor:"auto"}),clearTimeout(YTPlayer.hideCursor),jQuery(a.target).parents().is(".mb_YTPBar")||(YTPlayer.hideCursor=setTimeout(hideMouse,3e3))}),hideMouse(),real?(videoWrapper.css({opacity:0}),videoWrapper.addClass("fullscreen"),launchFullscreen(videoWrapper.get(0)),setTimeout(function(){videoWrapper.CSSAnimate({opacity:1},1e3),YTPlayer.wrapper.append(controls),jQuery(YTPlayer).optimizeDisplay(),YTPlayer.player.seekTo(YTPlayer.player.getCurrentTime()+.1,!0)},500)):videoWrapper.css({zIndex:1e4}).CSSAnimate({opacity:1},1e3),fullScreenBtn.html(jQuery.mbYTPlayer.controls.showSite),YTPlayer.isAlone=!0),this},toggleLoops:function(){var a=this.get(0),b=a.opt;return 1==b.loop?b.loop=0:(b.startAt?a.player.seekTo(b.startAt):a.player.playVideo(),b.loop=1),this},play:function(){var a=this.get(0);if(a.isReady){var b=jQuery("#controlBar_"+a.id),c=b.find(".mb_YTPPlaypause");return c.html(jQuery.mbYTPlayer.controls.pause),a.player.playVideo(),a.wrapper.CSSAnimate({opacity:a.isAlone?1:a.opt.opacity},2e3),jQuery(a.playerEl).CSSAnimate({opacity:1},1e3),jQuery(a).css("background-image","none"),this}},togglePlay:function(a){var b=this.get(0);return 1==b.state?this.YTPPause():this.YTPPlay(),"function"==typeof a&&a(b.state),this},stop:function(){var a=this.get(0),b=jQuery("#controlBar_"+a.id),c=b.find(".mb_YTPPlaypause");return c.html(jQuery.mbYTPlayer.controls.play),a.player.stopVideo(),this},pause:function(){var a=this.get(0),b=jQuery("#controlBar_"+a.id),c=b.find(".mb_YTPPlaypause");return c.html(jQuery.mbYTPlayer.controls.play),a.player.pauseVideo(),this},seekTo:function(a){var b=this.get(0);return b.player.seekTo(a,!0),this},setVolume:function(a){var b=this.get(0);return a||b.opt.vol||0!=b.player.getVolume()?!a&&b.player.getVolume()>0||a&&b.opt.vol==a?b.isMute?jQuery(b).YTPUnmute():jQuery(b).YTPMute():(b.opt.vol=a,b.player.setVolume(b.opt.vol),b.volumeBar&&b.volumeBar.length&&b.volumeBar.updateSliderVal(a)):jQuery(b).YTPUnmute(),this},mute:function(){var a=this.get(0);if(!a.isMute){a.player.mute(),a.isMute=!0,a.player.setVolume(0),a.volumeBar&&a.volumeBar.length&&a.volumeBar.width()>10&&a.volumeBar.updateSliderVal(0);var b=jQuery("#controlBar_"+a.id),c=b.find(".mb_YTPMuteUnmute");c.html(jQuery.mbYTPlayer.controls.unmute),jQuery(a).addClass("isMuted"),a.volumeBar&&a.volumeBar.length&&a.volumeBar.addClass("muted");var d=jQuery.Event("YTPMuted");return d.time=a.player.time,a.canTrigger&&jQuery(a).trigger(d),this}},unmute:function(){var a=this.get(0);if(a.isMute){a.player.unMute(),a.isMute=!1,a.player.setVolume(a.opt.vol),a.volumeBar&&a.volumeBar.length&&a.volumeBar.updateSliderVal(a.opt.vol>10?a.opt.vol:10);var b=jQuery("#controlBar_"+a.id),c=b.find(".mb_YTPMuteUnmute");c.html(jQuery.mbYTPlayer.controls.mute),jQuery(a).removeClass("isMuted"),a.volumeBar&&a.volumeBar.length&&a.volumeBar.removeClass("muted");var d=jQuery.Event("YTPUnmuted");return d.time=a.player.time,a.canTrigger&&jQuery(a).trigger(d),this}},applyFilter:function(a,b){var c=this.get(0);return c.filters[a].value=b,c.filtersEnabled&&this.YTPEnableFilters(),this},applyFilters:function(a){var b=this.get(0);return this.on("YTPReady",function(){for(var c in a)b.filters[c].value=a[c],jQuery(b).YTPApplyFilter(c,a[c]);jQuery(b).trigger("YTPFiltersApplied")}),this},toggleFilter:function(a,b){return this.each(function(){var c=this;c.filters[a].value?c.filters[a].value=0:c.filters[a].value=b,c.filtersEnabled&&jQuery(this).YTPEnableFilters()})},toggleFilters:function(a){return this.each(function(){var b=this;b.filtersEnabled?(jQuery(b).trigger("YTPDisableFilters"),jQuery(b).YTPDisableFilters()):(jQuery(b).YTPEnableFilters(),jQuery(b).trigger("YTPEnableFilters")),"function"==typeof a&&a(b.filtersEnabled)})},disableFilters:function(){return this.each(function(){var a=this,b=jQuery(a.playerEl);b.css("-webkit-filter",""),b.css("filter",""),a.filtersEnabled=!1})},enableFilters:function(){return this.each(function(){var a=this,b=jQuery(a.playerEl),c="";for(var d in a.filters)a.filters[d].value&&(c+=d.replace("_","-")+"("+a.filters[d].value+a.filters[d].unit+") ");b.css("-webkit-filter",c),b.css("filter",c),a.filtersEnabled=!0})},removeFilter:function(a,b){return this.each(function(){"function"==typeof a&&(b=a,a=null);var c=this;if(a)jQuery(this).YTPApplyFilter(a,0),"function"==typeof b&&b(a);else for(var d in c.filters)jQuery(this).YTPApplyFilter(d,0),"function"==typeof b&&b(d)})},manageProgress:function(){var a=this.get(0),b=jQuery("#controlBar_"+a.id),c=b.find(".mb_YTPProgress"),d=b.find(".mb_YTPLoaded"),e=b.find(".mb_YTPseekbar"),f=c.outerWidth(),g=Math.floor(a.player.getCurrentTime()),h=Math.floor(a.player.getDuration()),i=g*f/h,j=0,k=100*a.player.getVideoLoadedFraction();return d.css({left:j,width:k+"%"}),e.css({left:0,width:i}),{totalTime:h,currentTime:g}},buildControls:function(YTPlayer){var data=YTPlayer.opt;if(data.showYTLogo=data.showYTLogo||data.printUrl,!jQuery("#controlBar_"+YTPlayer.id).length){YTPlayer.controlBar=jQuery("<span/>").attr("id","controlBar_"+YTPlayer.id).addClass("mb_YTPBar").css({whiteSpace:"noWrap",position:YTPlayer.isBackground?"fixed":"absolute",zIndex:YTPlayer.isBackground?1e4:1e3}).hide();var buttonBar=jQuery("<div/>").addClass("buttonBar"),playpause=jQuery("<span>"+jQuery.mbYTPlayer.controls.play+"</span>").addClass("mb_YTPPlaypause ytpicon").click(function(){1==YTPlayer.player.getPlayerState()?jQuery(YTPlayer).YTPPause():jQuery(YTPlayer).YTPPlay()}),MuteUnmute=jQuery("<span>"+jQuery.mbYTPlayer.controls.mute+"</span>").addClass("mb_YTPMuteUnmute ytpicon").click(function(){0==YTPlayer.player.getVolume()?jQuery(YTPlayer).YTPUnmute():jQuery(YTPlayer).YTPMute()}),volumeBar=jQuery("<div/>").addClass("mb_YTPVolumeBar").css({display:"inline-block"});YTPlayer.volumeBar=volumeBar;var idx=jQuery("<span/>").addClass("mb_YTPTime"),vURL=data.videoURL?data.videoURL:"";vURL.indexOf("http")<0&&(vURL=jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/watch?v="+data.videoURL);var movieUrl=jQuery("<span/>").html(jQuery.mbYTPlayer.controls.ytLogo).addClass("mb_YTPUrl ytpicon").attr("title","view on YouTube").on("click",function(){window.open(vURL,"viewOnYT")}),onlyVideo=jQuery("<span/>").html(jQuery.mbYTPlayer.controls.onlyYT).addClass("mb_OnlyYT ytpicon").on("click",function(){jQuery(YTPlayer).YTPFullscreen(data.realfullscreen)}),progressBar=jQuery("<div/>").addClass("mb_YTPProgress").css("position","absolute").click(function(a){timeBar.css({width:a.clientX-timeBar.offset().left}),YTPlayer.timeW=a.clientX-timeBar.offset().left,YTPlayer.controlBar.find(".mb_YTPLoaded").css({width:0});var b=Math.floor(YTPlayer.player.getDuration());YTPlayer["goto"]=timeBar.outerWidth()*b/progressBar.outerWidth(),YTPlayer.player.seekTo(parseFloat(YTPlayer["goto"]),!0),YTPlayer.controlBar.find(".mb_YTPLoaded").css({width:0})}),loadedBar=jQuery("<div/>").addClass("mb_YTPLoaded").css("position","absolute"),timeBar=jQuery("<div/>").addClass("mb_YTPseekbar").css("position","absolute");progressBar.append(loadedBar).append(timeBar),buttonBar.append(playpause).append(MuteUnmute).append(volumeBar).append(idx),data.showYTLogo&&buttonBar.append(movieUrl),(YTPlayer.isBackground||eval(YTPlayer.opt.realfullscreen)&&!YTPlayer.isBackground)&&buttonBar.append(onlyVideo),YTPlayer.controlBar.append(buttonBar).append(progressBar),YTPlayer.isBackground?jQuery("body").after(YTPlayer.controlBar):(YTPlayer.controlBar.addClass("inlinePlayer"),YTPlayer.wrapper.before(YTPlayer.controlBar)),volumeBar.simpleSlider({initialval:YTPlayer.opt.vol,scale:100,orientation:"h",callback:function(a){0==a.value?jQuery(YTPlayer).YTPMute():jQuery(YTPlayer).YTPUnmute(),YTPlayer.player.setVolume(a.value),YTPlayer.isMute||(YTPlayer.opt.vol=a.value)}})}},checkForState:function(YTPlayer){var interval=YTPlayer.opt.showControls?100:400;return clearInterval(YTPlayer.getState),jQuery.contains(document,YTPlayer)?(jQuery.mbYTPlayer.checkForStart(YTPlayer),void(YTPlayer.getState=setInterval(function(){var prog=jQuery(YTPlayer).YTPManageProgress(),$YTPlayer=jQuery(YTPlayer),data=YTPlayer.opt,startAt=YTPlayer.opt.startAt?YTPlayer.opt.startAt:1,stopAt=YTPlayer.opt.stopAt>YTPlayer.opt.startAt?YTPlayer.opt.stopAt:0;if(stopAt=stopAt<YTPlayer.player.getDuration()?stopAt:0,YTPlayer.player.time!=prog.currentTime){var YTPEvent=jQuery.Event("YTPTime");YTPEvent.time=YTPlayer.player.time,jQuery(YTPlayer).trigger(YTPEvent)}if(YTPlayer.player.time=prog.currentTime,0==YTPlayer.player.getVolume()?$YTPlayer.addClass("isMuted"):$YTPlayer.removeClass("isMuted"),YTPlayer.opt.showControls&&(prog.totalTime?YTPlayer.controlBar.find(".mb_YTPTime").html(jQuery.mbYTPlayer.formatTime(prog.currentTime)+" / "+jQuery.mbYTPlayer.formatTime(prog.totalTime)):YTPlayer.controlBar.find(".mb_YTPTime").html("-- : -- / -- : --")),eval(YTPlayer.opt.stopMovieOnBlur)&&(document.hasFocus()?document.hasFocus()&&!YTPlayer.hasFocus&&-1!=YTPlayer.state&&0!=YTPlayer.state&&(YTPlayer.hasFocus=!0,$YTPlayer.YTPPlay()):1==YTPlayer.state&&(YTPlayer.hasFocus=!1,$YTPlayer.YTPPause())),YTPlayer.controlBar&&YTPlayer.controlBar.outerWidth()<=400&&!YTPlayer.isCompact?(YTPlayer.controlBar.addClass("compact"),YTPlayer.isCompact=!0,!YTPlayer.isMute&&YTPlayer.volumeBar&&YTPlayer.volumeBar.updateSliderVal(YTPlayer.opt.vol)):YTPlayer.controlBar&&YTPlayer.controlBar.outerWidth()>400&&YTPlayer.isCompact&&(YTPlayer.controlBar.removeClass("compact"),YTPlayer.isCompact=!1,!YTPlayer.isMute&&YTPlayer.volumeBar&&YTPlayer.volumeBar.updateSliderVal(YTPlayer.opt.vol)),1==YTPlayer.player.getPlayerState()&&(parseFloat(YTPlayer.player.getDuration()-1.5)<YTPlayer.player.getCurrentTime()||stopAt>0&&parseFloat(YTPlayer.player.getCurrentTime())>stopAt)){if(YTPlayer.isEnded)return;if(YTPlayer.isEnded=!0,setTimeout(function(){YTPlayer.isEnded=!1},1e3),YTPlayer.isPlayList){clearInterval(YTPlayer.getState);var YTPEnd=jQuery.Event("YTPEnd");return YTPEnd.time=YTPlayer.player.time,void jQuery(YTPlayer).trigger(YTPEnd)}data.loop?(startAt=startAt||1,YTPlayer.player.pauseVideo(),YTPlayer.player.seekTo(startAt,!0),$YTPlayer.YTPPlay()):(YTPlayer.player.pauseVideo(),YTPlayer.wrapper.CSSAnimate({opacity:0},1e3,function(){var a=jQuery.Event("YTPEnd");a.time=YTPlayer.player.time,jQuery(YTPlayer).trigger(a),YTPlayer.player.seekTo(startAt,!0),YTPlayer.isBackground||YTPlayer.opt.containment.css({background:"rgba(0,0,0,0.5) url("+YTPlayer.opt.backgroundUrl+") center center",backgroundSize:"cover"})}))}},interval))):(jQuery(YTPlayer).YTPPlayerDestroy(),clearInterval(YTPlayer.getState),void clearInterval(YTPlayer.checkForStartAt))},checkForStart:function(a){var b=jQuery(a);if(!jQuery.contains(document,a))return void jQuery(a).YTPPlayerDestroy();if(jQuery.browser.chrome&&(a.opt.quality="default"),a.player.pauseVideo(),jQuery(a).muteYTPVolume(),jQuery("#controlBar_"+a.id).remove(),a.opt.showControls&&jQuery.mbYTPlayer.buildControls(a),a.opt.addRaster){var c="dot"==a.opt.addRaster?"raster-dot":"raster";a.overlay.addClass(a.isRetina?c+" retina":c)}else a.overlay.removeClass(function(a,b){var c=b.split(" "),d=[];return jQuery.each(c,function(a,b){/raster.*/.test(b)&&d.push(b)}),d.push("retina"),d.join(" ")});a.checkForStartAt=setInterval(function(){jQuery(a).YTPMute();var c=a.opt.startAt?a.opt.startAt:1,d=a.player.getVideoLoadedFraction()>c/a.player.getDuration();if(a.player.getDuration()>0&&a.player.getCurrentTime()>=c&&d){clearInterval(a.checkForStartAt),a.isReady=!0,"function"==typeof a.opt.onReady&&a.opt.onReady(a);var e=jQuery.Event("YTPReady");jQuery(a).trigger(e),a.player.pauseVideo(),a.opt.mute||jQuery(a).YTPUnmute(),a.canTrigger=!0,a.opt.autoPlay?(b.YTPPlay(),b.css("background-image","none"),jQuery(a.playerEl).CSSAnimate({opacity:1},1e3),a.wrapper.CSSAnimate({opacity:a.isAlone?1:a.opt.opacity},1e3)):(a.player.pauseVideo(),a.isPlayer||(jQuery(a.playerEl).CSSAnimate({opacity:1},1e3),a.wrapper.CSSAnimate({opacity:a.isAlone?1:a.opt.opacity},1e3))),a.isPlayer&&!a.opt.autoPlay&&(a.loading.html("Ready"),setTimeout(function(){a.loading.fadeOut()},100)),a.controlBar&&a.controlBar.slideDown(1e3)}else c>=0&&a.player.seekTo(c,!0)},1e3)},formatTime:function(a){var b=Math.floor(a/60),c=Math.floor(a-60*b);return(9>=b?"0"+b:b)+" : "+(9>=c?"0"+c:c)}},jQuery.fn.toggleVolume=function(){var a=this.get(0);if(a)return a.player.isMuted()?(jQuery(a).YTPUnmute(),!0):(jQuery(a).YTPMute(),!1)},jQuery.fn.optimizeDisplay=function(){var a=this.get(0),b=a.opt,c=jQuery(a.playerEl),d={},e=a.wrapper;d.width=e.outerWidth(),d.height=e.outerHeight();var f=24,g=100,h={};b.optimizeDisplay?(h.width=d.width+d.width*f/100,h.height="16/9"==b.ratio?Math.ceil(9*d.width/16):Math.ceil(3*d.width/4),h.marginTop=-((h.height-d.height)/2),h.marginLeft=-(d.width*(f/2)/100),h.height<d.height&&(h.height=d.height+d.height*f/100,h.width="16/9"==b.ratio?Math.floor(16*d.height/9):Math.floor(4*d.height/3),h.marginTop=-(d.height*(f/2)/100),h.marginLeft=-((h.width-d.width)/2)),h.width+=g,h.height+=g,h.marginTop-=g/2,h.marginLeft-=g/2):(h.width="100%",h.height="100%",h.marginTop=0,h.marginLeft=0),c.css({width:h.width,height:h.height,marginTop:h.marginTop,marginLeft:h.marginLeft})},jQuery.shuffle=function(a){for(var b=a.slice(),c=b.length,d=c;d--;){var e=parseInt(Math.random()*c),f=b[d];b[d]=b[e],b[e]=f}return b},jQuery.fn.YTPlayer=jQuery.mbYTPlayer.buildPlayer,jQuery.fn.YTPGetPlayer=jQuery.mbYTPlayer.getPlayer,jQuery.fn.YTPGetVideoID=jQuery.mbYTPlayer.getVideoID,jQuery.fn.YTPChangeMovie=jQuery.mbYTPlayer.changeMovie,jQuery.fn.YTPPlayerDestroy=jQuery.mbYTPlayer.playerDestroy,jQuery.fn.YTPPlay=jQuery.mbYTPlayer.play,jQuery.fn.YTPTogglePlay=jQuery.mbYTPlayer.togglePlay,jQuery.fn.YTPStop=jQuery.mbYTPlayer.stop,jQuery.fn.YTPPause=jQuery.mbYTPlayer.pause,jQuery.fn.YTPSeekTo=jQuery.mbYTPlayer.seekTo,jQuery.fn.YTPlaylist=jQuery.mbYTPlayer.playlist,jQuery.fn.YTPPlayNext=jQuery.mbYTPlayer.playNext,jQuery.fn.YTPPlayPrev=jQuery.mbYTPlayer.playPrev,jQuery.fn.YTPMute=jQuery.mbYTPlayer.mute,jQuery.fn.YTPUnmute=jQuery.mbYTPlayer.unmute,jQuery.fn.YTPToggleVolume=jQuery.mbYTPlayer.toggleVolume,jQuery.fn.YTPSetVolume=jQuery.mbYTPlayer.setVolume,jQuery.fn.YTPGetVideoData=jQuery.mbYTPlayer.getVideoData,jQuery.fn.YTPFullscreen=jQuery.mbYTPlayer.fullscreen,jQuery.fn.YTPToggleLoops=jQuery.mbYTPlayer.toggleLoops,jQuery.fn.YTPSetVideoQuality=jQuery.mbYTPlayer.setVideoQuality,jQuery.fn.YTPManageProgress=jQuery.mbYTPlayer.manageProgress,jQuery.fn.YTPApplyFilter=jQuery.mbYTPlayer.applyFilter,jQuery.fn.YTPApplyFilters=jQuery.mbYTPlayer.applyFilters,jQuery.fn.YTPToggleFilter=jQuery.mbYTPlayer.toggleFilter,jQuery.fn.YTPToggleFilters=jQuery.mbYTPlayer.toggleFilters,jQuery.fn.YTPRemoveFilter=jQuery.mbYTPlayer.removeFilter,jQuery.fn.YTPDisableFilters=jQuery.mbYTPlayer.disableFilters,jQuery.fn.YTPEnableFilters=jQuery.mbYTPlayer.enableFilters,jQuery.fn.mb_YTPlayer=jQuery.mbYTPlayer.buildPlayer,jQuery.fn.playNext=jQuery.mbYTPlayer.playNext,jQuery.fn.playPrev=jQuery.mbYTPlayer.playPrev,jQuery.fn.changeMovie=jQuery.mbYTPlayer.changeMovie,jQuery.fn.getVideoID=jQuery.mbYTPlayer.getVideoID,jQuery.fn.getPlayer=jQuery.mbYTPlayer.getPlayer,jQuery.fn.playerDestroy=jQuery.mbYTPlayer.playerDestroy,jQuery.fn.fullscreen=jQuery.mbYTPlayer.fullscreen,jQuery.fn.buildYTPControls=jQuery.mbYTPlayer.buildControls,jQuery.fn.playYTP=jQuery.mbYTPlayer.play,jQuery.fn.toggleLoops=jQuery.mbYTPlayer.toggleLoops,jQuery.fn.stopYTP=jQuery.mbYTPlayer.stop,jQuery.fn.pauseYTP=jQuery.mbYTPlayer.pause,jQuery.fn.seekToYTP=jQuery.mbYTPlayer.seekTo,jQuery.fn.muteYTPVolume=jQuery.mbYTPlayer.mute,jQuery.fn.unmuteYTPVolume=jQuery.mbYTPlayer.unmute,jQuery.fn.setYTPVolume=jQuery.mbYTPlayer.setVolume,jQuery.fn.setVideoQuality=jQuery.mbYTPlayer.setVideoQuality,jQuery.fn.manageYTPProgress=jQuery.mbYTPlayer.manageProgress,jQuery.fn.YTPGetDataFromFeed=jQuery.mbYTPlayer.getVideoData}(jQuery,ytp),jQuery.support.CSStransition=function(){var a=document.body||document.documentElement,b=a.style;return void 0!==b.transition||void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.MsTransition||void 0!==b.OTransition}(),jQuery.CSS={name:"mb.CSSAnimate",author:"Matteo Bicocchi",version:"2.0.0",transitionEnd:"transitionEnd",sfx:"",filters:{blur:{min:0,max:100,unit:"px"},brightness:{min:0,max:400,unit:"%"},contrast:{min:0,max:400,unit:"%"},grayscale:{min:0,max:100,unit:"%"},hueRotate:{min:0,max:360,unit:"deg"},invert:{min:0,max:100,unit:"%"},saturate:{min:0,max:400,unit:"%"},sepia:{min:0,max:100,unit:"%"}},normalizeCss:function(a){var b=jQuery.extend(!0,{},a);jQuery.browser.webkit||jQuery.browser.opera?jQuery.CSS.sfx="-webkit-":jQuery.browser.mozilla?jQuery.CSS.sfx="-moz-":jQuery.browser.msie&&(jQuery.CSS.sfx="-ms-");for(var c in b){"transform"===c&&(b[jQuery.CSS.sfx+"transform"]=b[c],delete b[c]),"transform-origin"===c&&(b[jQuery.CSS.sfx+"transform-origin"]=a[c],delete b[c]),"filter"!==c||jQuery.browser.mozilla||(b[jQuery.CSS.sfx+"filter"]=a[c],delete b[c]),"blur"===c&&setFilter(b,"blur",a[c]),"brightness"===c&&setFilter(b,"brightness",a[c]),"contrast"===c&&setFilter(b,"contrast",a[c]),"grayscale"===c&&setFilter(b,"grayscale",a[c]),"hueRotate"===c&&setFilter(b,"hueRotate",a[c]),
9
+ "invert"===c&&setFilter(b,"invert",a[c]),"saturate"===c&&setFilter(b,"saturate",a[c]),"sepia"===c&&setFilter(b,"sepia",a[c]);var d="";"x"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" translateX("+setUnit(a[c],"px")+")",delete b[c]),"y"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" translateY("+setUnit(a[c],"px")+")",delete b[c]),"z"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" translateZ("+setUnit(a[c],"px")+")",delete b[c]),"rotate"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotate("+setUnit(a[c],"deg")+")",delete b[c]),"rotateX"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotateX("+setUnit(a[c],"deg")+")",delete b[c]),"rotateY"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotateY("+setUnit(a[c],"deg")+")",delete b[c]),"rotateZ"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" rotateZ("+setUnit(a[c],"deg")+")",delete b[c]),"scale"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" scale("+setUnit(a[c],"")+")",delete b[c]),"scaleX"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" scaleX("+setUnit(a[c],"")+")",delete b[c]),"scaleY"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" scaleY("+setUnit(a[c],"")+")",delete b[c]),"scaleZ"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" scaleZ("+setUnit(a[c],"")+")",delete b[c]),"skew"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" skew("+setUnit(a[c],"deg")+")",delete b[c]),"skewX"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" skewX("+setUnit(a[c],"deg")+")",delete b[c]),"skewY"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" skewY("+setUnit(a[c],"deg")+")",delete b[c]),"perspective"===c&&(d=jQuery.CSS.sfx+"transform",b[d]=b[d]||"",b[d]+=" perspective("+setUnit(a[c],"px")+")",delete b[c])}return b},getProp:function(a){var b=[];for(var c in a)b.indexOf(c)<0&&b.push(uncamel(c));return b.join(",")},animate:function(a,b,c,d,e){return this.each(function(){function f(){g.called=!0,g.CSSAIsRunning=!1,h.off(jQuery.CSS.transitionEnd+"."+g.id),clearTimeout(g.timeout),h.css(jQuery.CSS.sfx+"transition",""),"function"==typeof e&&e.apply(g),"function"==typeof g.CSSqueue&&(g.CSSqueue(),g.CSSqueue=null)}var g=this,h=jQuery(this);g.id=g.id||"CSSA_"+(new Date).getTime();var i=i||{type:"noEvent"};if(g.CSSAIsRunning&&g.eventType==i.type&&!jQuery.browser.msie&&jQuery.browser.version<=9)return void(g.CSSqueue=function(){h.CSSAnimate(a,b,c,d,e)});if(g.CSSqueue=null,g.eventType=i.type,0!==h.length&&a){if(a=jQuery.normalizeCss(a),g.CSSAIsRunning=!0,"function"==typeof b&&(e=b,b=jQuery.fx.speeds._default),"function"==typeof c&&(d=c,c=0),"string"==typeof c&&(e=c,c=0),"function"==typeof d&&(e=d,d="cubic-bezier(0.65,0.03,0.36,0.72)"),"string"==typeof b)for(var j in jQuery.fx.speeds){if(b==j){b=jQuery.fx.speeds[j];break}b=jQuery.fx.speeds._default}if(b||(b=jQuery.fx.speeds._default),"string"==typeof e&&(d=e,e=null),!jQuery.support.CSStransition){for(var k in a){if("transform"===k&&delete a[k],"filter"===k&&delete a[k],"transform-origin"===k&&delete a[k],"auto"===a[k]&&delete a[k],"x"===k){var l=a[k],m="left";a[m]=l,delete a[k]}if("y"===k){var l=a[k],m="top";a[m]=l,delete a[k]}("-ms-transform"===k||"-ms-filter"===k)&&delete a[k]}return void h.delay(c).animate(a,b,e)}var n={"default":"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};n[d]&&(d=n[d]),h.off(jQuery.CSS.transitionEnd+"."+g.id);var o=jQuery.CSS.getProp(a),p={};jQuery.extend(p,a),p[jQuery.CSS.sfx+"transition-property"]=o,p[jQuery.CSS.sfx+"transition-duration"]=b+"ms",p[jQuery.CSS.sfx+"transition-delay"]=c+"ms",p[jQuery.CSS.sfx+"transition-timing-function"]=d,setTimeout(function(){h.one(jQuery.CSS.transitionEnd+"."+g.id,f),h.css(p)},1),g.timeout=setTimeout(function(){return g.called||!e?(g.called=!1,void(g.CSSAIsRunning=!1)):(h.css(jQuery.CSS.sfx+"transition",""),e.apply(g),g.CSSAIsRunning=!1,void("function"==typeof g.CSSqueue&&(g.CSSqueue(),g.CSSqueue=null)))},b+c+10)}})}},jQuery.fn.CSSAnimate=jQuery.CSS.animate,jQuery.normalizeCss=jQuery.CSS.normalizeCss,jQuery.fn.css3=function(a){return this.each(function(){var b=jQuery(this),c=jQuery.normalizeCss(a);b.css(c)})};var nAgt=navigator.userAgent;if(!jQuery.browser){jQuery.browser={},jQuery.browser.mozilla=!1,jQuery.browser.webkit=!1,jQuery.browser.opera=!1,jQuery.browser.safari=!1,jQuery.browser.chrome=!1,jQuery.browser.msie=!1,jQuery.browser.ua=nAgt,jQuery.browser.name=navigator.appName,jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10);var nameOffset,verOffset,ix;if(-1!=(verOffset=nAgt.indexOf("Opera")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+6),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8));else if(-1!=(verOffset=nAgt.indexOf("OPR")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+4);else if(-1!=(verOffset=nAgt.indexOf("MSIE")))jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer",jQuery.browser.fullVersion=nAgt.substring(verOffset+5);else if(-1!=nAgt.indexOf("Trident")){jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer";var start=nAgt.indexOf("rv:")+3,end=start+4;jQuery.browser.fullVersion=nAgt.substring(start,end)}else-1!=(verOffset=nAgt.indexOf("Chrome"))?(jQuery.browser.webkit=!0,jQuery.browser.chrome=!0,jQuery.browser.name="Chrome",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1!=(verOffset=nAgt.indexOf("Safari"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("AppleWebkit"))?(jQuery.browser.webkit=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("Firefox"))?(jQuery.browser.mozilla=!0,jQuery.browser.name="Firefox",jQuery.browser.fullVersion=nAgt.substring(verOffset+8)):(nameOffset=nAgt.lastIndexOf(" ")+1)<(verOffset=nAgt.lastIndexOf("/"))&&(jQuery.browser.name=nAgt.substring(nameOffset,verOffset),jQuery.browser.fullVersion=nAgt.substring(verOffset+1),jQuery.browser.name.toLowerCase()==jQuery.browser.name.toUpperCase()&&(jQuery.browser.name=navigator.appName));-1!=(ix=jQuery.browser.fullVersion.indexOf(";"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),-1!=(ix=jQuery.browser.fullVersion.indexOf(" "))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),jQuery.browser.majorVersion=parseInt(""+jQuery.browser.fullVersion,10),isNaN(jQuery.browser.majorVersion)&&(jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10)),jQuery.browser.version=jQuery.browser.majorVersion}jQuery.browser.android=/Android/i.test(nAgt),jQuery.browser.blackberry=/BlackBerry|BB|PlayBook/i.test(nAgt),jQuery.browser.ios=/iPhone|iPad|iPod|webOS/i.test(nAgt),jQuery.browser.operaMobile=/Opera Mini/i.test(nAgt),jQuery.browser.windowsMobile=/IEMobile|Windows Phone/i.test(nAgt),jQuery.browser.kindle=/Kindle|Silk/i.test(nAgt),jQuery.browser.mobile=jQuery.browser.android||jQuery.browser.blackberry||jQuery.browser.ios||jQuery.browser.windowsMobile||jQuery.browser.operaMobile||jQuery.browser.kindle,jQuery.isMobile=jQuery.browser.mobile,jQuery.isTablet=jQuery.browser.mobile&&jQuery(window).width()>765,jQuery.isAndroidDefault=jQuery.browser.android&&!/chrome/i.test(nAgt),!function(a){/iphone|ipod|ipad|android|ie|blackberry|fennec/.test(navigator.userAgent.toLowerCase());var b="ontouchstart"in window||window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture||window.DocumentTouch&&document instanceof DocumentTouch||!1;a.simpleSlider={defaults:{initialval:0,scale:100,orientation:"h",readonly:!1,callback:!1},events:{start:b?"touchstart":"mousedown",end:b?"touchend":"mouseup",move:b?"touchmove":"mousemove"},init:function(c){return this.each(function(){var d=this,e=a(d);e.addClass("simpleSlider"),d.opt={},a.extend(d.opt,a.simpleSlider.defaults,c),a.extend(d.opt,e.data());var f="h"==d.opt.orientation?"horizontal":"vertical",g=a("<div/>").addClass("level").addClass(f);e.prepend(g),d.level=g,e.css({cursor:"default"}),"auto"==d.opt.scale&&(d.opt.scale=a(d).outerWidth()),e.updateSliderVal(),d.opt.readonly||(e.on(a.simpleSlider.events.start,function(a){b&&(a=a.changedTouches[0]),d.canSlide=!0,e.updateSliderVal(a),e.css({cursor:"col-resize"}),a.preventDefault(),a.stopPropagation()}),a(document).on(a.simpleSlider.events.move,function(c){b&&(c=c.changedTouches[0]),d.canSlide&&(a(document).css({cursor:"default"}),e.updateSliderVal(c),c.preventDefault(),c.stopPropagation())}).on(a.simpleSlider.events.end,function(){a(document).css({cursor:"auto"}),d.canSlide=!1,e.css({cursor:"auto"})}))})},updateSliderVal:function(b){function c(a,b){return Math.floor(100*a/b)}var d=this,e=d.get(0);e.opt.initialval="number"==typeof e.opt.initialval?e.opt.initialval:e.opt.initialval(e);var f=a(e).outerWidth(),g=a(e).outerHeight();e.x="object"==typeof b?b.clientX+document.body.scrollLeft-d.offset().left:"number"==typeof b?b*f/e.opt.scale:e.opt.initialval*f/e.opt.scale,e.y="object"==typeof b?b.clientY+document.body.scrollTop-d.offset().top:"number"==typeof b?(e.opt.scale-e.opt.initialval-b)*g/e.opt.scale:e.opt.initialval*g/e.opt.scale,e.y=d.outerHeight()-e.y,e.scaleX=e.x*e.opt.scale/f,e.scaleY=e.y*e.opt.scale/g,e.outOfRangeX=e.scaleX>e.opt.scale?e.scaleX-e.opt.scale:e.scaleX<0?e.scaleX:0,e.outOfRangeY=e.scaleY>e.opt.scale?e.scaleY-e.opt.scale:e.scaleY<0?e.scaleY:0,e.outOfRange="h"==e.opt.orientation?e.outOfRangeX:e.outOfRangeY,e.value="undefined"!=typeof b?"h"==e.opt.orientation?e.x>=d.outerWidth()?e.opt.scale:e.x<=0?0:e.scaleX:e.y>=d.outerHeight()?e.opt.scale:e.y<=0?0:e.scaleY:"h"==e.opt.orientation?e.scaleX:e.scaleY,"h"==e.opt.orientation?e.level.width(c(e.x,f)+"%"):e.level.height(c(e.y,g)),"function"==typeof e.opt.callback&&e.opt.callback(e)}},a.fn.simpleSlider=a.simpleSlider.init,a.fn.updateSliderVal=a.simpleSlider.updateSliderVal}(jQuery),!function(a){a.mbCookie={set:function(a,b,c,d){b=JSON.stringify(b),c||(c=7),d=d?"; domain="+d:"";var e,f=new Date;f.setTime(f.getTime()+864e5*c),e="; expires="+f.toGMTString(),document.cookie=a+"="+b+e+"; path=/"+d},get:function(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "==e.charAt(0);)e=e.substring(1,e.length);if(0==e.indexOf(b))return JSON.parse(e.substring(b.length,e.length))}return null},remove:function(b){a.mbCookie.set(b,"",-1)}},a.mbStorage={set:function(a,b){b=JSON.stringify(b),localStorage.setItem(a,b)},get:function(a){return localStorage[a]?JSON.parse(localStorage[a]):null},remove:function(a){a?localStorage.removeItem(a):localStorage.clear()}}}(jQuery);
assets/js/jquery.stats.js ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! odometer 0.4.7
2
+ * https://github.com/HubSpot/odometer
3
+ */
4
+ (function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G=[].slice;q='<span class="odometer-value"></span>',n='<span class="odometer-ribbon"><span class="odometer-ribbon-inner">'+q+"</span></span>",d='<span class="odometer-digit"><span class="odometer-digit-spacer">8</span><span class="odometer-digit-inner">'+n+"</span></span>",g='<span class="odometer-formatting-mark"></span>',c="(,ddd).dd",h=/^\(?([^)]*)\)?(?:(.)(d+))?$/,i=30,f=2e3,a=20,j=2,e=.5,k=1e3/i,b=1e3/a,o="transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",y=document.createElement("div").style,p=null!=y.transition||null!=y.webkitTransition||null!=y.mozTransition||null!=y.oTransition,w=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,l=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,s=function(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.children[0]},v=function(a,b){return a.className=a.className.replace(new RegExp("(^| )"+b.split(" ").join("|")+"( |$)","gi")," ")},r=function(a,b){return v(a,b),a.className+=" "+b},z=function(a,b){var c;return null!=document.createEvent?(c=document.createEvent("HTMLEvents"),c.initEvent(b,!0,!0),a.dispatchEvent(c)):void 0},u=function(){var a,b;return null!=(a=null!=(b=window.performance)&&"function"==typeof b.now?b.now():void 0)?a:+new Date},x=function(a,b){return null==b&&(b=0),b?(a*=Math.pow(10,b),a+=.5,a=Math.floor(a),a/=Math.pow(10,b)):Math.round(a)},A=function(a){return 0>a?Math.ceil(a):Math.floor(a)},t=function(a){return a-x(a)},C=!1,(B=function(){var a,b,c,d,e;if(!C&&null!=window.jQuery){for(C=!0,d=["html","text"],e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(function(a){var b;return b=window.jQuery.fn[a],window.jQuery.fn[a]=function(a){var c;return null==a||null==(null!=(c=this[0])?c.odometer:void 0)?b.apply(this,arguments):this[0].odometer.update(a)}}(a));return e}})(),setTimeout(B,0),m=function(){function a(b){var c,d,e,g,h,i,l,m,n,o,p=this;if(this.options=b,this.el=this.options.el,null!=this.el.odometer)return this.el.odometer;this.el.odometer=this,m=a.options;for(d in m)g=m[d],null==this.options[d]&&(this.options[d]=g);null==(h=this.options).duration&&(h.duration=f),this.MAX_VALUES=this.options.duration/k/j|0,this.resetFormat(),this.value=this.cleanValue(null!=(n=this.options.value)?n:""),this.renderInside(),this.render();try{for(o=["innerHTML","innerText","textContent"],i=0,l=o.length;l>i;i++)e=o[i],null!=this.el[e]&&!function(a){return Object.defineProperty(p.el,a,{get:function(){var b;return"innerHTML"===a?p.inside.outerHTML:null!=(b=p.inside.innerText)?b:p.inside.textContent},set:function(a){return p.update(a)}})}(e)}catch(q){c=q,this.watchForMutations()}}return a.prototype.renderInside=function(){return this.inside=document.createElement("div"),this.inside.className="odometer-inside",this.el.innerHTML="",this.el.appendChild(this.inside)},a.prototype.watchForMutations=function(){var a,b=this;if(null!=l)try{return null==this.observer&&(this.observer=new l(function(){var a;return a=b.el.innerText,b.renderInside(),b.render(b.value),b.update(a)})),this.watchMutations=!0,this.startWatchingMutations()}catch(c){a=c}},a.prototype.startWatchingMutations=function(){return this.watchMutations?this.observer.observe(this.el,{childList:!0}):void 0},a.prototype.stopWatchingMutations=function(){var a;return null!=(a=this.observer)?a.disconnect():void 0},a.prototype.cleanValue=function(a){var b;return"string"==typeof a&&(a=a.replace(null!=(b=this.format.radix)?b:".","<radix>"),a=a.replace(/[.,]/g,""),a=a.replace("<radix>","."),a=parseFloat(a,10)||0),x(a,this.format.precision)},a.prototype.bindTransitionEnd=function(){var a,b,c,d,e,f,g=this;if(!this.transitionEndBound){for(this.transitionEndBound=!0,b=!1,e=o.split(" "),f=[],c=0,d=e.length;d>c;c++)a=e[c],f.push(this.el.addEventListener(a,function(){return b?!0:(b=!0,setTimeout(function(){return g.render(),b=!1,z(g.el,"odometerdone")},0),!0)},!1));return f}},a.prototype.resetFormat=function(){var a,b,d,e,f,g,i,j;if(a=null!=(i=this.options.format)?i:c,a||(a="d"),d=h.exec(a),!d)throw new Error("Odometer: Unparsable digit format");return j=d.slice(1,4),g=j[0],f=j[1],b=j[2],e=(null!=b?b.length:void 0)||0,this.format={repeating:g,radix:f,precision:e}},a.prototype.render=function(a){var b,c,d,e,f,g,h;for(null==a&&(a=this.value),this.stopWatchingMutations(),this.resetFormat(),this.inside.innerHTML="",f=this.options.theme,b=this.el.className.split(" "),e=[],g=0,h=b.length;h>g;g++)c=b[g],c.length&&((d=/^odometer-theme-(.+)$/.exec(c))?f=d[1]:/^odometer(-|$)/.test(c)||e.push(c));return e.push("odometer"),p||e.push("odometer-no-transitions"),e.push(f?"odometer-theme-"+f:"odometer-auto-theme"),this.el.className=e.join(" "),this.ribbons={},this.formatDigits(a),this.startWatchingMutations()},a.prototype.formatDigits=function(a){var b,c,d,e,f,g,h,i,j,k;if(this.digits=[],this.options.formatFunction)for(d=this.options.formatFunction(a),j=d.split("").reverse(),f=0,h=j.length;h>f;f++)c=j[f],c.match(/0-9/)?(b=this.renderDigit(),b.querySelector(".odometer-value").innerHTML=c,this.digits.push(b),this.insertDigit(b)):this.addSpacer(c);else for(e=!this.format.precision||!t(a)||!1,k=a.toString().split("").reverse(),g=0,i=k.length;i>g;g++)b=k[g],"."===b&&(e=!0),this.addDigit(b,e)},a.prototype.update=function(a){var b,c=this;return a=this.cleanValue(a),(b=a-this.value)?(v(this.el,"odometer-animating-up odometer-animating-down odometer-animating"),b>0?r(this.el,"odometer-animating-up"):r(this.el,"odometer-animating-down"),this.stopWatchingMutations(),this.animate(a),this.startWatchingMutations(),setTimeout(function(){return c.el.offsetHeight,r(c.el,"odometer-animating")},0),this.value=a):void 0},a.prototype.renderDigit=function(){return s(d)},a.prototype.insertDigit=function(a,b){return null!=b?this.inside.insertBefore(a,b):this.inside.children.length?this.inside.insertBefore(a,this.inside.children[0]):this.inside.appendChild(a)},a.prototype.addSpacer=function(a,b,c){var d;return d=s(g),d.innerHTML=a,c&&r(d,c),this.insertDigit(d,b)},a.prototype.addDigit=function(a,b){var c,d,e,f;if(null==b&&(b=!0),"-"===a)return this.addSpacer(a,null,"odometer-negation-mark");if("."===a)return this.addSpacer(null!=(f=this.format.radix)?f:".",null,"odometer-radix-mark");if(b)for(e=!1;;){if(!this.format.repeating.length){if(e)throw new Error("Bad odometer format without digits");this.resetFormat(),e=!0}if(c=this.format.repeating[this.format.repeating.length-1],this.format.repeating=this.format.repeating.substring(0,this.format.repeating.length-1),"d"===c)break;this.addSpacer(c)}return d=this.renderDigit(),d.querySelector(".odometer-value").innerHTML=a,this.digits.push(d),this.insertDigit(d)},a.prototype.animate=function(a){return p&&"count"!==this.options.animation?this.animateSlide(a):this.animateCount(a)},a.prototype.animateCount=function(a){var c,d,e,f,g,h=this;if(d=+a-this.value)return f=e=u(),c=this.value,(g=function(){var i,j,k;return u()-f>h.options.duration?(h.value=a,h.render(),void z(h.el,"odometerdone")):(i=u()-e,i>b&&(e=u(),k=i/h.options.duration,j=d*k,c+=j,h.render(Math.round(c))),null!=w?w(g):setTimeout(g,b))})()},a.prototype.getDigitCount=function(){var a,b,c,d,e,f;for(d=1<=arguments.length?G.call(arguments,0):[],a=e=0,f=d.length;f>e;a=++e)c=d[a],d[a]=Math.abs(c);return b=Math.max.apply(Math,d),Math.ceil(Math.log(b+1)/Math.log(10))},a.prototype.getFractionalDigitCount=function(){var a,b,c,d,e,f,g;for(e=1<=arguments.length?G.call(arguments,0):[],b=/^\-?\d*\.(\d*?)0*$/,a=f=0,g=e.length;g>f;a=++f)d=e[a],e[a]=d.toString(),c=b.exec(e[a]),e[a]=null==c?0:c[1].length;return Math.max.apply(Math,e)},a.prototype.resetDigits=function(){return this.digits=[],this.ribbons=[],this.inside.innerHTML="",this.resetFormat()},a.prototype.animateSlide=function(a){var b,c,d,f,g,h,i,j,k,l,m,n,o,p,q,s,t,u,v,w,x,y,z,B,C,D,E;if(s=this.value,j=this.getFractionalDigitCount(s,a),j&&(a*=Math.pow(10,j),s*=Math.pow(10,j)),d=a-s){for(this.bindTransitionEnd(),f=this.getDigitCount(s,a),g=[],b=0,m=v=0;f>=0?f>v:v>f;m=f>=0?++v:--v){if(t=A(s/Math.pow(10,f-m-1)),i=A(a/Math.pow(10,f-m-1)),h=i-t,Math.abs(h)>this.MAX_VALUES){for(l=[],n=h/(this.MAX_VALUES+this.MAX_VALUES*b*e),c=t;h>0&&i>c||0>h&&c>i;)l.push(Math.round(c)),c+=n;l[l.length-1]!==i&&l.push(i),b++}else l=function(){E=[];for(var a=t;i>=t?i>=a:a>=i;i>=t?a++:a--)E.push(a);return E}.apply(this);for(m=w=0,y=l.length;y>w;m=++w)k=l[m],l[m]=Math.abs(k%10);g.push(l)}for(this.resetDigits(),D=g.reverse(),m=x=0,z=D.length;z>x;m=++x)for(l=D[m],this.digits[m]||this.addDigit(" ",m>=j),null==(u=this.ribbons)[m]&&(u[m]=this.digits[m].querySelector(".odometer-ribbon-inner")),this.ribbons[m].innerHTML="",0>d&&(l=l.reverse()),o=C=0,B=l.length;B>C;o=++C)k=l[o],q=document.createElement("div"),q.className="odometer-value",q.innerHTML=k,this.ribbons[m].appendChild(q),o===l.length-1&&r(q,"odometer-last-value"),0===o&&r(q,"odometer-first-value");return 0>t&&this.addDigit("-"),p=this.inside.querySelector(".odometer-radix-mark"),null!=p&&p.parent.removeChild(p),j?this.addSpacer(this.format.radix,this.digits[j-1],"odometer-radix-mark"):void 0}},a}(),m.options=null!=(E=window.odometerOptions)?E:{},setTimeout(function(){var a,b,c,d,e;if(window.odometerOptions){d=window.odometerOptions,e=[];for(a in d)b=d[a],e.push(null!=(c=m.options)[a]?(c=m.options)[a]:c[a]=b);return e}},0),m.init=function(){var a,b,c,d,e,f;if(null!=document.querySelectorAll){for(b=document.querySelectorAll(m.options.selector||".odometer"),f=[],c=0,d=b.length;d>c;c++)a=b[c],f.push(a.odometer=new m({el:a,value:null!=(e=a.innerText)?e:a.textContent}));return f}},null!=(null!=(F=document.documentElement)?F.doScroll:void 0)&&null!=document.createEventObject?(D=document.onreadystatechange,document.onreadystatechange=function(){return"complete"===document.readyState&&m.options.auto!==!1&&m.init(),null!=D?D.apply(this,arguments):void 0}):document.addEventListener("DOMContentLoaded",function(){return m.options.auto!==!1?m.init():void 0},!1),"function"==typeof define&&define.amd?define(["jquery"],function(){return m}):"undefined"!=typeof exports&&null!==exports?module.exports=m:window.Odometer=m}).call(this);
5
+
6
+ /*!
7
+ * The Final Countdown for jQuery v2.1.0 (http://hilios.github.io/jQuery.countdown/)
8
+ * Copyright (c) 2015 Edson Hilios
9
+ *
10
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
11
+ * this software and associated documentation files (the "Software"), to deal in
12
+ * the Software without restriction, including without limitation the rights to
13
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
14
+ * the Software, and to permit persons to whom the Software is furnished to do so,
15
+ * subject to the following conditions:
16
+ *
17
+ * The above copyright notice and this permission notice shall be included in all
18
+ * copies or substantial portions of the Software.
19
+ *
20
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
22
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
23
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
24
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
+ */
27
+ !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;g>f;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&10>m&&(m="0"+m.toString()),b=b.replace(j,m.toString()))}return b=b.replace(/%%/,"%")}}function e(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),1===Math.abs(b)?d:c}var f=[],g=[],h={precision:100,elapse:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",w:"weeks",d:"daysToWeek",D:"totalDays",H:"hours",M:"minutes",S:"seconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var b,c=void 0!==a._data(this.el,"events"),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&0>b?0:Math.abs(b),this.totalSecsLeft!==b&&c&&(this.totalSecsLeft=b,this.elapsed=d>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),totalDays:Math.floor(this.totalSecsLeft/60/60/24),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-d.getFullYear())},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});
28
+
29
+
30
+ /**!
31
+ * easyPieChart
32
+ * Lightweight plugin to render simple, animated and retina optimized pie charts
33
+ *
34
+ * @license Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
35
+ * @author Robert Fleischmann <rendro87@gmail.com> (http://robert-fleischmann.de)
36
+ * @version 2.1.1
37
+ **/
38
+ /**!
39
+ * easy-pie-chart
40
+ * Lightweight plugin to render simple, animated and retina optimized pie charts
41
+ *
42
+ * @license
43
+ * @author Robert Fleischmann <rendro87@gmail.com> (http://robert-fleischmann.de)
44
+ * @version 2.1.7
45
+ **/
46
+ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"object"==typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.trackWidth||b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:void 0,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(a,b){},onStep:function(a,b,c){},onStop:function(a,b){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));"string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?e.easing=jQuery.easing[e.easing]:e.easing=d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}});
47
+
48
+ /***********
49
+ Animates element's number to new number with commas
50
+ Parameters:
51
+ stop (number): number to stop on
52
+ commas (boolean): turn commas on/off (default is true)
53
+ duration (number): how long in ms (default is 1000)
54
+ ease (string): type of easing (default is "swing", others are avaiable from jQuery's easing plugin
55
+ Examples:
56
+ $("#div").animateNumbers(1234, false, 500, "linear"); // half second linear without commas
57
+ $("#div").animateNumbers(1234, true, 2000); // two second swing with commas
58
+ $("#div").animateNumbers(4321); // one second swing with commas
59
+ This fully expects an element containing an integer
60
+ If the number is within copy then separate it with a span and target the span
61
+ Inserts and accounts for commas during animation by default
62
+ ***********/
63
+
64
+ (function(e){e.fn.animateNumbers=function(t,n,r,i){return this.each(function(){var s=e(this);var o=parseInt(s.text().replace(/,/g,""));n=n===undefined?true:n;e({value:o}).animate({value:t},{duration:r==undefined?1e3:r,easing:i==undefined?"swing":i,step:function(){s.text(Math.floor(this.value));if(n){s.text(s.text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"))}},complete:function(){if(parseInt(s.text())!==t){s.text(t);if(n){s.text(s.text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"))}}}})})}})(jQuery);
assets/js/jquery.stats.min.js ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! odometer 0.4.7
2
+ * https://github.com/HubSpot/odometer
3
+ */
4
+ (function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G=[].slice;q='<span class="odometer-value"></span>',n='<span class="odometer-ribbon"><span class="odometer-ribbon-inner">'+q+"</span></span>",d='<span class="odometer-digit"><span class="odometer-digit-spacer">8</span><span class="odometer-digit-inner">'+n+"</span></span>",g='<span class="odometer-formatting-mark"></span>',c="(,ddd).dd",h=/^\(?([^)]*)\)?(?:(.)(d+))?$/,i=30,f=2e3,a=20,j=2,e=.5,k=1e3/i,b=1e3/a,o="transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",y=document.createElement("div").style,p=null!=y.transition||null!=y.webkitTransition||null!=y.mozTransition||null!=y.oTransition,w=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,l=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,s=function(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.children[0]},v=function(a,b){return a.className=a.className.replace(new RegExp("(^| )"+b.split(" ").join("|")+"( |$)","gi")," ")},r=function(a,b){return v(a,b),a.className+=" "+b},z=function(a,b){var c;return null!=document.createEvent?(c=document.createEvent("HTMLEvents"),c.initEvent(b,!0,!0),a.dispatchEvent(c)):void 0},u=function(){var a,b;return null!=(a=null!=(b=window.performance)&&"function"==typeof b.now?b.now():void 0)?a:+new Date},x=function(a,b){return null==b&&(b=0),b?(a*=Math.pow(10,b),a+=.5,a=Math.floor(a),a/=Math.pow(10,b)):Math.round(a)},A=function(a){return 0>a?Math.ceil(a):Math.floor(a)},t=function(a){return a-x(a)},C=!1,(B=function(){var a,b,c,d,e;if(!C&&null!=window.jQuery){for(C=!0,d=["html","text"],e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(function(a){var b;return b=window.jQuery.fn[a],window.jQuery.fn[a]=function(a){var c;return null==a||null==(null!=(c=this[0])?c.odometer:void 0)?b.apply(this,arguments):this[0].odometer.update(a)}}(a));return e}})(),setTimeout(B,0),m=function(){function a(b){var c,d,e,g,h,i,l,m,n,o,p=this;if(this.options=b,this.el=this.options.el,null!=this.el.odometer)return this.el.odometer;this.el.odometer=this,m=a.options;for(d in m)g=m[d],null==this.options[d]&&(this.options[d]=g);null==(h=this.options).duration&&(h.duration=f),this.MAX_VALUES=this.options.duration/k/j|0,this.resetFormat(),this.value=this.cleanValue(null!=(n=this.options.value)?n:""),this.renderInside(),this.render();try{for(o=["innerHTML","innerText","textContent"],i=0,l=o.length;l>i;i++)e=o[i],null!=this.el[e]&&!function(a){return Object.defineProperty(p.el,a,{get:function(){var b;return"innerHTML"===a?p.inside.outerHTML:null!=(b=p.inside.innerText)?b:p.inside.textContent},set:function(a){return p.update(a)}})}(e)}catch(q){c=q,this.watchForMutations()}}return a.prototype.renderInside=function(){return this.inside=document.createElement("div"),this.inside.className="odometer-inside",this.el.innerHTML="",this.el.appendChild(this.inside)},a.prototype.watchForMutations=function(){var a,b=this;if(null!=l)try{return null==this.observer&&(this.observer=new l(function(){var a;return a=b.el.innerText,b.renderInside(),b.render(b.value),b.update(a)})),this.watchMutations=!0,this.startWatchingMutations()}catch(c){a=c}},a.prototype.startWatchingMutations=function(){return this.watchMutations?this.observer.observe(this.el,{childList:!0}):void 0},a.prototype.stopWatchingMutations=function(){var a;return null!=(a=this.observer)?a.disconnect():void 0},a.prototype.cleanValue=function(a){var b;return"string"==typeof a&&(a=a.replace(null!=(b=this.format.radix)?b:".","<radix>"),a=a.replace(/[.,]/g,""),a=a.replace("<radix>","."),a=parseFloat(a,10)||0),x(a,this.format.precision)},a.prototype.bindTransitionEnd=function(){var a,b,c,d,e,f,g=this;if(!this.transitionEndBound){for(this.transitionEndBound=!0,b=!1,e=o.split(" "),f=[],c=0,d=e.length;d>c;c++)a=e[c],f.push(this.el.addEventListener(a,function(){return b?!0:(b=!0,setTimeout(function(){return g.render(),b=!1,z(g.el,"odometerdone")},0),!0)},!1));return f}},a.prototype.resetFormat=function(){var a,b,d,e,f,g,i,j;if(a=null!=(i=this.options.format)?i:c,a||(a="d"),d=h.exec(a),!d)throw new Error("Odometer: Unparsable digit format");return j=d.slice(1,4),g=j[0],f=j[1],b=j[2],e=(null!=b?b.length:void 0)||0,this.format={repeating:g,radix:f,precision:e}},a.prototype.render=function(a){var b,c,d,e,f,g,h;for(null==a&&(a=this.value),this.stopWatchingMutations(),this.resetFormat(),this.inside.innerHTML="",f=this.options.theme,b=this.el.className.split(" "),e=[],g=0,h=b.length;h>g;g++)c=b[g],c.length&&((d=/^odometer-theme-(.+)$/.exec(c))?f=d[1]:/^odometer(-|$)/.test(c)||e.push(c));return e.push("odometer"),p||e.push("odometer-no-transitions"),e.push(f?"odometer-theme-"+f:"odometer-auto-theme"),this.el.className=e.join(" "),this.ribbons={},this.formatDigits(a),this.startWatchingMutations()},a.prototype.formatDigits=function(a){var b,c,d,e,f,g,h,i,j,k;if(this.digits=[],this.options.formatFunction)for(d=this.options.formatFunction(a),j=d.split("").reverse(),f=0,h=j.length;h>f;f++)c=j[f],c.match(/0-9/)?(b=this.renderDigit(),b.querySelector(".odometer-value").innerHTML=c,this.digits.push(b),this.insertDigit(b)):this.addSpacer(c);else for(e=!this.format.precision||!t(a)||!1,k=a.toString().split("").reverse(),g=0,i=k.length;i>g;g++)b=k[g],"."===b&&(e=!0),this.addDigit(b,e)},a.prototype.update=function(a){var b,c=this;return a=this.cleanValue(a),(b=a-this.value)?(v(this.el,"odometer-animating-up odometer-animating-down odometer-animating"),b>0?r(this.el,"odometer-animating-up"):r(this.el,"odometer-animating-down"),this.stopWatchingMutations(),this.animate(a),this.startWatchingMutations(),setTimeout(function(){return c.el.offsetHeight,r(c.el,"odometer-animating")},0),this.value=a):void 0},a.prototype.renderDigit=function(){return s(d)},a.prototype.insertDigit=function(a,b){return null!=b?this.inside.insertBefore(a,b):this.inside.children.length?this.inside.insertBefore(a,this.inside.children[0]):this.inside.appendChild(a)},a.prototype.addSpacer=function(a,b,c){var d;return d=s(g),d.innerHTML=a,c&&r(d,c),this.insertDigit(d,b)},a.prototype.addDigit=function(a,b){var c,d,e,f;if(null==b&&(b=!0),"-"===a)return this.addSpacer(a,null,"odometer-negation-mark");if("."===a)return this.addSpacer(null!=(f=this.format.radix)?f:".",null,"odometer-radix-mark");if(b)for(e=!1;;){if(!this.format.repeating.length){if(e)throw new Error("Bad odometer format without digits");this.resetFormat(),e=!0}if(c=this.format.repeating[this.format.repeating.length-1],this.format.repeating=this.format.repeating.substring(0,this.format.repeating.length-1),"d"===c)break;this.addSpacer(c)}return d=this.renderDigit(),d.querySelector(".odometer-value").innerHTML=a,this.digits.push(d),this.insertDigit(d)},a.prototype.animate=function(a){return p&&"count"!==this.options.animation?this.animateSlide(a):this.animateCount(a)},a.prototype.animateCount=function(a){var c,d,e,f,g,h=this;if(d=+a-this.value)return f=e=u(),c=this.value,(g=function(){var i,j,k;return u()-f>h.options.duration?(h.value=a,h.render(),void z(h.el,"odometerdone")):(i=u()-e,i>b&&(e=u(),k=i/h.options.duration,j=d*k,c+=j,h.render(Math.round(c))),null!=w?w(g):setTimeout(g,b))})()},a.prototype.getDigitCount=function(){var a,b,c,d,e,f;for(d=1<=arguments.length?G.call(arguments,0):[],a=e=0,f=d.length;f>e;a=++e)c=d[a],d[a]=Math.abs(c);return b=Math.max.apply(Math,d),Math.ceil(Math.log(b+1)/Math.log(10))},a.prototype.getFractionalDigitCount=function(){var a,b,c,d,e,f,g;for(e=1<=arguments.length?G.call(arguments,0):[],b=/^\-?\d*\.(\d*?)0*$/,a=f=0,g=e.length;g>f;a=++f)d=e[a],e[a]=d.toString(),c=b.exec(e[a]),e[a]=null==c?0:c[1].length;return Math.max.apply(Math,e)},a.prototype.resetDigits=function(){return this.digits=[],this.ribbons=[],this.inside.innerHTML="",this.resetFormat()},a.prototype.animateSlide=function(a){var b,c,d,f,g,h,i,j,k,l,m,n,o,p,q,s,t,u,v,w,x,y,z,B,C,D,E;if(s=this.value,j=this.getFractionalDigitCount(s,a),j&&(a*=Math.pow(10,j),s*=Math.pow(10,j)),d=a-s){for(this.bindTransitionEnd(),f=this.getDigitCount(s,a),g=[],b=0,m=v=0;f>=0?f>v:v>f;m=f>=0?++v:--v){if(t=A(s/Math.pow(10,f-m-1)),i=A(a/Math.pow(10,f-m-1)),h=i-t,Math.abs(h)>this.MAX_VALUES){for(l=[],n=h/(this.MAX_VALUES+this.MAX_VALUES*b*e),c=t;h>0&&i>c||0>h&&c>i;)l.push(Math.round(c)),c+=n;l[l.length-1]!==i&&l.push(i),b++}else l=function(){E=[];for(var a=t;i>=t?i>=a:a>=i;i>=t?a++:a--)E.push(a);return E}.apply(this);for(m=w=0,y=l.length;y>w;m=++w)k=l[m],l[m]=Math.abs(k%10);g.push(l)}for(this.resetDigits(),D=g.reverse(),m=x=0,z=D.length;z>x;m=++x)for(l=D[m],this.digits[m]||this.addDigit(" ",m>=j),null==(u=this.ribbons)[m]&&(u[m]=this.digits[m].querySelector(".odometer-ribbon-inner")),this.ribbons[m].innerHTML="",0>d&&(l=l.reverse()),o=C=0,B=l.length;B>C;o=++C)k=l[o],q=document.createElement("div"),q.className="odometer-value",q.innerHTML=k,this.ribbons[m].appendChild(q),o===l.length-1&&r(q,"odometer-last-value"),0===o&&r(q,"odometer-first-value");return 0>t&&this.addDigit("-"),p=this.inside.querySelector(".odometer-radix-mark"),null!=p&&p.parent.removeChild(p),j?this.addSpacer(this.format.radix,this.digits[j-1],"odometer-radix-mark"):void 0}},a}(),m.options=null!=(E=window.odometerOptions)?E:{},setTimeout(function(){var a,b,c,d,e;if(window.odometerOptions){d=window.odometerOptions,e=[];for(a in d)b=d[a],e.push(null!=(c=m.options)[a]?(c=m.options)[a]:c[a]=b);return e}},0),m.init=function(){var a,b,c,d,e,f;if(null!=document.querySelectorAll){for(b=document.querySelectorAll(m.options.selector||".odometer"),f=[],c=0,d=b.length;d>c;c++)a=b[c],f.push(a.odometer=new m({el:a,value:null!=(e=a.innerText)?e:a.textContent}));return f}},null!=(null!=(F=document.documentElement)?F.doScroll:void 0)&&null!=document.createEventObject?(D=document.onreadystatechange,document.onreadystatechange=function(){return"complete"===document.readyState&&m.options.auto!==!1&&m.init(),null!=D?D.apply(this,arguments):void 0}):document.addEventListener("DOMContentLoaded",function(){return m.options.auto!==!1?m.init():void 0},!1),"function"==typeof define&&define.amd?define(["jquery"],function(){return m}):"undefined"!=typeof exports&&null!==exports?module.exports=m:window.Odometer=m}).call(this);
5
+
6
+ /*!
7
+ * The Final Countdown for jQuery v2.1.0 (http://hilios.github.io/jQuery.countdown/)
8
+ * Copyright (c) 2015 Edson Hilios
9
+ *
10
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
11
+ * this software and associated documentation files (the "Software"), to deal in
12
+ * the Software without restriction, including without limitation the rights to
13
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
14
+ * the Software, and to permit persons to whom the Software is furnished to do so,
15
+ * subject to the following conditions:
16
+ *
17
+ * The above copyright notice and this permission notice shall be included in all
18
+ * copies or substantial portions of the Software.
19
+ *
20
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
22
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
23
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
24
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
+ */
27
+ !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;g>f;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&10>m&&(m="0"+m.toString()),b=b.replace(j,m.toString()))}return b=b.replace(/%%/,"%")}}function e(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),1===Math.abs(b)?d:c}var f=[],g=[],h={precision:100,elapse:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",w:"weeks",d:"daysToWeek",D:"totalDays",H:"hours",M:"minutes",S:"seconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var b,c=void 0!==a._data(this.el,"events"),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&0>b?0:Math.abs(b),this.totalSecsLeft!==b&&c&&(this.totalSecsLeft=b,this.elapsed=d>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),totalDays:Math.floor(this.totalSecsLeft/60/60/24),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-d.getFullYear())},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});
28
+
29
+
30
+ /**!
31
+ * easy-pie-chart
32
+ * Lightweight plugin to render simple, animated and retina optimized pie charts
33
+ *
34
+ * @license
35
+ * @author Robert Fleischmann <rendro87@gmail.com> (http://robert-fleischmann.de)
36
+ * @version 2.1.7
37
+ **/
38
+ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"object"==typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.trackWidth||b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:void 0,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(a,b){},onStep:function(a,b,c){},onStop:function(a,b){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));"string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?e.easing=jQuery.easing[e.easing]:e.easing=d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}});
39
+
40
+
41
+ /***********
42
+ Animates element's number to new number with commas
43
+ Parameters:
44
+ stop (number): number to stop on
45
+ commas (boolean): turn commas on/off (default is true)
46
+ duration (number): how long in ms (default is 1000)
47
+ ease (string): type of easing (default is "swing", others are avaiable from jQuery's easing plugin
48
+ Examples:
49
+ $("#div").animateNumbers(1234, false, 500, "linear"); // half second linear without commas
50
+ $("#div").animateNumbers(1234, true, 2000); // two second swing with commas
51
+ $("#div").animateNumbers(4321); // one second swing with commas
52
+ This fully expects an element containing an integer
53
+ If the number is within copy then separate it with a span and target the span
54
+ Inserts and accounts for commas during animation by default
55
+ ***********/
56
+
57
+ (function(e){e.fn.animateNumbers=function(t,n,r,i){return this.each(function(){var s=e(this);var o=parseInt(s.text().replace(/,/g,""));n=n===undefined?true:n;e({value:o}).animate({value:t},{duration:r==undefined?1e3:r,easing:i==undefined?"swing":i,step:function(){s.text(Math.floor(this.value));if(n){s.text(s.text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"))}},complete:function(){if(parseInt(s.text())!==t){s.text(t);if(n){s.text(s.text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"))}}}})})}})(jQuery);
assets/js/jquery.waypoints.js ADDED
@@ -0,0 +1,502 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Generated by CoffeeScript 1.4.0
2
+
3
+ /*
4
+ jQuery Waypoints - v2.0.2
5
+ Copyright (c) 2011-2013 Caleb Troughton
6
+ Dual licensed under the MIT license and GPL license.
7
+ https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt
8
+ */
9
+
10
+
11
+ (function() {
12
+ var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
13
+ __slice = [].slice;
14
+
15
+ (function(root, factory) {
16
+ if (typeof define === 'function' && define.amd) {
17
+ return define('waypoints', ['jquery'], function($) {
18
+ return factory($, root);
19
+ });
20
+ } else {
21
+ return factory(root.jQuery, root);
22
+ }
23
+ })(this, function($, window) {
24
+ var $w, Context, Waypoint, allWaypoints, contextCounter, contextKey, contexts, isTouch, jQMethods, methods, resizeEvent, scrollEvent, waypointCounter, waypointKey, wp, wps;
25
+ $w = $(window);
26
+ isTouch = __indexOf.call(window, 'ontouchstart') >= 0;
27
+ allWaypoints = {
28
+ horizontal: {},
29
+ vertical: {}
30
+ };
31
+ contextCounter = 1;
32
+ contexts = {};
33
+ contextKey = 'waypoints-context-id';
34
+ resizeEvent = 'resize.waypoints';
35
+ scrollEvent = 'scroll.waypoints';
36
+ waypointCounter = 1;
37
+ waypointKey = 'waypoints-waypoint-ids';
38
+ wp = 'waypoint';
39
+ wps = 'waypoints';
40
+ Context = (function() {
41
+
42
+ function Context($element) {
43
+ var _this = this;
44
+ this.$element = $element;
45
+ this.element = $element[0];
46
+ this.didResize = false;
47
+ this.didScroll = false;
48
+ this.id = 'context' + contextCounter++;
49
+ this.oldScroll = {
50
+ x: $element.scrollLeft(),
51
+ y: $element.scrollTop()
52
+ };
53
+ this.waypoints = {
54
+ horizontal: {},
55
+ vertical: {}
56
+ };
57
+ $element.data(contextKey, this.id);
58
+ contexts[this.id] = this;
59
+ $element.bind(scrollEvent, function() {
60
+ var scrollHandler;
61
+ if (!(_this.didScroll || isTouch)) {
62
+ _this.didScroll = true;
63
+ scrollHandler = function() {
64
+ _this.doScroll();
65
+ return _this.didScroll = false;
66
+ };
67
+ return window.setTimeout(scrollHandler, $[wps].settings.scrollThrottle);
68
+ }
69
+ });
70
+ $element.bind(resizeEvent, function() {
71
+ var resizeHandler;
72
+ if (!_this.didResize) {
73
+ _this.didResize = true;
74
+ resizeHandler = function() {
75
+ $[wps]('refresh');
76
+ return _this.didResize = false;
77
+ };
78
+ return window.setTimeout(resizeHandler, $[wps].settings.resizeThrottle);
79
+ }
80
+ });
81
+ }
82
+
83
+ Context.prototype.doScroll = function() {
84
+ var axes,
85
+ _this = this;
86
+ axes = {
87
+ horizontal: {
88
+ newScroll: this.$element.scrollLeft(),
89
+ oldScroll: this.oldScroll.x,
90
+ forward: 'right',
91
+ backward: 'left'
92
+ },
93
+ vertical: {
94
+ newScroll: this.$element.scrollTop(),
95
+ oldScroll: this.oldScroll.y,
96
+ forward: 'down',
97
+ backward: 'up'
98
+ }
99
+ };
100
+ if (isTouch && (!axes.vertical.oldScroll || !axes.vertical.newScroll)) {
101
+ $[wps]('refresh');
102
+ }
103
+ $.each(axes, function(aKey, axis) {
104
+ var direction, isForward, triggered;
105
+ triggered = [];
106
+ isForward = axis.newScroll > axis.oldScroll;
107
+ direction = isForward ? axis.forward : axis.backward;
108
+ $.each(_this.waypoints[aKey], function(wKey, waypoint) {
109
+ var _ref, _ref1;
110
+ if ((axis.oldScroll < (_ref = waypoint.offset) && _ref <= axis.newScroll)) {
111
+ return triggered.push(waypoint);
112
+ } else if ((axis.newScroll < (_ref1 = waypoint.offset) && _ref1 <= axis.oldScroll)) {
113
+ return triggered.push(waypoint);
114
+ }
115
+ });
116
+ triggered.sort(function(a, b) {
117
+ return a.offset - b.offset;
118
+ });
119
+ if (!isForward) {
120
+ triggered.reverse();
121
+ }
122
+ return $.each(triggered, function(i, waypoint) {
123
+ if (waypoint.options.continuous || i === triggered.length - 1) {
124
+ return waypoint.trigger([direction]);
125
+ }
126
+ });
127
+ });
128
+ return this.oldScroll = {
129
+ x: axes.horizontal.newScroll,
130
+ y: axes.vertical.newScroll
131
+ };
132
+ };
133
+
134
+ Context.prototype.refresh = function() {
135
+ var axes, cOffset, isWin,
136
+ _this = this;
137
+ isWin = $.isWindow(this.element);
138
+ cOffset = this.$element.offset();
139
+ this.doScroll();
140
+ axes = {
141
+ horizontal: {
142
+ contextOffset: isWin ? 0 : cOffset.left,
143
+ contextScroll: isWin ? 0 : this.oldScroll.x,
144
+ contextDimension: this.$element.width(),
145
+ oldScroll: this.oldScroll.x,
146
+ forward: 'right',
147
+ backward: 'left',
148
+ offsetProp: 'left'
149
+ },
150
+ vertical: {
151
+ contextOffset: isWin ? 0 : cOffset.top,
152
+ contextScroll: isWin ? 0 : this.oldScroll.y,
153
+ contextDimension: isWin ? $[wps]('viewportHeight') : this.$element.height(),
154
+ oldScroll: this.oldScroll.y,
155
+ forward: 'down',
156
+ backward: 'up',
157
+ offsetProp: 'top'
158
+ }
159
+ };
160
+ return $.each(axes, function(aKey, axis) {
161
+ return $.each(_this.waypoints[aKey], function(i, waypoint) {
162
+ var adjustment, elementOffset, oldOffset, _ref, _ref1;
163
+ adjustment = waypoint.options.offset;
164
+ oldOffset = waypoint.offset;
165
+ elementOffset = $.isWindow(waypoint.element) ? 0 : waypoint.$element.offset()[axis.offsetProp];
166
+ if ($.isFunction(adjustment)) {
167
+ adjustment = adjustment.apply(waypoint.element);
168
+ } else if (typeof adjustment === 'string') {
169
+ adjustment = parseFloat(adjustment);
170
+ if (waypoint.options.offset.indexOf('%') > -1) {
171
+ adjustment = Math.ceil(axis.contextDimension * adjustment / 100);
172
+ }
173
+ }
174
+ waypoint.offset = elementOffset - axis.contextOffset + axis.contextScroll - adjustment;
175
+ if ((waypoint.options.onlyOnScroll && (oldOffset != null)) || !waypoint.enabled) {
176
+ return;
177
+ }
178
+ if (oldOffset !== null && (oldOffset < (_ref = axis.oldScroll) && _ref <= waypoint.offset)) {
179
+ return waypoint.trigger([axis.backward]);
180
+ } else if (oldOffset !== null && (oldOffset > (_ref1 = axis.oldScroll) && _ref1 >= waypoint.offset)) {
181
+ return waypoint.trigger([axis.forward]);
182
+ } else if (oldOffset === null && axis.oldScroll >= waypoint.offset) {
183
+ return waypoint.trigger([axis.forward]);
184
+ }
185
+ });
186
+ });
187
+ };
188
+
189
+ Context.prototype.checkEmpty = function() {
190
+ if ($.isEmptyObject(this.waypoints.horizontal) && $.isEmptyObject(this.waypoints.vertical)) {
191
+ this.$element.unbind([resizeEvent, scrollEvent].join(' '));
192
+ return delete contexts[this.id];
193
+ }
194
+ };
195
+
196
+ return Context;
197
+
198
+ })();
199
+ Waypoint = (function() {
200
+
201
+ function Waypoint($element, context, options) {
202
+ var idList, _ref;
203
+ options = $.extend({}, $.fn[wp].defaults, options);
204
+ if (options.offset === 'bottom-in-view') {
205
+ options.offset = function() {
206
+ var contextHeight;
207
+ contextHeight = $[wps]('viewportHeight');
208
+ if (!$.isWindow(context.element)) {
209
+ contextHeight = context.$element.height();
210
+ }
211
+ return contextHeight - $(this).outerHeight();
212
+ };
213
+ }
214
+ this.$element = $element;
215
+ this.element = $element[0];
216
+ this.axis = options.horizontal ? 'horizontal' : 'vertical';
217
+ this.callback = options.handler;
218
+ this.context = context;
219
+ this.enabled = options.enabled;
220
+ this.id = 'waypoints' + waypointCounter++;
221
+ this.offset = null;
222
+ this.options = options;
223
+ context.waypoints[this.axis][this.id] = this;
224
+ allWaypoints[this.axis][this.id] = this;
225
+ idList = (_ref = $element.data(waypointKey)) != null ? _ref : [];
226
+ idList.push(this.id);
227
+ $element.data(waypointKey, idList);
228
+ }
229
+
230
+ Waypoint.prototype.trigger = function(args) {
231
+ if (!this.enabled) {
232
+ return;
233
+ }
234
+ if (this.callback != null) {
235
+ this.callback.apply(this.element, args);
236
+ }
237
+ if (this.options.triggerOnce) {
238
+ return this.destroy();
239
+ }
240
+ };
241
+
242
+ Waypoint.prototype.disable = function() {
243
+ return this.enabled = false;
244
+ };
245
+
246
+ Waypoint.prototype.enable = function() {
247
+ this.context.refresh();
248
+ return this.enabled = true;
249
+ };
250
+
251
+ Waypoint.prototype.destroy = function() {
252
+ delete allWaypoints[this.axis][this.id];
253
+ delete this.context.waypoints[this.axis][this.id];
254
+ return this.context.checkEmpty();
255
+ };
256
+
257
+ Waypoint.getWaypointsByElement = function(element) {
258
+ var all, ids;
259
+ ids = $(element).data(waypointKey);
260
+ if (!ids) {
261
+ return [];
262
+ }
263
+ all = $.extend({}, allWaypoints.horizontal, allWaypoints.vertical);
264
+ return $.map(ids, function(id) {
265
+ return all[id];
266
+ });
267
+ };
268
+
269
+ return Waypoint;
270
+
271
+ })();
272
+ methods = {
273
+ init: function(f, options) {
274
+ var _ref;
275
+ if (options == null) {
276
+ options = {};
277
+ }
278
+ if ((_ref = options.handler) == null) {
279
+ options.handler = f;
280
+ }
281
+ this.each(function() {
282
+ var $this, context, contextElement, _ref1;
283
+ $this = $(this);
284
+ contextElement = (_ref1 = options.context) != null ? _ref1 : $.fn[wp].defaults.context;
285
+ if (!$.isWindow(contextElement)) {
286
+ contextElement = $this.closest(contextElement);
287
+ }
288
+ contextElement = $(contextElement);
289
+ context = contexts[contextElement.data(contextKey)];
290
+ if (!context) {
291
+ context = new Context(contextElement);
292
+ }
293
+ return new Waypoint($this, context, options);
294
+ });
295
+ $[wps]('refresh');
296
+ return this;
297
+ },
298
+ disable: function() {
299
+ return methods._invoke(this, 'disable');
300
+ },
301
+ enable: function() {
302
+ return methods._invoke(this, 'enable');
303
+ },
304
+ destroy: function() {
305
+ return methods._invoke(this, 'destroy');
306
+ },
307
+ prev: function(axis, selector) {
308
+ return methods._traverse.call(this, axis, selector, function(stack, index, waypoints) {
309
+ if (index > 0) {
310
+ return stack.push(waypoints[index - 1]);
311
+ }
312
+ });
313
+ },
314
+ next: function(axis, selector) {
315
+ return methods._traverse.call(this, axis, selector, function(stack, index, waypoints) {
316
+ if (index < waypoints.length - 1) {
317
+ return stack.push(waypoints[index + 1]);
318
+ }
319
+ });
320
+ },
321
+ _traverse: function(axis, selector, push) {
322
+ var stack, waypoints;
323
+ if (axis == null) {
324
+ axis = 'vertical';
325
+ }
326
+ if (selector == null) {
327
+ selector = window;
328
+ }
329
+ waypoints = jQMethods.aggregate(selector);
330
+ stack = [];
331
+ this.each(function() {
332
+ var index;
333
+ index = $.inArray(this, waypoints[axis]);
334
+ return push(stack, index, waypoints[axis]);
335
+ });
336
+ return this.pushStack(stack);
337
+ },
338
+ _invoke: function($elements, method) {
339
+ $elements.each(function() {
340
+ var waypoints;
341
+ waypoints = Waypoint.getWaypointsByElement(this);
342
+ return $.each(waypoints, function(i, waypoint) {
343
+ waypoint[method]();
344
+ return true;
345
+ });
346
+ });
347
+ return this;
348
+ }
349
+ };
350
+ $.fn[wp] = function() {
351
+ var args, method;
352
+ method = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
353
+ if (methods[method]) {
354
+ return methods[method].apply(this, args);
355
+ } else if ($.isFunction(method)) {
356
+ return methods.init.apply(this, arguments);
357
+ } else if ($.isPlainObject(method)) {
358
+ return methods.init.apply(this, [null, method]);
359
+ } else if (!method) {
360
+ return $.error("jQuery Waypoints needs a callback function or handler option.");
361
+ } else {
362
+ return $.error("The " + method + " method does not exist in jQuery Waypoints.");
363
+ }
364
+ };
365
+ $.fn[wp].defaults = {
366
+ context: window,
367
+ continuous: true,
368
+ enabled: true,
369
+ horizontal: false,
370
+ offset: 0,
371
+ triggerOnce: false
372
+ };
373
+ jQMethods = {
374
+ refresh: function() {
375
+ return $.each(contexts, function(i, context) {
376
+ return context.refresh();
377
+ });
378
+ },
379
+ viewportHeight: function() {
380
+ var _ref;
381
+ return (_ref = window.innerHeight) != null ? _ref : $w.height();
382
+ },
383
+ aggregate: function(contextSelector) {
384
+ var collection, waypoints, _ref;
385
+ collection = allWaypoints;
386
+ if (contextSelector) {
387
+ collection = (_ref = contexts[$(contextSelector).data(contextKey)]) != null ? _ref.waypoints : void 0;
388
+ }
389
+ if (!collection) {
390
+ return [];
391
+ }
392
+ waypoints = {
393
+ horizontal: [],
394
+ vertical: []
395
+ };
396
+ $.each(waypoints, function(axis, arr) {
397
+ $.each(collection[axis], function(key, waypoint) {
398
+ return arr.push(waypoint);
399
+ });
400
+ arr.sort(function(a, b) {
401
+ return a.offset - b.offset;
402
+ });
403
+ waypoints[axis] = $.map(arr, function(waypoint) {
404
+ return waypoint.element;
405
+ });
406
+ return waypoints[axis] = $.unique(waypoints[axis]);
407
+ });
408
+ return waypoints;
409
+ },
410
+ above: function(contextSelector) {
411
+ if (contextSelector == null) {
412
+ contextSelector = window;
413
+ }
414
+ return jQMethods._filter(contextSelector, 'vertical', function(context, waypoint) {
415
+ return waypoint.offset <= context.oldScroll.y;
416
+ });
417
+ },
418
+ below: function(contextSelector) {
419
+ if (contextSelector == null) {
420
+ contextSelector = window;
421
+ }
422
+ return jQMethods._filter(contextSelector, 'vertical', function(context, waypoint) {
423
+ return waypoint.offset > context.oldScroll.y;
424
+ });
425
+ },
426
+ left: function(contextSelector) {
427
+ if (contextSelector == null) {
428
+ contextSelector = window;
429
+ }
430
+ return jQMethods._filter(contextSelector, 'horizontal', function(context, waypoint) {
431
+ return waypoint.offset <= context.oldScroll.x;
432
+ });
433
+ },
434
+ right: function(contextSelector) {
435
+ if (contextSelector == null) {
436
+ contextSelector = window;
437
+ }
438
+ return jQMethods._filter(contextSelector, 'horizontal', function(context, waypoint) {
439
+ return waypoint.offset > context.oldScroll.x;
440
+ });
441
+ },
442
+ enable: function() {
443
+ return jQMethods._invoke('enable');
444
+ },
445
+ disable: function() {
446
+ return jQMethods._invoke('disable');
447
+ },
448
+ destroy: function() {
449
+ return jQMethods._invoke('destroy');
450
+ },
451
+ extendFn: function(methodName, f) {
452
+ return methods[methodName] = f;
453
+ },
454
+ _invoke: function(method) {
455
+ var waypoints;
456
+ waypoints = $.extend({}, allWaypoints.vertical, allWaypoints.horizontal);
457
+ return $.each(waypoints, function(key, waypoint) {
458
+ waypoint[method]();
459
+ return true;
460
+ });
461
+ },
462
+ _filter: function(selector, axis, test) {
463
+ var context, waypoints;
464
+ context = contexts[$(selector).data(contextKey)];
465
+ if (!context) {
466
+ return [];
467
+ }
468
+ waypoints = [];
469
+ $.each(context.waypoints[axis], function(i, waypoint) {
470
+ if (test(context, waypoint)) {
471
+ return waypoints.push(waypoint);
472
+ }
473
+ });
474
+ waypoints.sort(function(a, b) {
475
+ return a.offset - b.offset;
476
+ });
477
+ return $.map(waypoints, function(waypoint) {
478
+ return waypoint.element;
479
+ });
480
+ }
481
+ };
482
+ $[wps] = function() {
483
+ var args, method;
484
+ method = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
485
+ if (jQMethods[method]) {
486
+ return jQMethods[method].apply(null, args);
487
+ } else {
488
+ return jQMethods.aggregate.call(null, method);
489
+ }
490
+ };
491
+ $[wps].settings = {
492
+ resizeThrottle: 100,
493
+ scrollThrottle: 30
494
+ };
495
+ return $w.load(function() {
496
+ return $[wps]('refresh');
497
+ });
498
+ });
499
+
500
+ }).call(this);
501
+
502
+
assets/js/jquery.waypoints.min.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ // Generated by CoffeeScript 1.4.0
2
+ /*
3
+ jQuery Waypoints - v2.0.2
4
+ Copyright (c) 2011-2013 Caleb Troughton
5
+ Dual licensed under the MIT license and GPL license.
6
+ https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt
7
+ */
8
+ (function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++){if(e in this&&this[e]===t)return e}return-1},e=[].slice;(function(t,e){if(typeof define==="function"&&define.amd){return define("waypoints",["jquery"],function(n){return e(n,t)})}else{return e(t.jQuery,t)}})(this,function(n,r){var i,o,l,s,f,u,a,c,h,d,p,y,v,w,g,m;i=n(r);c=t.call(r,"ontouchstart")>=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e<n.length-1){return t.push(n[e+1])}})},_traverse:function(t,e,i){var o,l;if(t==null){t="vertical"}if(e==null){e=r}l=h.aggregate(e);o=[];this.each(function(){var e;e=n.inArray(this,l[t]);return i(o,e,l[t])});return this.pushStack(o)},_invoke:function(t,e){t.each(function(){var t;t=l.getWaypointsByElement(this);return n.each(t,function(t,n){n[e]();return true})});return this}};n.fn[g]=function(){var t,r;r=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(d[r]){return d[r].apply(this,t)}else if(n.isFunction(r)){return d.init.apply(this,arguments)}else if(n.isPlainObject(r)){return d.init.apply(this,[null,r])}else if(!r){return n.error("jQuery Waypoints needs a callback function or handler option.")}else{return n.error("The "+r+" method does not exist in jQuery Waypoints.")}};n.fn[g].defaults={context:r,continuous:true,enabled:true,horizontal:false,offset:0,triggerOnce:false};h={refresh:function(){return n.each(a,function(t,e){return e.refresh()})},viewportHeight:function(){var t;return(t=r.innerHeight)!=null?t:i.height()},aggregate:function(t){var e,r,i;e=s;if(t){e=(i=a[n(t).data(u)])!=null?i.waypoints:void 0}if(!e){return[]}r={horizontal:[],vertical:[]};n.each(r,function(t,i){n.each(e[t],function(t,e){return i.push(e)});i.sort(function(t,e){return t.offset-e.offset});r[t]=n.map(i,function(t){return t.element});return r[t]=n.unique(r[t])});return r},above:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset<=t.oldScroll.y})},below:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset>t.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this);
9
+
assets/js/lsow-admin.js ADDED
File without changes
assets/js/lsow-admin.min.js ADDED
File without changes
assets/js/lsow-frontend.js ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Reviews JS
3
+ */
4
+ if (typeof (jQuery) != 'undefined') {
5
+
6
+ jQuery.noConflict(); // Reverts '$' variable back to other JS libraries
7
+
8
+ (function ($) {
9
+ "use strict";
10
+
11
+ $(function () {
12
+
13
+
14
+ var LSOW_Frontend = {
15
+
16
+ init: function () {
17
+ this.carousel();
18
+ this.setup_parallax();
19
+ this.setup_ytp();
20
+ },
21
+
22
+ isMobile: function () {
23
+ "use strict";
24
+ if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
25
+ return true;
26
+ }
27
+ return false;
28
+ },
29
+
30
+ vendor_prefix: function () {
31
+
32
+ var prefix;
33
+
34
+ function prefix() {
35
+ var styles = window.getComputedStyle(document.documentElement, '');
36
+ prefix = (Array.prototype.slice.call(styles).join('').match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o']))[1];
37
+
38
+ return prefix;
39
+ }
40
+
41
+ prefix();
42
+
43
+ return prefix;
44
+ },
45
+
46
+ carousel: function () {
47
+
48
+ if ($().slick === undefined) {
49
+ return;
50
+ }
51
+
52
+ var carousel_elements = $('.lsow-carousel, .lsow-posts-carousel');
53
+
54
+ carousel_elements.each(function () {
55
+
56
+ var carousel_elem = $(this);
57
+
58
+ var arrows = carousel_elem.data('arrows') ? true : false;
59
+
60
+ var dots = carousel_elem.data('dots') ? true : false;
61
+
62
+ var autoplay = carousel_elem.data('autoplay') ? true : false;
63
+
64
+ var autoplay_speed = carousel_elem.data('autoplay_speed') || 3000;
65
+
66
+ var animation_speed = carousel_elem.data('animation_speed') || 300;
67
+
68
+ var fade = carousel_elem.data('fade') ? true : false;
69
+
70
+ var pause_on_hover = carousel_elem.data('pause_on_hover') ? true : false;
71
+
72
+ var display_columns = carousel_elem.data('display_columns') || 4;
73
+
74
+ var scroll_columns = carousel_elem.data('scroll_columns') || 4;
75
+
76
+ var gutter = carousel_elem.data('gutter') || 10;
77
+
78
+ var tablet_width = carousel_elem.data('tablet_width') || 800;
79
+
80
+ var tablet_display_columns = carousel_elem.data('tablet_display_columns') || 2;
81
+
82
+ var tablet_scroll_columns = carousel_elem.data('tablet_scroll_columns') || 2;
83
+
84
+ var mobile_width = carousel_elem.data('mobile_width') || 480;
85
+
86
+ var mobile_display_columns = carousel_elem.data('mobile_display_columns') || 1;
87
+
88
+ var mobile_scroll_columns = carousel_elem.data('mobile_scroll_columns') || 1;
89
+
90
+ carousel_elem.slick({
91
+ arrows: arrows,
92
+ dots: dots,
93
+ infinite: true,
94
+ autoplay: autoplay,
95
+ autoplaySpeed: autoplay_speed,
96
+ speed: animation_speed,
97
+ fade: false,
98
+ pauseOnHover: pause_on_hover,
99
+ slidesToShow: display_columns,
100
+ slidesToScroll: scroll_columns,
101
+ responsive: [
102
+ {
103
+ breakpoint: tablet_width,
104
+ settings: {
105
+ slidesToShow: tablet_display_columns,
106
+ slidesToScroll: tablet_scroll_columns
107
+ }
108
+ },
109
+ {
110
+ breakpoint: mobile_width,
111
+ settings: {
112
+ slidesToShow: mobile_display_columns,
113
+ slidesToScroll: mobile_scroll_columns
114
+ }
115
+ }
116
+ ]
117
+ });
118
+ });
119
+ },
120
+
121
+ setup_parallax: function () {
122
+
123
+ var scroll = window.requestAnimationFrame ||
124
+ window.webkitRequestAnimationFrame ||
125
+ window.mozRequestAnimationFrame ||
126
+ window.msRequestAnimationFrame ||
127
+ window.oRequestAnimationFrame ||
128
+ function (callback) {
129
+ window.setTimeout(callback, 1000 / 600);
130
+ };
131
+
132
+ function init_parallax() {
133
+
134
+ if (LSOW_Frontend.isMobile() === false) {
135
+ var windowHeight = $(window).height();
136
+ $('.lsow-section-bg-parallax').each(function () {
137
+ var segment = $(this);
138
+ var elementHeight = segment.outerHeight(true);
139
+
140
+ /* Apply transform only when the element is in the viewport */
141
+ var boundingRect = segment[0].getBoundingClientRect();
142
+ if (boundingRect.bottom >= 0 && boundingRect.top <= windowHeight) {
143
+ var distanceToCover = windowHeight + elementHeight;
144
+ var pixelsMoved = windowHeight - boundingRect.top;
145
+ var toTransform = 50; // only 50% of the image height is available for transforming
146
+ var transformPercent = toTransform * Math.abs(pixelsMoved / distanceToCover);
147
+ transformPercent = -transformPercent.toFixed(2); // not more than 2 decimal places for performance reasons
148
+
149
+ segment.find('.lsow-parallax-bg').css('-' + LSOW_Frontend.vendor_prefix() + '-transform', 'translate3d(0px, ' + transformPercent + '%, 0px)');
150
+ }
151
+ });
152
+ }
153
+
154
+ }
155
+
156
+ if (this.isMobile() === false) {
157
+
158
+ // Call once to initialize parallax and then call on each scroll
159
+ scroll(init_parallax);
160
+ $(window).on('scroll', function () {
161
+ scroll(init_parallax);
162
+ });
163
+ }
164
+
165
+ },
166
+
167
+ setup_ytp: function () {
168
+
169
+ // Do not initialize YouTube backgrounds in mobile devices
170
+ if (this.isMobile() || $().mb_YTPlayer === undefined) {
171
+ return;
172
+ }
173
+
174
+ /* Video Backgrounds */
175
+ $('.lsow-section-bg-youtube').mb_YTPlayer({
176
+ startAt: 0,
177
+ showYTLogo: false,
178
+ showControls: false,
179
+ autoPlay: true,
180
+ mute: true,
181
+ containment: 'self'});
182
+
183
+
184
+ }
185
+ }
186
+
187
+ LSOW_Frontend.init();
188
+
189
+ });
190
+
191
+ }(jQuery));
192
+
193
+ }
assets/js/lsow-frontend.min.js ADDED
@@ -0,0 +1 @@
 
1
+ "undefined"!=typeof jQuery&&(jQuery.noConflict(),function(t){"use strict";t(function(){var o={init:function(){this.carousel(),this.setup_parallax(),this.setup_ytp()},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?!0:!1},vendor_prefix:function(){function t(){var o=window.getComputedStyle(document.documentElement,"");return t=(Array.prototype.slice.call(o).join("").match(/-(moz|webkit|ms)-/)||""===o.OLink&&["","o"])[1]}var t;return t(),t},carousel:function(){if(void 0!==t().slick){var o=t(".lsow-carousel, .lsow-posts-carousel");o.each(function(){var o=t(this),e=o.data("arrows")?!0:!1,a=o.data("dots")?!0:!1,i=o.data("autoplay")?!0:!1,n=o.data("autoplay_speed")||3e3,s=o.data("animation_speed")||300,l=(o.data("fade")?!0:!1,o.data("pause_on_hover")?!0:!1),r=o.data("display_columns")||4,d=o.data("scroll_columns")||4,u=(o.data("gutter")||10,o.data("tablet_width")||800),c=o.data("tablet_display_columns")||2,p=o.data("tablet_scroll_columns")||2,m=o.data("mobile_width")||480,w=o.data("mobile_display_columns")||1,f=o.data("mobile_scroll_columns")||1;o.slick({arrows:e,dots:a,infinite:!0,autoplay:i,autoplaySpeed:n,speed:s,fade:!1,pauseOnHover:l,slidesToShow:r,slidesToScroll:d,responsive:[{breakpoint:u,settings:{slidesToShow:c,slidesToScroll:p}},{breakpoint:m,settings:{slidesToShow:w,slidesToScroll:f}}]})})}},setup_parallax:function(){function e(){if(o.isMobile()===!1){var e=t(window).height();t(".lsow-section-bg-parallax").each(function(){var a=t(this),i=a.outerHeight(!0),n=a[0].getBoundingClientRect();if(n.bottom>=0&&n.top<=e){var s=e+i,l=e-n.top,r=50,d=r*Math.abs(l/s);d=-d.toFixed(2),a.find(".lsow-parallax-bg").css("-"+o.vendor_prefix()+"-transform","translate3d(0px, "+d+"%, 0px)")}})}}var a=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){window.setTimeout(t,1e3/600)};this.isMobile()===!1&&(a(e),t(window).on("scroll",function(){a(e)}))},setup_ytp:function(){this.isMobile()||void 0===t().mb_YTPlayer||t(".lsow-section-bg-youtube").mb_YTPlayer({startAt:0,showYTLogo:!1,showControls:!1,autoPlay:!0,mute:!0,containment:"self"})}};o.init()})}(jQuery));
assets/js/modernizr-custom.min.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! modernizr 3.2.0 (Custom Build) | MIT *
2
+ * http://modernizr.com/download/?-csstransforms-csstransforms3d-touchevents-setclasses !*/
3
+ !function(e,n,t){function r(e,n){return typeof e===n}function s(){var e,n,t,s,o,i,a;for(var f in C)if(C.hasOwnProperty(f)){if(e=[],n=C[f],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(t=0;t<n.options.aliases.length;t++)e.push(n.options.aliases[t].toLowerCase());for(s=r(n.fn,"function")?n.fn():n.fn,o=0;o<e.length;o++)i=e[o],a=i.split("."),1===a.length?Modernizr[a[0]]=s:(!Modernizr[a[0]]||Modernizr[a[0]]instanceof Boolean||(Modernizr[a[0]]=new Boolean(Modernizr[a[0]])),Modernizr[a[0]][a[1]]=s),y.push((s?"":"no-")+a.join("-"))}}function o(e){var n=x.className,t=Modernizr._config.classPrefix||"";if(S&&(n=n.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+t+"no-js(\\s|$)");n=n.replace(r,"$1"+t+"js$2")}Modernizr._config.enableClasses&&(n+=" "+t+e.join(" "+t),S?x.className.baseVal=n:x.className=n)}function i(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):S?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function a(){var e=n.body;return e||(e=i(S?"svg":"body"),e.fake=!0),e}function f(e,t,r,s){var o,f,u,l,d="modernizr",p=i("div"),c=a();if(parseInt(r,10))for(;r--;)u=i("div"),u.id=s?s[r]:d+(r+1),p.appendChild(u);return o=i("style"),o.type="text/css",o.id="s"+d,(c.fake?c:p).appendChild(o),c.appendChild(p),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(n.createTextNode(e)),p.id=d,c.fake&&(c.style.background="",c.style.overflow="hidden",l=x.style.overflow,x.style.overflow="hidden",x.appendChild(c)),f=t(p,e),c.fake?(c.parentNode.removeChild(c),x.style.overflow=l,x.offsetHeight):p.parentNode.removeChild(p),!!f}function u(e,n){return!!~(""+e).indexOf(n)}function l(e){return e.replace(/([a-z])-([a-z])/g,function(e,n,t){return n+t.toUpperCase()}).replace(/^-/,"")}function d(e,n){return function(){return e.apply(n,arguments)}}function p(e,n,t){var s;for(var o in e)if(e[o]in n)return t===!1?e[o]:(s=n[e[o]],r(s,"function")?d(s,t||n):s);return!1}function c(e){return e.replace(/([A-Z])/g,function(e,n){return"-"+n.toLowerCase()}).replace(/^ms-/,"-ms-")}function m(n,r){var s=n.length;if("CSS"in e&&"supports"in e.CSS){for(;s--;)if(e.CSS.supports(c(n[s]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var o=[];s--;)o.push("("+c(n[s])+":"+r+")");return o=o.join(" or "),f("@supports ("+o+") { #modernizr { position: absolute; } }",function(e){return"absolute"==getComputedStyle(e,null).position})}return t}function h(e,n,s,o){function a(){d&&(delete N.style,delete N.modElem)}if(o=r(o,"undefined")?!1:o,!r(s,"undefined")){var f=m(e,s);if(!r(f,"undefined"))return f}for(var d,p,c,h,v,g=["modernizr","tspan"];!N.style;)d=!0,N.modElem=i(g.shift()),N.style=N.modElem.style;for(c=e.length,p=0;c>p;p++)if(h=e[p],v=N.style[h],u(h,"-")&&(h=l(h)),N.style[h]!==t){if(o||r(s,"undefined"))return a(),"pfx"==n?h:!0;try{N.style[h]=s}catch(y){}if(N.style[h]!=v)return a(),"pfx"==n?h:!0}return a(),!1}function v(e,n,t,s,o){var i=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+E.join(i+" ")+i).split(" ");return r(n,"string")||r(n,"undefined")?h(a,n,s,o):(a=(e+" "+j.join(i+" ")+i).split(" "),p(a,n,t))}function g(e,n,r){return v(e,t,t,n,r)}var y=[],C=[],w={_version:"3.2.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,n){var t=this;setTimeout(function(){n(t[e])},0)},addTest:function(e,n,t){C.push({name:e,fn:n,options:t})},addAsyncTest:function(e){C.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=w,Modernizr=new Modernizr;var x=n.documentElement,S="svg"===x.nodeName.toLowerCase(),_=w._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):[];w._prefixes=_;var b="CSS"in e&&"supports"in e.CSS,z="supportsCSS"in e;Modernizr.addTest("supports",b||z);var T=w.testStyles=f;Modernizr.addTest("touchevents",function(){var t;if("ontouchstart"in e||e.DocumentTouch&&n instanceof DocumentTouch)t=!0;else{var r=["@media (",_.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");T(r,function(e){t=9===e.offsetTop})}return t});var P="Moz O ms Webkit",E=w._config.usePrefixes?P.split(" "):[];w._cssomPrefixes=E;var j=w._config.usePrefixes?P.toLowerCase().split(" "):[];w._domPrefixes=j;var k={elem:i("modernizr")};Modernizr._q.push(function(){delete k.elem});var N={style:k.elem.style};Modernizr._q.unshift(function(){delete N.style}),w.testAllProps=v,w.testAllProps=g,Modernizr.addTest("csstransforms",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&g("transform","scale(1)",!0)}),Modernizr.addTest("csstransforms3d",function(){var e=!!g("perspective","1px",!0),n=Modernizr._config.usePrefixes;if(e&&(!n||"webkitPerspective"in x.style)){var t,r="#modernizr{width:0;height:0}";Modernizr.supports?t="@supports (perspective: 1px)":(t="@media (transform-3d)",n&&(t+=",(-webkit-transform-3d)")),t+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",T(r+t,function(n){e=7===n.offsetWidth&&18===n.offsetHeight})}return e}),s(),o(y),delete w.addTest,delete w.addAsyncTest;for(var A=0;A<Modernizr._q.length;A++)Modernizr._q[A]();e.Modernizr=Modernizr}(window,document);
assets/js/slick.js ADDED
@@ -0,0 +1,2670 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ _ _ _ _
3
+ ___| (_) ___| | __ (_)___
4
+ / __| | |/ __| |/ / | / __|
5
+ \__ \ | | (__| < _ | \__ \
6
+ |___/_|_|\___|_|\_(_)/ |___/
7
+ |__/
8
+
9
+ Version: 1.5.9
10
+ Author: Ken Wheeler
11
+ Website: http://kenwheeler.github.io
12
+ Docs: http://kenwheeler.github.io/slick
13
+ Repo: http://github.com/kenwheeler/slick
14
+ Issues: http://github.com/kenwheeler/slick/issues
15
+
16
+ */
17
+ /* global window, document, define, jQuery, setInterval, clearInterval */
18
+ (function(factory) {
19
+ 'use strict';
20
+ if (typeof define === 'function' && define.amd) {
21
+ define(['jquery'], factory);
22
+ } else if (typeof exports !== 'undefined') {
23
+ module.exports = factory(require('jquery'));
24
+ } else {
25
+ factory(jQuery);
26
+ }
27
+
28
+ }(function($) {
29
+ 'use strict';
30
+ var Slick = window.Slick || {};
31
+
32
+ Slick = (function() {
33
+
34
+ var instanceUid = 0;
35
+
36
+ function Slick(element, settings) {
37
+
38
+ var _ = this, dataSettings;
39
+
40
+ _.defaults = {
41
+ accessibility: true,
42
+ adaptiveHeight: false,
43
+ appendArrows: $(element),
44
+ appendDots: $(element),
45
+ arrows: true,
46
+ asNavFor: null,
47
+ prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',
48
+ nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',
49
+ autoplay: false,
50
+ autoplaySpeed: 3000,
51
+ centerMode: false,
52
+ centerPadding: '50px',
53
+ cssEase: 'ease',
54
+ customPaging: function(slider, i) {
55
+ return '<button type="button" data-role="none" role="button" aria-required="false" tabindex="0">' + (i + 1) + '</button>';
56
+ },
57
+ dots: false,
58
+ dotsClass: 'slick-dots',
59
+ draggable: true,
60
+ easing: 'linear',
61
+ edgeFriction: 0.35,
62
+ fade: false,
63
+ focusOnSelect: false,
64
+ infinite: true,
65
+ initialSlide: 0,
66
+ lazyLoad: 'ondemand',
67
+ mobileFirst: false,
68
+ pauseOnHover: true,
69
+ pauseOnDotsHover: false,
70
+ respondTo: 'window',
71
+ responsive: null,
72
+ rows: 1,
73
+ rtl: false,
74
+ slide: '',
75
+ slidesPerRow: 1,
76
+ slidesToShow: 1,
77
+ slidesToScroll: 1,
78
+ speed: 500,
79
+ swipe: true,
80
+ swipeToSlide: false,
81
+ touchMove: true,
82
+ touchThreshold: 5,
83
+ useCSS: true,
84
+ useTransform: false,
85
+ variableWidth: false,
86
+ vertical: false,
87
+ verticalSwiping: false,
88
+ waitForAnimate: true,
89
+ zIndex: 1000
90
+ };
91
+
92
+ _.initials = {
93
+ animating: false,
94
+ dragging: false,
95
+ autoPlayTimer: null,
96
+ currentDirection: 0,
97
+ currentLeft: null,
98
+ currentSlide: 0,
99
+ direction: 1,
100
+ $dots: null,
101
+ listWidth: null,
102
+ listHeight: null,
103
+ loadIndex: 0,
104
+ $nextArrow: null,
105
+ $prevArrow: null,
106
+ slideCount: null,
107
+ slideWidth: null,
108
+ $slideTrack: null,
109
+ $slides: null,
110
+ sliding: false,
111
+ slideOffset: 0,
112
+ swipeLeft: null,
113
+ $list: null,
114
+ touchObject: {},
115
+ transformsEnabled: false,
116
+ unslicked: false
117
+ };
118
+
119
+ $.extend(_, _.initials);
120
+
121
+ _.activeBreakpoint = null;
122
+ _.animType = null;
123
+ _.animProp = null;
124
+ _.breakpoints = [];
125
+ _.breakpointSettings = [];
126
+ _.cssTransitions = false;
127
+ _.hidden = 'hidden';
128
+ _.paused = false;
129
+ _.positionProp = null;
130
+ _.respondTo = null;
131
+ _.rowCount = 1;
132
+ _.shouldClick = true;
133
+ _.$slider = $(element);
134
+ _.$slidesCache = null;
135
+ _.transformType = null;
136
+ _.transitionType = null;
137
+ _.visibilityChange = 'visibilitychange';
138
+ _.windowWidth = 0;
139
+ _.windowTimer = null;
140
+
141
+ dataSettings = $(element).data('slick') || {};
142
+
143
+ _.options = $.extend({}, _.defaults, dataSettings, settings);
144
+
145
+ _.currentSlide = _.options.initialSlide;
146
+
147
+ _.originalSettings = _.options;
148
+
149
+ if (typeof document.mozHidden !== 'undefined') {
150
+ _.hidden = 'mozHidden';
151
+ _.visibilityChange = 'mozvisibilitychange';
152
+ } else if (typeof document.webkitHidden !== 'undefined') {
153
+ _.hidden = 'webkitHidden';
154
+ _.visibilityChange = 'webkitvisibilitychange';
155
+ }
156
+
157
+ _.autoPlay = $.proxy(_.autoPlay, _);
158
+ _.autoPlayClear = $.proxy(_.autoPlayClear, _);
159
+ _.changeSlide = $.proxy(_.changeSlide, _);
160
+ _.clickHandler = $.proxy(_.clickHandler, _);
161
+ _.selectHandler = $.proxy(_.selectHandler, _);
162
+ _.setPosition = $.proxy(_.setPosition, _);
163
+ _.swipeHandler = $.proxy(_.swipeHandler, _);
164
+ _.dragHandler = $.proxy(_.dragHandler, _);
165
+ _.keyHandler = $.proxy(_.keyHandler, _);
166
+ _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
167
+
168
+ _.instanceUid = instanceUid++;
169
+
170
+ // A simple way to check for HTML strings
171
+ // Strict HTML recognition (must start with <)
172
+ // Extracted from jQuery v1.11 source
173
+ _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
174
+
175
+
176
+ _.registerBreakpoints();
177
+ _.init(true);
178
+ _.checkResponsive(true);
179
+
180
+ }
181
+
182
+ return Slick;
183
+
184
+ }());
185
+
186
+ Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {
187
+
188
+ var _ = this;
189
+
190
+ if (typeof(index) === 'boolean') {
191
+ addBefore = index;
192
+ index = null;
193
+ } else if (index < 0 || (index >= _.slideCount)) {
194
+ return false;
195
+ }
196
+
197
+ _.unload();
198
+
199
+ if (typeof(index) === 'number') {
200
+ if (index === 0 && _.$slides.length === 0) {
201
+ $(markup).appendTo(_.$slideTrack);
202
+ } else if (addBefore) {
203
+ $(markup).insertBefore(_.$slides.eq(index));
204
+ } else {
205
+ $(markup).insertAfter(_.$slides.eq(index));
206
+ }
207
+ } else {
208
+ if (addBefore === true) {
209
+ $(markup).prependTo(_.$slideTrack);
210
+ } else {
211
+ $(markup).appendTo(_.$slideTrack);
212
+ }
213
+ }
214
+
215
+ _.$slides = _.$slideTrack.children(this.options.slide);
216
+
217
+ _.$slideTrack.children(this.options.slide).detach();
218
+
219
+ _.$slideTrack.append(_.$slides);
220
+
221
+ _.$slides.each(function(index, element) {
222
+ $(element).attr('data-slick-index', index);
223
+ });
224
+
225
+ _.$slidesCache = _.$slides;
226
+
227
+ _.reinit();
228
+
229
+ };
230
+
231
+ Slick.prototype.animateHeight = function() {
232
+ var _ = this;
233
+ if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
234
+ var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
235
+ _.$list.animate({
236
+ height: targetHeight
237
+ }, _.options.speed);
238
+ }
239
+ };
240
+
241
+ Slick.prototype.animateSlide = function(targetLeft, callback) {
242
+
243
+ var animProps = {},
244
+ _ = this;
245
+
246
+ _.animateHeight();
247
+
248
+ if (_.options.rtl === true && _.options.vertical === false) {
249
+ targetLeft = -targetLeft;
250
+ }
251
+ if (_.transformsEnabled === false) {
252
+ if (_.options.vertical === false) {
253
+ _.$slideTrack.animate({
254
+ left: targetLeft
255
+ }, _.options.speed, _.options.easing, callback);
256
+ } else {
257
+ _.$slideTrack.animate({
258
+ top: targetLeft
259
+ }, _.options.speed, _.options.easing, callback);
260
+ }
261
+
262
+ } else {
263
+
264
+ if (_.cssTransitions === false) {
265
+ if (_.options.rtl === true) {
266
+ _.currentLeft = -(_.currentLeft);
267
+ }
268
+ $({
269
+ animStart: _.currentLeft
270
+ }).animate({
271
+ animStart: targetLeft
272
+ }, {
273
+ duration: _.options.speed,
274
+ easing: _.options.easing,
275
+ step: function(now) {
276
+ now = Math.ceil(now);
277
+ if (_.options.vertical === false) {
278
+ animProps[_.animType] = 'translate(' +
279
+ now + 'px, 0px)';
280
+ _.$slideTrack.css(animProps);
281
+ } else {
282
+ animProps[_.animType] = 'translate(0px,' +
283
+ now + 'px)';
284
+ _.$slideTrack.css(animProps);
285
+ }
286
+ },
287
+ complete: function() {
288
+ if (callback) {
289
+ callback.call();
290
+ }
291
+ }
292
+ });
293
+
294
+ } else {
295
+
296
+ _.applyTransition();
297
+ targetLeft = Math.ceil(targetLeft);
298
+
299
+ if (_.options.vertical === false) {
300
+ animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
301
+ } else {
302
+ animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
303
+ }
304
+ _.$slideTrack.css(animProps);
305
+
306
+ if (callback) {
307
+ setTimeout(function() {
308
+
309
+ _.disableTransition();
310
+
311
+ callback.call();
312
+ }, _.options.speed);
313
+ }
314
+
315
+ }
316
+
317
+ }
318
+
319
+ };
320
+
321
+ Slick.prototype.asNavFor = function(index) {
322
+
323
+ var _ = this,
324
+ asNavFor = _.options.asNavFor;
325
+
326
+ if ( asNavFor && asNavFor !== null ) {
327
+ asNavFor = $(asNavFor).not(_.$slider);
328
+ }
329
+
330
+ if ( asNavFor !== null && typeof asNavFor === 'object' ) {
331
+ asNavFor.each(function() {
332
+ var target = $(this).slick('getSlick');
333
+ if(!target.unslicked) {
334
+ target.slideHandler(index, true);
335
+ }
336
+ });
337
+ }
338
+
339
+ };
340
+
341
+ Slick.prototype.applyTransition = function(slide) {
342
+
343
+ var _ = this,
344
+ transition = {};
345
+
346
+ if (_.options.fade === false) {
347
+ transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
348
+ } else {
349
+ transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
350
+ }
351
+
352
+ if (_.options.fade === false) {
353
+ _.$slideTrack.css(transition);
354
+ } else {
355
+ _.$slides.eq(slide).css(transition);
356
+ }
357
+
358
+ };
359
+
360
+ Slick.prototype.autoPlay = function() {
361
+
362
+ var _ = this;
363
+
364
+ if (_.autoPlayTimer) {
365
+ clearInterval(_.autoPlayTimer);
366
+ }
367
+
368
+ if (_.slideCount > _.options.slidesToShow && _.paused !== true) {
369
+ _.autoPlayTimer = setInterval(_.autoPlayIterator,
370
+ _.options.autoplaySpeed);
371
+ }
372
+
373
+ };
374
+
375
+ Slick.prototype.autoPlayClear = function() {
376
+
377
+ var _ = this;
378
+ if (_.autoPlayTimer) {
379
+ clearInterval(_.autoPlayTimer);
380
+ }
381
+
382
+ };
383
+
384
+ Slick.prototype.autoPlayIterator = function() {
385
+
386
+ var _ = this;
387
+
388
+ if (_.options.infinite === false) {
389
+
390
+ if (_.direction === 1) {
391
+
392
+ if ((_.currentSlide + 1) === _.slideCount -
393
+ 1) {
394
+ _.direction = 0;
395
+ }
396
+
397
+ _.slideHandler(_.currentSlide + _.options.slidesToScroll);
398
+
399
+ } else {
400
+
401
+ if ((_.currentSlide - 1 === 0)) {
402
+
403
+ _.direction = 1;
404
+
405
+ }
406
+
407
+ _.slideHandler(_.currentSlide - _.options.slidesToScroll);
408
+
409
+ }
410
+
411
+ } else {
412
+
413
+ _.slideHandler(_.currentSlide + _.options.slidesToScroll);
414
+
415
+ }
416
+
417
+ };
418
+
419
+ Slick.prototype.buildArrows = function() {
420
+
421
+ var _ = this;
422
+
423
+ if (_.options.arrows === true ) {
424
+
425
+ _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
426
+ _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
427
+
428
+ if( _.slideCount > _.options.slidesToShow ) {
429
+
430
+ _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
431
+ _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
432
+
433
+ if (_.htmlExpr.test(_.options.prevArrow)) {
434
+ _.$prevArrow.prependTo(_.options.appendArrows);
435
+ }
436
+
437
+ if (_.htmlExpr.test(_.options.nextArrow)) {
438
+ _.$nextArrow.appendTo(_.options.appendArrows);
439
+ }
440
+
441
+ if (_.options.infinite !== true) {
442
+ _.$prevArrow
443
+ .addClass('slick-disabled')
444
+ .attr('aria-disabled', 'true');
445
+ }
446
+
447
+ } else {
448
+
449
+ _.$prevArrow.add( _.$nextArrow )
450
+
451
+ .addClass('slick-hidden')
452
+ .attr({
453
+ 'aria-disabled': 'true',
454
+ 'tabindex': '-1'
455
+ });
456
+
457
+ }
458
+
459
+ }
460
+
461
+ };
462
+
463
+ Slick.prototype.buildDots = function() {
464
+
465
+ var _ = this,
466
+ i, dotString;
467
+
468
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
469
+
470
+ dotString = '<ul class="' + _.options.dotsClass + '">';
471
+
472
+ for (i = 0; i <= _.getDotCount(); i += 1) {
473
+ dotString += '<li>' + _.options.customPaging.call(this, _, i) + '</li>';
474
+ }
475
+
476
+ dotString += '</ul>';
477
+
478
+ _.$dots = $(dotString).appendTo(
479
+ _.options.appendDots);
480
+
481
+ _.$dots.find('li').first().addClass('slick-active').attr('aria-hidden', 'false');
482
+
483
+ }
484
+
485
+ };
486
+
487
+ Slick.prototype.buildOut = function() {
488
+
489
+ var _ = this;
490
+
491
+ _.$slides =
492
+ _.$slider
493
+ .children( _.options.slide + ':not(.slick-cloned)')
494
+ .addClass('slick-slide');
495
+
496
+ _.slideCount = _.$slides.length;
497
+
498
+ _.$slides.each(function(index, element) {
499
+ $(element)
500
+ .attr('data-slick-index', index)
501
+ .data('originalStyling', $(element).attr('style') || '');
502
+ });
503
+
504
+ _.$slider.addClass('slick-slider');
505
+
506
+ _.$slideTrack = (_.slideCount === 0) ?
507
+ $('<div class="slick-track"/>').appendTo(_.$slider) :
508
+ _.$slides.wrapAll('<div class="slick-track"/>').parent();
509
+
510
+ _.$list = _.$slideTrack.wrap(
511
+ '<div aria-live="polite" class="slick-list"/>').parent();
512
+ _.$slideTrack.css('opacity', 0);
513
+
514
+ if (_.options.centerMode === true || _.options.swipeToSlide === true) {
515
+ _.options.slidesToScroll = 1;
516
+ }
517
+
518
+ $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
519
+
520
+ _.setupInfinite();
521
+
522
+ _.buildArrows();
523
+
524
+ _.buildDots();
525
+
526
+ _.updateDots();
527
+
528
+
529
+ _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
530
+
531
+ if (_.options.draggable === true) {
532
+ _.$list.addClass('draggable');
533
+ }
534
+
535
+ };
536
+
537
+ Slick.prototype.buildRows = function() {
538
+
539
+ var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;
540
+
541
+ newSlides = document.createDocumentFragment();
542
+ originalSlides = _.$slider.children();
543
+
544
+ if(_.options.rows > 1) {
545
+
546
+ slidesPerSection = _.options.slidesPerRow * _.options.rows;
547
+ numOfSlides = Math.ceil(
548
+ originalSlides.length / slidesPerSection
549
+ );
550
+
551
+ for(a = 0; a < numOfSlides; a++){
552
+ var slide = document.createElement('div');
553
+ for(b = 0; b < _.options.rows; b++) {
554
+ var row = document.createElement('div');
555
+ for(c = 0; c < _.options.slidesPerRow; c++) {
556
+ var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
557
+ if (originalSlides.get(target)) {
558
+ row.appendChild(originalSlides.get(target));
559
+ }
560
+ }
561
+ slide.appendChild(row);
562
+ }
563
+ newSlides.appendChild(slide);
564
+ }
565
+
566
+ _.$slider.html(newSlides);
567
+ _.$slider.children().children().children()
568
+ .css({
569
+ 'width':(100 / _.options.slidesPerRow) + '%',
570
+ 'display': 'inline-block'
571
+ });
572
+
573
+ }
574
+
575
+ };
576
+
577
+ Slick.prototype.checkResponsive = function(initial, forceUpdate) {
578
+
579
+ var _ = this,
580
+ breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
581
+ var sliderWidth = _.$slider.width();
582
+ var windowWidth = window.innerWidth || $(window).width();
583
+
584
+ if (_.respondTo === 'window') {
585
+ respondToWidth = windowWidth;
586
+ } else if (_.respondTo === 'slider') {
587
+ respondToWidth = sliderWidth;
588
+ } else if (_.respondTo === 'min') {
589
+ respondToWidth = Math.min(windowWidth, sliderWidth);
590
+ }
591
+
592
+ if ( _.options.responsive &&
593
+ _.options.responsive.length &&
594
+ _.options.responsive !== null) {
595
+
596
+ targetBreakpoint = null;
597
+
598
+ for (breakpoint in _.breakpoints) {
599
+ if (_.breakpoints.hasOwnProperty(breakpoint)) {
600
+ if (_.originalSettings.mobileFirst === false) {
601
+ if (respondToWidth < _.breakpoints[breakpoint]) {
602
+ targetBreakpoint = _.breakpoints[breakpoint];
603
+ }
604
+ } else {
605
+ if (respondToWidth > _.breakpoints[breakpoint]) {
606
+ targetBreakpoint = _.breakpoints[breakpoint];
607
+ }
608
+ }
609
+ }
610
+ }
611
+
612
+ if (targetBreakpoint !== null) {
613
+ if (_.activeBreakpoint !== null) {
614
+ if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
615
+ _.activeBreakpoint =
616
+ targetBreakpoint;
617
+ if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
618
+ _.unslick(targetBreakpoint);
619
+ } else {
620
+ _.options = $.extend({}, _.originalSettings,
621
+ _.breakpointSettings[
622
+ targetBreakpoint]);
623
+ if (initial === true) {
624
+ _.currentSlide = _.options.initialSlide;
625
+ }
626
+ _.refresh(initial);
627
+ }
628
+ triggerBreakpoint = targetBreakpoint;
629
+ }
630
+ } else {
631
+ _.activeBreakpoint = targetBreakpoint;
632
+ if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
633
+ _.unslick(targetBreakpoint);
634
+ } else {
635
+ _.options = $.extend({}, _.originalSettings,
636
+ _.breakpointSettings[
637
+ targetBreakpoint]);
638
+ if (initial === true) {
639
+ _.currentSlide = _.options.initialSlide;
640
+ }
641
+ _.refresh(initial);
642
+ }
643
+ triggerBreakpoint = targetBreakpoint;
644
+ }
645
+ } else {
646
+ if (_.activeBreakpoint !== null) {
647
+ _.activeBreakpoint = null;
648
+ _.options = _.originalSettings;
649
+ if (initial === true) {
650
+ _.currentSlide = _.options.initialSlide;
651
+ }
652
+ _.refresh(initial);
653
+ triggerBreakpoint = targetBreakpoint;
654
+ }
655
+ }
656
+
657
+ // only trigger breakpoints during an actual break. not on initialize.
658
+ if( !initial && triggerBreakpoint !== false ) {
659
+ _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
660
+ }
661
+ }
662
+
663
+ };
664
+
665
+ Slick.prototype.changeSlide = function(event, dontAnimate) {
666
+
667
+ var _ = this,
668
+ $target = $(event.target),
669
+ indexOffset, slideOffset, unevenOffset;
670
+
671
+ // If target is a link, prevent default action.
672
+ if($target.is('a')) {
673
+ event.preventDefault();
674
+ }
675
+
676
+ // If target is not the <li> element (ie: a child), find the <li>.
677
+ if(!$target.is('li')) {
678
+ $target = $target.closest('li');
679
+ }
680
+
681
+ unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
682
+ indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
683
+
684
+ switch (event.data.message) {
685
+
686
+ case 'previous':
687
+ slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
688
+ if (_.slideCount > _.options.slidesToShow) {
689
+ _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
690
+ }
691
+ break;
692
+
693
+ case 'next':
694
+ slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
695
+ if (_.slideCount > _.options.slidesToShow) {
696
+ _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
697
+ }
698
+ break;
699
+
700
+ case 'index':
701
+ var index = event.data.index === 0 ? 0 :
702
+ event.data.index || $target.index() * _.options.slidesToScroll;
703
+
704
+ _.slideHandler(_.checkNavigable(index), false, dontAnimate);
705
+ $target.children().trigger('focus');
706
+ break;
707
+
708
+ default:
709
+ return;
710
+ }
711
+
712
+ };
713
+
714
+ Slick.prototype.checkNavigable = function(index) {
715
+
716
+ var _ = this,
717
+ navigables, prevNavigable;
718
+
719
+ navigables = _.getNavigableIndexes();
720
+ prevNavigable = 0;
721
+ if (index > navigables[navigables.length - 1]) {
722
+ index = navigables[navigables.length - 1];
723
+ } else {
724
+ for (var n in navigables) {
725
+ if (index < navigables[n]) {
726
+ index = prevNavigable;
727
+ break;
728
+ }
729
+ prevNavigable = navigables[n];
730
+ }
731
+ }
732
+
733
+ return index;
734
+ };
735
+
736
+ Slick.prototype.cleanUpEvents = function() {
737
+
738
+ var _ = this;
739
+
740
+ if (_.options.dots && _.$dots !== null) {
741
+
742
+ $('li', _.$dots).off('click.slick', _.changeSlide);
743
+
744
+ if (_.options.pauseOnDotsHover === true && _.options.autoplay === true) {
745
+
746
+ $('li', _.$dots)
747
+ .off('mouseenter.slick', $.proxy(_.setPaused, _, true))
748
+ .off('mouseleave.slick', $.proxy(_.setPaused, _, false));
749
+
750
+ }
751
+
752
+ }
753
+
754
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
755
+ _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
756
+ _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
757
+ }
758
+
759
+ _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
760
+ _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
761
+ _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
762
+ _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
763
+
764
+ _.$list.off('click.slick', _.clickHandler);
765
+
766
+ $(document).off(_.visibilityChange, _.visibility);
767
+
768
+ _.$list.off('mouseenter.slick', $.proxy(_.setPaused, _, true));
769
+ _.$list.off('mouseleave.slick', $.proxy(_.setPaused, _, false));
770
+
771
+ if (_.options.accessibility === true) {
772
+ _.$list.off('keydown.slick', _.keyHandler);
773
+ }
774
+
775
+ if (_.options.focusOnSelect === true) {
776
+ $(_.$slideTrack).children().off('click.slick', _.selectHandler);
777
+ }
778
+
779
+ $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
780
+
781
+ $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
782
+
783
+ $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
784
+
785
+ $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
786
+ $(document).off('ready.slick.slick-' + _.instanceUid, _.setPosition);
787
+ };
788
+
789
+ Slick.prototype.cleanUpRows = function() {
790
+
791
+ var _ = this, originalSlides;
792
+
793
+ if(_.options.rows > 1) {
794
+ originalSlides = _.$slides.children().children();
795
+ originalSlides.removeAttr('style');
796
+ _.$slider.html(originalSlides);
797
+ }
798
+
799
+ };
800
+
801
+ Slick.prototype.clickHandler = function(event) {
802
+
803
+ var _ = this;
804
+
805
+ if (_.shouldClick === false) {
806
+ event.stopImmediatePropagation();
807
+ event.stopPropagation();
808
+ event.preventDefault();
809
+ }
810
+
811
+ };
812
+
813
+ Slick.prototype.destroy = function(refresh) {
814
+
815
+ var _ = this;
816
+
817
+ _.autoPlayClear();
818
+
819
+ _.touchObject = {};
820
+
821
+ _.cleanUpEvents();
822
+
823
+ $('.slick-cloned', _.$slider).detach();
824
+
825
+ if (_.$dots) {
826
+ _.$dots.remove();
827
+ }
828
+
829
+
830
+ if ( _.$prevArrow && _.$prevArrow.length ) {
831
+
832
+ _.$prevArrow
833
+ .removeClass('slick-disabled slick-arrow slick-hidden')
834
+ .removeAttr('aria-hidden aria-disabled tabindex')
835
+ .css("display","");
836
+
837
+ if ( _.htmlExpr.test( _.options.prevArrow )) {
838
+ _.$prevArrow.remove();
839
+ }
840
+ }
841
+
842
+ if ( _.$nextArrow && _.$nextArrow.length ) {
843
+
844
+ _.$nextArrow
845
+ .removeClass('slick-disabled slick-arrow slick-hidden')
846
+ .removeAttr('aria-hidden aria-disabled tabindex')
847
+ .css("display","");
848
+
849
+ if ( _.htmlExpr.test( _.options.nextArrow )) {
850
+ _.$nextArrow.remove();
851
+ }
852
+
853
+ }
854
+
855
+
856
+ if (_.$slides) {
857
+
858
+ _.$slides
859
+ .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
860
+ .removeAttr('aria-hidden')
861
+ .removeAttr('data-slick-index')
862
+ .each(function(){
863
+ $(this).attr('style', $(this).data('originalStyling'));
864
+ });
865
+
866
+ _.$slideTrack.children(this.options.slide).detach();
867
+
868
+ _.$slideTrack.detach();
869
+
870
+ _.$list.detach();
871
+
872
+ _.$slider.append(_.$slides);
873
+ }
874
+
875
+ _.cleanUpRows();
876
+
877
+ _.$slider.removeClass('slick-slider');
878
+ _.$slider.removeClass('slick-initialized');
879
+
880
+ _.unslicked = true;
881
+
882
+ if(!refresh) {
883
+ _.$slider.trigger('destroy', [_]);
884
+ }
885
+
886
+ };
887
+
888
+ Slick.prototype.disableTransition = function(slide) {
889
+
890
+ var _ = this,
891
+ transition = {};
892
+
893
+ transition[_.transitionType] = '';
894
+
895
+ if (_.options.fade === false) {
896
+ _.$slideTrack.css(transition);
897
+ } else {
898
+ _.$slides.eq(slide).css(transition);
899
+ }
900
+
901
+ };
902
+
903
+ Slick.prototype.fadeSlide = function(slideIndex, callback) {
904
+
905
+ var _ = this;
906
+
907
+ if (_.cssTransitions === false) {
908
+
909
+ _.$slides.eq(slideIndex).css({
910
+ zIndex: _.options.zIndex
911
+ });
912
+
913
+ _.$slides.eq(slideIndex).animate({
914
+ opacity: 1
915
+ }, _.options.speed, _.options.easing, callback);
916
+
917
+ } else {
918
+
919
+ _.applyTransition(slideIndex);
920
+
921
+ _.$slides.eq(slideIndex).css({
922
+ opacity: 1,
923
+ zIndex: _.options.zIndex
924
+ });
925
+
926
+ if (callback) {
927
+ setTimeout(function() {
928
+
929
+ _.disableTransition(slideIndex);
930
+
931
+ callback.call();
932
+ }, _.options.speed);
933
+ }
934
+
935
+ }
936
+
937
+ };
938
+
939
+ Slick.prototype.fadeSlideOut = function(slideIndex) {
940
+
941
+ var _ = this;
942
+
943
+ if (_.cssTransitions === false) {
944
+
945
+ _.$slides.eq(slideIndex).animate({
946
+ opacity: 0,
947
+ zIndex: _.options.zIndex - 2
948
+ }, _.options.speed, _.options.easing);
949
+
950
+ } else {
951
+
952
+ _.applyTransition(slideIndex);
953
+
954
+ _.$slides.eq(slideIndex).css({
955
+ opacity: 0,
956
+ zIndex: _.options.zIndex - 2
957
+ });
958
+
959
+ }
960
+
961
+ };
962
+
963
+ Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {
964
+
965
+ var _ = this;
966
+
967
+ if (filter !== null) {
968
+
969
+ _.$slidesCache = _.$slides;
970
+
971
+ _.unload();
972
+
973
+ _.$slideTrack.children(this.options.slide).detach();
974
+
975
+ _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
976
+
977
+ _.reinit();
978
+
979
+ }
980
+
981
+ };
982
+
983
+ Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {
984
+
985
+ var _ = this;
986
+ return _.currentSlide;
987
+
988
+ };
989
+
990
+ Slick.prototype.getDotCount = function() {
991
+
992
+ var _ = this;
993
+
994
+ var breakPoint = 0;
995
+ var counter = 0;
996
+ var pagerQty = 0;
997
+
998
+ if (_.options.infinite === true) {
999
+ while (breakPoint < _.slideCount) {
1000
+ ++pagerQty;
1001
+ breakPoint = counter + _.options.slidesToScroll;
1002
+ counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1003
+ }
1004
+ } else if (_.options.centerMode === true) {
1005
+ pagerQty = _.slideCount;
1006
+ } else {
1007
+ while (breakPoint < _.slideCount) {
1008
+ ++pagerQty;
1009
+ breakPoint = counter + _.options.slidesToScroll;
1010
+ counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1011
+ }
1012
+ }
1013
+
1014
+ return pagerQty - 1;
1015
+
1016
+ };
1017
+
1018
+ Slick.prototype.getLeft = function(slideIndex) {
1019
+
1020
+ var _ = this,
1021
+ targetLeft,
1022
+ verticalHeight,
1023
+ verticalOffset = 0,
1024
+ targetSlide;
1025
+
1026
+ _.slideOffset = 0;
1027
+ verticalHeight = _.$slides.first().outerHeight(true);
1028
+
1029
+ if (_.options.infinite === true) {
1030
+ if (_.slideCount > _.options.slidesToShow) {
1031
+ _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
1032
+ verticalOffset = (verticalHeight * _.options.slidesToShow) * -1;
1033
+ }
1034
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
1035
+ if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
1036
+ if (slideIndex > _.slideCount) {
1037
+ _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
1038
+ verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
1039
+ } else {
1040
+ _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
1041
+ verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
1042
+ }
1043
+ }
1044
+ }
1045
+ } else {
1046
+ if (slideIndex + _.options.slidesToShow > _.slideCount) {
1047
+ _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
1048
+ verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
1049
+ }
1050
+ }
1051
+
1052
+ if (_.slideCount <= _.options.slidesToShow) {
1053
+ _.slideOffset = 0;
1054
+ verticalOffset = 0;
1055
+ }
1056
+
1057
+ if (_.options.centerMode === true && _.options.infinite === true) {
1058
+ _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
1059
+ } else if (_.options.centerMode === true) {
1060
+ _.slideOffset = 0;
1061
+ _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
1062
+ }
1063
+
1064
+ if (_.options.vertical === false) {
1065
+ targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
1066
+ } else {
1067
+ targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
1068
+ }
1069
+
1070
+ if (_.options.variableWidth === true) {
1071
+
1072
+ if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1073
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1074
+ } else {
1075
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
1076
+ }
1077
+
1078
+ if (_.options.rtl === true) {
1079
+ if (targetSlide[0]) {
1080
+ targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1081
+ } else {
1082
+ targetLeft = 0;
1083
+ }
1084
+ } else {
1085
+ targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1086
+ }
1087
+
1088
+ if (_.options.centerMode === true) {
1089
+ if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1090
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1091
+ } else {
1092
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
1093
+ }
1094
+
1095
+ if (_.options.rtl === true) {
1096
+ if (targetSlide[0]) {
1097
+ targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1098
+ } else {
1099
+ targetLeft = 0;
1100
+ }
1101
+ } else {
1102
+ targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1103
+ }
1104
+
1105
+ targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
1106
+ }
1107
+ }
1108
+
1109
+ return targetLeft;
1110
+
1111
+ };
1112
+
1113
+ Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {
1114
+
1115
+ var _ = this;
1116
+
1117
+ return _.options[option];
1118
+
1119
+ };
1120
+
1121
+ Slick.prototype.getNavigableIndexes = function() {
1122
+
1123
+ var _ = this,
1124
+ breakPoint = 0,
1125
+ counter = 0,
1126
+ indexes = [],
1127
+ max;
1128
+
1129
+ if (_.options.infinite === false) {
1130
+ max = _.slideCount;
1131
+ } else {
1132
+ breakPoint = _.options.slidesToScroll * -1;
1133
+ counter = _.options.slidesToScroll * -1;
1134
+ max = _.slideCount * 2;
1135
+ }
1136
+
1137
+ while (breakPoint < max) {
1138
+ indexes.push(breakPoint);
1139
+ breakPoint = counter + _.options.slidesToScroll;
1140
+ counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1141
+ }
1142
+
1143
+ return indexes;
1144
+
1145
+ };
1146
+
1147
+ Slick.prototype.getSlick = function() {
1148
+
1149
+ return this;
1150
+
1151
+ };
1152
+
1153
+ Slick.prototype.getSlideCount = function() {
1154
+
1155
+ var _ = this,
1156
+ slidesTraversed, swipedSlide, centerOffset;
1157
+
1158
+ centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
1159
+
1160
+ if (_.options.swipeToSlide === true) {
1161
+ _.$slideTrack.find('.slick-slide').each(function(index, slide) {
1162
+ if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
1163
+ swipedSlide = slide;
1164
+ return false;
1165
+ }
1166
+ });
1167
+
1168
+ slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
1169
+
1170
+ return slidesTraversed;
1171
+
1172
+ } else {
1173
+ return _.options.slidesToScroll;
1174
+ }
1175
+
1176
+ };
1177
+
1178
+ Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {
1179
+
1180
+ var _ = this;
1181
+
1182
+ _.changeSlide({
1183
+ data: {
1184
+ message: 'index',
1185
+ index: parseInt(slide)
1186
+ }
1187
+ }, dontAnimate);
1188
+
1189
+ };
1190
+
1191
+ Slick.prototype.init = function(creation) {
1192
+
1193
+ var _ = this;
1194
+
1195
+ if (!$(_.$slider).hasClass('slick-initialized')) {
1196
+
1197
+ $(_.$slider).addClass('slick-initialized');
1198
+
1199
+ _.buildRows();
1200
+ _.buildOut();
1201
+ _.setProps();
1202
+ _.startLoad();
1203
+ _.loadSlider();
1204
+ _.initializeEvents();
1205
+ _.updateArrows();
1206
+ _.updateDots();
1207
+
1208
+ }
1209
+
1210
+ if (creation) {
1211
+ _.$slider.trigger('init', [_]);
1212
+ }
1213
+
1214
+ if (_.options.accessibility === true) {
1215
+ _.initADA();
1216
+ }
1217
+
1218
+ };
1219
+
1220
+ Slick.prototype.initArrowEvents = function() {
1221
+
1222
+ var _ = this;
1223
+
1224
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1225
+ _.$prevArrow.on('click.slick', {
1226
+ message: 'previous'
1227
+ }, _.changeSlide);
1228
+ _.$nextArrow.on('click.slick', {
1229
+ message: 'next'
1230
+ }, _.changeSlide);
1231
+ }
1232
+
1233
+ };
1234
+
1235
+ Slick.prototype.initDotEvents = function() {
1236
+
1237
+ var _ = this;
1238
+
1239
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1240
+ $('li', _.$dots).on('click.slick', {
1241
+ message: 'index'
1242
+ }, _.changeSlide);
1243
+ }
1244
+
1245
+ if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.options.autoplay === true) {
1246
+ $('li', _.$dots)
1247
+ .on('mouseenter.slick', $.proxy(_.setPaused, _, true))
1248
+ .on('mouseleave.slick', $.proxy(_.setPaused, _, false));
1249
+ }
1250
+
1251
+ };
1252
+
1253
+ Slick.prototype.initializeEvents = function() {
1254
+
1255
+ var _ = this;
1256
+
1257
+ _.initArrowEvents();
1258
+
1259
+ _.initDotEvents();
1260
+
1261
+ _.$list.on('touchstart.slick mousedown.slick', {
1262
+ action: 'start'
1263
+ }, _.swipeHandler);
1264
+ _.$list.on('touchmove.slick mousemove.slick', {
1265
+ action: 'move'
1266
+ }, _.swipeHandler);
1267
+ _.$list.on('touchend.slick mouseup.slick', {
1268
+ action: 'end'
1269
+ }, _.swipeHandler);
1270
+ _.$list.on('touchcancel.slick mouseleave.slick', {
1271
+ action: 'end'
1272
+ }, _.swipeHandler);
1273
+
1274
+ _.$list.on('click.slick', _.clickHandler);
1275
+
1276
+ $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
1277
+
1278
+ _.$list.on('mouseenter.slick', $.proxy(_.setPaused, _, true));
1279
+ _.$list.on('mouseleave.slick', $.proxy(_.setPaused, _, false));
1280
+
1281
+ if (_.options.accessibility === true) {
1282
+ _.$list.on('keydown.slick', _.keyHandler);
1283
+ }
1284
+
1285
+ if (_.options.focusOnSelect === true) {
1286
+ $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1287
+ }
1288
+
1289
+ $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
1290
+
1291
+ $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
1292
+
1293
+ $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
1294
+
1295
+ $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
1296
+ $(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition);
1297
+
1298
+ };
1299
+
1300
+ Slick.prototype.initUI = function() {
1301
+
1302
+ var _ = this;
1303
+
1304
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1305
+
1306
+ _.$prevArrow.show();
1307
+ _.$nextArrow.show();
1308
+
1309
+ }
1310
+
1311
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1312
+
1313
+ _.$dots.show();
1314
+
1315
+ }
1316
+
1317
+ if (_.options.autoplay === true) {
1318
+
1319
+ _.autoPlay();
1320
+
1321
+ }
1322
+
1323
+ };
1324
+
1325
+ Slick.prototype.keyHandler = function(event) {
1326
+
1327
+ var _ = this;
1328
+ //Dont slide if the cursor is inside the form fields and arrow keys are pressed
1329
+ if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
1330
+ if (event.keyCode === 37 && _.options.accessibility === true) {
1331
+ _.changeSlide({
1332
+ data: {
1333
+ message: 'previous'
1334
+ }
1335
+ });
1336
+ } else if (event.keyCode === 39 && _.options.accessibility === true) {
1337
+ _.changeSlide({
1338
+ data: {
1339
+ message: 'next'
1340
+ }
1341
+ });
1342
+ }
1343
+ }
1344
+
1345
+ };
1346
+
1347
+ Slick.prototype.lazyLoad = function() {
1348
+
1349
+ var _ = this,
1350
+ loadRange, cloneRange, rangeStart, rangeEnd;
1351
+
1352
+ function loadImages(imagesScope) {
1353
+ $('img[data-lazy]', imagesScope).each(function() {
1354
+
1355
+ var image = $(this),
1356
+ imageSource = $(this).attr('data-lazy'),
1357
+ imageToLoad = document.createElement('img');
1358
+
1359
+ imageToLoad.onload = function() {
1360
+ image
1361
+ .animate({ opacity: 0 }, 100, function() {
1362
+ image
1363
+ .attr('src', imageSource)
1364
+ .animate({ opacity: 1 }, 200, function() {
1365
+ image
1366
+ .removeAttr('data-lazy')
1367
+ .removeClass('slick-loading');
1368
+ });
1369
+ });
1370
+ };
1371
+
1372
+ imageToLoad.src = imageSource;
1373
+
1374
+ });
1375
+ }
1376
+
1377
+ if (_.options.centerMode === true) {
1378
+ if (_.options.infinite === true) {
1379
+ rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
1380
+ rangeEnd = rangeStart + _.options.slidesToShow + 2;
1381
+ } else {
1382
+ rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
1383
+ rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
1384
+ }
1385
+ } else {
1386
+ rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
1387
+ rangeEnd = rangeStart + _.options.slidesToShow;
1388
+ if (_.options.fade === true) {
1389
+ if (rangeStart > 0) rangeStart--;
1390
+ if (rangeEnd <= _.slideCount) rangeEnd++;
1391
+ }
1392
+ }
1393
+
1394
+ loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
1395
+ loadImages(loadRange);
1396
+
1397
+ if (_.slideCount <= _.options.slidesToShow) {
1398
+ cloneRange = _.$slider.find('.slick-slide');
1399
+ loadImages(cloneRange);
1400
+ } else
1401
+ if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
1402
+ cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
1403
+ loadImages(cloneRange);
1404
+ } else if (_.currentSlide === 0) {
1405
+ cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
1406
+ loadImages(cloneRange);
1407
+ }
1408
+
1409
+ };
1410
+
1411
+ Slick.prototype.loadSlider = function() {
1412
+
1413
+ var _ = this;
1414
+
1415
+ _.setPosition();
1416
+
1417
+ _.$slideTrack.css({
1418
+ opacity: 1
1419
+ });
1420
+
1421
+ _.$slider.removeClass('slick-loading');
1422
+
1423
+ _.initUI();
1424
+
1425
+ if (_.options.lazyLoad === 'progressive') {
1426
+ _.progressiveLazyLoad();
1427
+ }
1428
+
1429
+ };
1430
+
1431
+ Slick.prototype.next = Slick.prototype.slickNext = function() {
1432
+
1433
+ var _ = this;
1434
+
1435
+ _.changeSlide({
1436
+ data: {
1437
+ message: 'next'
1438
+ }
1439
+ });
1440
+
1441
+ };
1442
+
1443
+ Slick.prototype.orientationChange = function() {
1444
+
1445
+ var _ = this;
1446
+
1447
+ _.checkResponsive();
1448
+ _.setPosition();
1449
+
1450
+ };
1451
+
1452
+ Slick.prototype.pause = Slick.prototype.slickPause = function() {
1453
+
1454
+ var _ = this;
1455
+
1456
+ _.autoPlayClear();
1457
+ _.paused = true;
1458
+
1459
+ };
1460
+
1461
+ Slick.prototype.play = Slick.prototype.slickPlay = function() {
1462
+
1463
+ var _ = this;
1464
+
1465
+ _.paused = false;
1466
+ _.autoPlay();
1467
+
1468
+ };
1469
+
1470
+ Slick.prototype.postSlide = function(index) {
1471
+
1472
+ var _ = this;
1473
+
1474
+ _.$slider.trigger('afterChange', [_, index]);
1475
+
1476
+ _.animating = false;
1477
+
1478
+ _.setPosition();
1479
+
1480
+ _.swipeLeft = null;
1481
+
1482
+ if (_.options.autoplay === true && _.paused === false) {
1483
+ _.autoPlay();
1484
+ }
1485
+ if (_.options.accessibility === true) {
1486
+ _.initADA();
1487
+ }
1488
+
1489
+ };
1490
+
1491
+ Slick.prototype.prev = Slick.prototype.slickPrev = function() {
1492
+
1493
+ var _ = this;
1494
+
1495
+ _.changeSlide({
1496
+ data: {
1497
+ message: 'previous'
1498
+ }
1499
+ });
1500
+
1501
+ };
1502
+
1503
+ Slick.prototype.preventDefault = function(event) {
1504
+ event.preventDefault();
1505
+ };
1506
+
1507
+ Slick.prototype.progressiveLazyLoad = function() {
1508
+
1509
+ var _ = this,
1510
+ imgCount, targetImage;
1511
+
1512
+ imgCount = $('img[data-lazy]', _.$slider).length;
1513
+
1514
+ if (imgCount > 0) {
1515
+ targetImage = $('img[data-lazy]', _.$slider).first();
1516
+ targetImage.attr('src', null);
1517
+ targetImage.attr('src', targetImage.attr('data-lazy')).removeClass('slick-loading').load(function() {
1518
+ targetImage.removeAttr('data-lazy');
1519
+ _.progressiveLazyLoad();
1520
+
1521
+ if (_.options.adaptiveHeight === true) {
1522
+ _.setPosition();
1523
+ }
1524
+ })
1525
+ .error(function() {
1526
+ targetImage.removeAttr('data-lazy');
1527
+ _.progressiveLazyLoad();
1528
+ });
1529
+ }
1530
+
1531
+ };
1532
+
1533
+ Slick.prototype.refresh = function( initializing ) {
1534
+
1535
+ var _ = this, currentSlide, firstVisible;
1536
+
1537
+ firstVisible = _.slideCount - _.options.slidesToShow;
1538
+
1539
+ // check that the new breakpoint can actually accept the
1540
+ // "current slide" as the current slide, otherwise we need
1541
+ // to set it to the closest possible value.
1542
+ if ( !_.options.infinite ) {
1543
+ if ( _.slideCount <= _.options.slidesToShow ) {
1544
+ _.currentSlide = 0;
1545
+ } else if ( _.currentSlide > firstVisible ) {
1546
+ _.currentSlide = firstVisible;
1547
+ }
1548
+ }
1549
+
1550
+ currentSlide = _.currentSlide;
1551
+
1552
+ _.destroy(true);
1553
+
1554
+ $.extend(_, _.initials, { currentSlide: currentSlide });
1555
+
1556
+ _.init();
1557
+
1558
+ if( !initializing ) {
1559
+
1560
+ _.changeSlide({
1561
+ data: {
1562
+ message: 'index',
1563
+ index: currentSlide
1564
+ }
1565
+ }, false);
1566
+
1567
+ }
1568
+
1569
+ };
1570
+
1571
+ Slick.prototype.registerBreakpoints = function() {
1572
+
1573
+ var _ = this, breakpoint, currentBreakpoint, l,
1574
+ responsiveSettings = _.options.responsive || null;
1575
+
1576
+ if ( $.type(responsiveSettings) === "array" && responsiveSettings.length ) {
1577
+
1578
+ _.respondTo = _.options.respondTo || 'window';
1579
+
1580
+ for ( breakpoint in responsiveSettings ) {
1581
+
1582
+ l = _.breakpoints.length-1;
1583
+ currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
1584
+
1585
+ if (responsiveSettings.hasOwnProperty(breakpoint)) {
1586
+
1587
+ // loop through the breakpoints and cut out any existing
1588
+ // ones with the same breakpoint number, we don't want dupes.
1589
+ while( l >= 0 ) {
1590
+ if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
1591
+ _.breakpoints.splice(l,1);
1592
+ }
1593
+ l--;
1594
+ }
1595
+
1596
+ _.breakpoints.push(currentBreakpoint);
1597
+ _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
1598
+
1599
+ }
1600
+
1601
+ }
1602
+
1603
+ _.breakpoints.sort(function(a, b) {
1604
+ return ( _.options.mobileFirst ) ? a-b : b-a;
1605
+ });
1606
+
1607
+ }
1608
+
1609
+ };
1610
+
1611
+ Slick.prototype.reinit = function() {
1612
+
1613
+ var _ = this;
1614
+
1615
+ _.$slides =
1616
+ _.$slideTrack
1617
+ .children(_.options.slide)
1618
+ .addClass('slick-slide');
1619
+
1620
+ _.slideCount = _.$slides.length;
1621
+
1622
+ if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
1623
+ _.currentSlide = _.currentSlide - _.options.slidesToScroll;
1624
+ }
1625
+
1626
+ if (_.slideCount <= _.options.slidesToShow) {
1627
+ _.currentSlide = 0;
1628
+ }
1629
+
1630
+ _.registerBreakpoints();
1631
+
1632
+ _.setProps();
1633
+ _.setupInfinite();
1634
+ _.buildArrows();
1635
+ _.updateArrows();
1636
+ _.initArrowEvents();
1637
+ _.buildDots();
1638
+ _.updateDots();
1639
+ _.initDotEvents();
1640
+
1641
+ _.checkResponsive(false, true);
1642
+
1643
+ if (_.options.focusOnSelect === true) {
1644
+ $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1645
+ }
1646
+
1647
+ _.setSlideClasses(0);
1648
+
1649
+ _.setPosition();
1650
+
1651
+ _.$slider.trigger('reInit', [_]);
1652
+
1653
+ if (_.options.autoplay === true) {
1654
+ _.focusHandler();
1655
+ }
1656
+
1657
+ };
1658
+
1659
+ Slick.prototype.resize = function() {
1660
+
1661
+ var _ = this;
1662
+
1663
+ if ($(window).width() !== _.windowWidth) {
1664
+ clearTimeout(_.windowDelay);
1665
+ _.windowDelay = window.setTimeout(function() {
1666
+ _.windowWidth = $(window).width();
1667
+ _.checkResponsive();
1668
+ if( !_.unslicked ) { _.setPosition(); }
1669
+ }, 50);
1670
+ }
1671
+ };
1672
+
1673
+ Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {
1674
+
1675
+ var _ = this;
1676
+
1677
+ if (typeof(index) === 'boolean') {
1678
+ removeBefore = index;
1679
+ index = removeBefore === true ? 0 : _.slideCount - 1;
1680
+ } else {
1681
+ index = removeBefore === true ? --index : index;
1682
+ }
1683
+
1684
+ if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
1685
+ return false;
1686
+ }
1687
+
1688
+ _.unload();
1689
+
1690
+ if (removeAll === true) {
1691
+ _.$slideTrack.children().remove();
1692
+ } else {
1693
+ _.$slideTrack.children(this.options.slide).eq(index).remove();
1694
+ }
1695
+
1696
+ _.$slides = _.$slideTrack.children(this.options.slide);
1697
+
1698
+ _.$slideTrack.children(this.options.slide).detach();
1699
+
1700
+ _.$slideTrack.append(_.$slides);
1701
+
1702
+ _.$slidesCache = _.$slides;
1703
+
1704
+ _.reinit();
1705
+
1706
+ };
1707
+
1708
+ Slick.prototype.setCSS = function(position) {
1709
+
1710
+ var _ = this,
1711
+ positionProps = {},
1712
+ x, y;
1713
+
1714
+ if (_.options.rtl === true) {
1715
+ position = -position;
1716
+ }
1717
+ x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
1718
+ y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
1719
+
1720
+ positionProps[_.positionProp] = position;
1721
+
1722
+ if (_.transformsEnabled === false) {
1723
+ _.$slideTrack.css(positionProps);
1724
+ } else {
1725
+ positionProps = {};
1726
+ if (_.cssTransitions === false) {
1727
+ positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
1728
+ _.$slideTrack.css(positionProps);
1729
+ } else {
1730
+ positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
1731
+ _.$slideTrack.css(positionProps);
1732
+ }
1733
+ }
1734
+
1735
+ };
1736
+
1737
+ Slick.prototype.setDimensions = function() {
1738
+
1739
+ var _ = this;
1740
+
1741
+ if (_.options.vertical === false) {
1742
+ if (_.options.centerMode === true) {
1743
+ _.$list.css({
1744
+ padding: ('0px ' + _.options.centerPadding)
1745
+ });
1746
+ }
1747
+ } else {
1748
+ _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
1749
+ if (_.options.centerMode === true) {
1750
+ _.$list.css({
1751
+ padding: (_.options.centerPadding + ' 0px')
1752
+ });
1753
+ }
1754
+ }
1755
+
1756
+ _.listWidth = _.$list.width();
1757
+ _.listHeight = _.$list.height();
1758
+
1759
+
1760
+ if (_.options.vertical === false && _.options.variableWidth === false) {
1761
+ _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
1762
+ _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
1763
+
1764
+ } else if (_.options.variableWidth === true) {
1765
+ _.$slideTrack.width(5000 * _.slideCount);
1766
+ } else {
1767
+ _.slideWidth = Math.ceil(_.listWidth);
1768
+ _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
1769
+ }
1770
+
1771
+ var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
1772
+ if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
1773
+
1774
+ };
1775
+
1776
+ Slick.prototype.setFade = function() {
1777
+
1778
+ var _ = this,
1779
+ targetLeft;
1780
+
1781
+ _.$slides.each(function(index, element) {
1782
+ targetLeft = (_.slideWidth * index) * -1;
1783
+ if (_.options.rtl === true) {
1784
+ $(element).css({
1785
+ position: 'relative',
1786
+ right: targetLeft,
1787
+ top: 0,
1788
+ zIndex: _.options.zIndex - 2,
1789
+ opacity: 0
1790
+ });
1791
+ } else {
1792
+ $(element).css({
1793
+ position: 'relative',
1794
+ left: targetLeft,
1795
+ top: 0,
1796
+ zIndex: _.options.zIndex - 2,
1797
+ opacity: 0
1798
+ });
1799
+ }
1800
+ });
1801
+
1802
+ _.$slides.eq(_.currentSlide).css({
1803
+ zIndex: _.options.zIndex - 1,
1804
+ opacity: 1
1805
+ });
1806
+
1807
+ };
1808
+
1809
+ Slick.prototype.setHeight = function() {
1810
+
1811
+ var _ = this;
1812
+
1813
+ if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
1814
+ var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
1815
+ _.$list.css('height', targetHeight);
1816
+ }
1817
+
1818
+ };
1819
+
1820
+ Slick.prototype.setOption = Slick.prototype.slickSetOption = function(option, value, refresh) {
1821
+
1822
+ var _ = this, l, item;
1823
+
1824
+ if( option === "responsive" && $.type(value) === "array" ) {
1825
+ for ( item in value ) {
1826
+ if( $.type( _.options.responsive ) !== "array" ) {
1827
+ _.options.responsive = [ value[item] ];
1828
+ } else {
1829
+ l = _.options.responsive.length-1;
1830
+ // loop through the responsive object and splice out duplicates.
1831
+ while( l >= 0 ) {
1832
+ if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {
1833
+ _.options.responsive.splice(l,1);
1834
+ }
1835
+ l--;
1836
+ }
1837
+ _.options.responsive.push( value[item] );
1838
+ }
1839
+ }
1840
+ } else {
1841
+ _.options[option] = value;
1842
+ }
1843
+
1844
+ if (refresh === true) {
1845
+ _.unload();
1846
+ _.reinit();
1847
+ }
1848
+
1849
+ };
1850
+
1851
+ Slick.prototype.setPosition = function() {
1852
+
1853
+ var _ = this;
1854
+
1855
+ _.setDimensions();
1856
+
1857
+ _.setHeight();
1858
+
1859
+ if (_.options.fade === false) {
1860
+ _.setCSS(_.getLeft(_.currentSlide));
1861
+ } else {
1862
+ _.setFade();
1863
+ }
1864
+
1865
+ _.$slider.trigger('setPosition', [_]);
1866
+
1867
+ };
1868
+
1869
+ Slick.prototype.setProps = function() {
1870
+
1871
+ var _ = this,
1872
+ bodyStyle = document.body.style;
1873
+
1874
+ _.positionProp = _.options.vertical === true ? 'top' : 'left';
1875
+
1876
+ if (_.positionProp === 'top') {
1877
+ _.$slider.addClass('slick-vertical');
1878
+ } else {
1879
+ _.$slider.removeClass('slick-vertical');
1880
+ }
1881
+
1882
+ if (bodyStyle.WebkitTransition !== undefined ||
1883
+ bodyStyle.MozTransition !== undefined ||
1884
+ bodyStyle.msTransition !== undefined) {
1885
+ if (_.options.useCSS === true) {
1886
+ _.cssTransitions = true;
1887
+ }
1888
+ }
1889
+
1890
+ if ( _.options.fade ) {
1891
+ if ( typeof _.options.zIndex === 'number' ) {
1892
+ if( _.options.zIndex < 3 ) {
1893
+ _.options.zIndex = 3;
1894
+ }
1895
+ } else {
1896
+ _.options.zIndex = _.defaults.zIndex;
1897
+ }
1898
+ }
1899
+
1900
+ if (bodyStyle.OTransform !== undefined) {
1901
+ _.animType = 'OTransform';
1902
+ _.transformType = '-o-transform';
1903
+ _.transitionType = 'OTransition';
1904
+ if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
1905
+ }
1906
+ if (bodyStyle.MozTransform !== undefined) {
1907
+ _.animType = 'MozTransform';
1908
+ _.transformType = '-moz-transform';
1909
+ _.transitionType = 'MozTransition';
1910
+ if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
1911
+ }
1912
+ if (bodyStyle.webkitTransform !== undefined) {
1913
+ _.animType = 'webkitTransform';
1914
+ _.transformType = '-webkit-transform';
1915
+ _.transitionType = 'webkitTransition';
1916
+ if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
1917
+ }
1918
+ if (bodyStyle.msTransform !== undefined) {
1919
+ _.animType = 'msTransform';
1920
+ _.transformType = '-ms-transform';
1921
+ _.transitionType = 'msTransition';
1922
+ if (bodyStyle.msTransform === undefined) _.animType = false;
1923
+ }
1924
+ if (bodyStyle.transform !== undefined && _.animType !== false) {
1925
+ _.animType = 'transform';
1926
+ _.transformType = 'transform';
1927
+ _.transitionType = 'transition';
1928
+ }
1929
+ _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
1930
+ };
1931
+
1932
+
1933
+ Slick.prototype.setSlideClasses = function(index) {
1934
+
1935
+ var _ = this,
1936
+ centerOffset, allSlides, indexOffset, remainder;
1937
+
1938
+ allSlides = _.$slider
1939
+ .find('.slick-slide')
1940
+ .removeClass('slick-active slick-center slick-current')
1941
+ .attr('aria-hidden', 'true');
1942
+
1943
+ _.$slides
1944
+ .eq(index)
1945
+ .addClass('slick-current');
1946
+
1947
+ if (_.options.centerMode === true) {
1948
+
1949
+ centerOffset = Math.floor(_.options.slidesToShow / 2);
1950
+
1951
+ if (_.options.infinite === true) {
1952
+
1953
+ if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
1954
+
1955
+ _.$slides
1956
+ .slice(index - centerOffset, index + centerOffset + 1)
1957
+ .addClass('slick-active')
1958
+ .attr('aria-hidden', 'false');
1959
+
1960
+ } else {
1961
+
1962
+ indexOffset = _.options.slidesToShow + index;
1963
+ allSlides
1964
+ .slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2)
1965
+ .addClass('slick-active')
1966
+ .attr('aria-hidden', 'false');
1967
+
1968
+ }
1969
+
1970
+ if (index === 0) {
1971
+
1972
+ allSlides
1973
+ .eq(allSlides.length - 1 - _.options.slidesToShow)
1974
+ .addClass('slick-center');
1975
+
1976
+ } else if (index === _.slideCount - 1) {
1977
+
1978
+ allSlides
1979
+ .eq(_.options.slidesToShow)
1980
+ .addClass('slick-center');
1981
+
1982
+ }
1983
+
1984
+ }
1985
+
1986
+ _.$slides
1987
+ .eq(index)
1988
+ .addClass('slick-center');
1989
+
1990
+ } else {
1991
+
1992
+ if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
1993
+
1994
+ _.$slides
1995
+ .slice(index, index + _.options.slidesToShow)
1996
+ .addClass('slick-active')
1997
+ .attr('aria-hidden', 'false');
1998
+
1999
+ } else if (allSlides.length <= _.options.slidesToShow) {
2000
+
2001
+ allSlides
2002
+ .addClass('slick-active')
2003
+ .attr('aria-hidden', 'false');
2004
+
2005
+ } else {
2006
+
2007
+ remainder = _.slideCount % _.options.slidesToShow;
2008
+ indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
2009
+
2010
+ if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
2011
+
2012
+ allSlides
2013
+ .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
2014
+ .addClass('slick-active')
2015
+ .attr('aria-hidden', 'false');
2016
+
2017
+ } else {
2018
+
2019
+ allSlides
2020
+ .slice(indexOffset, indexOffset + _.options.slidesToShow)
2021
+ .addClass('slick-active')
2022
+ .attr('aria-hidden', 'false');
2023
+
2024
+ }
2025
+
2026
+ }
2027
+
2028
+ }
2029
+
2030
+ if (_.options.lazyLoad === 'ondemand') {
2031
+ _.lazyLoad();
2032
+ }
2033
+
2034
+ };
2035
+
2036
+ Slick.prototype.setupInfinite = function() {
2037
+
2038
+ var _ = this,
2039
+ i, slideIndex, infiniteCount;
2040
+
2041
+ if (_.options.fade === true) {
2042
+ _.options.centerMode = false;
2043
+ }
2044
+
2045
+ if (_.options.infinite === true && _.options.fade === false) {
2046
+
2047
+ slideIndex = null;
2048
+
2049
+ if (_.slideCount > _.options.slidesToShow) {
2050
+
2051
+ if (_.options.centerMode === true) {
2052
+ infiniteCount = _.options.slidesToShow + 1;
2053
+ } else {
2054
+ infiniteCount = _.options.slidesToShow;
2055
+ }
2056
+
2057
+ for (i = _.slideCount; i > (_.slideCount -
2058
+ infiniteCount); i -= 1) {
2059
+ slideIndex = i - 1;
2060
+ $(_.$slides[slideIndex]).clone(true).attr('id', '')
2061
+ .attr('data-slick-index', slideIndex - _.slideCount)
2062
+ .prependTo(_.$slideTrack).addClass('slick-cloned');
2063
+ }
2064
+ for (i = 0; i < infiniteCount; i += 1) {
2065
+ slideIndex = i;
2066
+ $(_.$slides[slideIndex]).clone(true).attr('id', '')
2067
+ .attr('data-slick-index', slideIndex + _.slideCount)
2068
+ .appendTo(_.$slideTrack).addClass('slick-cloned');
2069
+ }
2070
+ _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
2071
+ $(this).attr('id', '');
2072
+ });
2073
+
2074
+ }
2075
+
2076
+ }
2077
+
2078
+ };
2079
+
2080
+ Slick.prototype.setPaused = function(paused) {
2081
+
2082
+ var _ = this;
2083
+
2084
+ if (_.options.autoplay === true && _.options.pauseOnHover === true) {
2085
+ _.paused = paused;
2086
+ if (!paused) {
2087
+ _.autoPlay();
2088
+ } else {
2089
+ _.autoPlayClear();
2090
+ }
2091
+ }
2092
+ };
2093
+
2094
+ Slick.prototype.selectHandler = function(event) {
2095
+
2096
+ var _ = this;
2097
+
2098
+ var targetElement =
2099
+ $(event.target).is('.slick-slide') ?
2100
+ $(event.target) :
2101
+ $(event.target).parents('.slick-slide');
2102
+
2103
+ var index = parseInt(targetElement.attr('data-slick-index'));
2104
+
2105
+ if (!index) index = 0;
2106
+
2107
+ if (_.slideCount <= _.options.slidesToShow) {
2108
+
2109
+ _.setSlideClasses(index);
2110
+ _.asNavFor(index);
2111
+ return;
2112
+
2113
+ }
2114
+
2115
+ _.slideHandler(index);
2116
+
2117
+ };
2118
+
2119
+ Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
2120
+
2121
+ var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
2122
+ _ = this;
2123
+
2124
+ sync = sync || false;
2125
+
2126
+ if (_.animating === true && _.options.waitForAnimate === true) {
2127
+ return;
2128
+ }
2129
+
2130
+ if (_.options.fade === true && _.currentSlide === index) {
2131
+ return;
2132
+ }
2133
+
2134
+ if (_.slideCount <= _.options.slidesToShow) {
2135
+ return;
2136
+ }
2137
+
2138
+ if (sync === false) {
2139
+ _.asNavFor(index);
2140
+ }
2141
+
2142
+ targetSlide = index;
2143
+ targetLeft = _.getLeft(targetSlide);
2144
+ slideLeft = _.getLeft(_.currentSlide);
2145
+
2146
+ _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
2147
+
2148
+ if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
2149
+ if (_.options.fade === false) {
2150
+ targetSlide = _.currentSlide;
2151
+ if (dontAnimate !== true) {
2152
+ _.animateSlide(slideLeft, function() {
2153
+ _.postSlide(targetSlide);
2154
+ });
2155
+ } else {
2156
+ _.postSlide(targetSlide);
2157
+ }
2158
+ }
2159
+ return;
2160
+ } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
2161
+ if (_.options.fade === false) {
2162
+ targetSlide = _.currentSlide;
2163
+ if (dontAnimate !== true) {
2164
+ _.animateSlide(slideLeft, function() {
2165
+ _.postSlide(targetSlide);
2166
+ });
2167
+ } else {
2168
+ _.postSlide(targetSlide);
2169
+ }
2170
+ }
2171
+ return;
2172
+ }
2173
+
2174
+ if (_.options.autoplay === true) {
2175
+ clearInterval(_.autoPlayTimer);
2176
+ }
2177
+
2178
+ if (targetSlide < 0) {
2179
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
2180
+ animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
2181
+ } else {
2182
+ animSlide = _.slideCount + targetSlide;
2183
+ }
2184
+ } else if (targetSlide >= _.slideCount) {
2185
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
2186
+ animSlide = 0;
2187
+ } else {
2188
+ animSlide = targetSlide - _.slideCount;
2189
+ }
2190
+ } else {
2191
+ animSlide = targetSlide;
2192
+ }
2193
+
2194
+ _.animating = true;
2195
+
2196
+ _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
2197
+
2198
+ oldSlide = _.currentSlide;
2199
+ _.currentSlide = animSlide;
2200
+
2201
+ _.setSlideClasses(_.currentSlide);
2202
+
2203
+ _.updateDots();
2204
+ _.updateArrows();
2205
+
2206
+ if (_.options.fade === true) {
2207
+ if (dontAnimate !== true) {
2208
+
2209
+ _.fadeSlideOut(oldSlide);
2210
+
2211
+ _.fadeSlide(animSlide, function() {
2212
+ _.postSlide(animSlide);
2213
+ });
2214
+
2215
+ } else {
2216
+ _.postSlide(animSlide);
2217
+ }
2218
+ _.animateHeight();
2219
+ return;
2220
+ }
2221
+
2222
+ if (dontAnimate !== true) {
2223
+ _.animateSlide(targetLeft, function() {
2224
+ _.postSlide(animSlide);
2225
+ });
2226
+ } else {
2227
+ _.postSlide(animSlide);
2228
+ }
2229
+
2230
+ };
2231
+
2232
+ Slick.prototype.startLoad = function() {
2233
+
2234
+ var _ = this;
2235
+
2236
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
2237
+
2238
+ _.$prevArrow.hide();
2239
+ _.$nextArrow.hide();
2240
+
2241
+ }
2242
+
2243
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
2244
+
2245
+ _.$dots.hide();
2246
+
2247
+ }
2248
+
2249
+ _.$slider.addClass('slick-loading');
2250
+
2251
+ };
2252
+
2253
+ Slick.prototype.swipeDirection = function() {
2254
+
2255
+ var xDist, yDist, r, swipeAngle, _ = this;
2256
+
2257
+ xDist = _.touchObject.startX - _.touchObject.curX;
2258
+ yDist = _.touchObject.startY - _.touchObject.curY;
2259
+ r = Math.atan2(yDist, xDist);
2260
+
2261
+ swipeAngle = Math.round(r * 180 / Math.PI);
2262
+ if (swipeAngle < 0) {
2263
+ swipeAngle = 360 - Math.abs(swipeAngle);
2264
+ }
2265
+
2266
+ if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
2267
+ return (_.options.rtl === false ? 'left' : 'right');
2268
+ }
2269
+ if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
2270
+ return (_.options.rtl === false ? 'left' : 'right');
2271
+ }
2272
+ if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
2273
+ return (_.options.rtl === false ? 'right' : 'left');
2274
+ }
2275
+ if (_.options.verticalSwiping === true) {
2276
+ if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
2277
+ return 'left';
2278
+ } else {
2279
+ return 'right';
2280
+ }
2281
+ }
2282
+
2283
+ return 'vertical';
2284
+
2285
+ };
2286
+
2287
+ Slick.prototype.swipeEnd = function(event) {
2288
+
2289
+ var _ = this,
2290
+ slideCount;
2291
+
2292
+ _.dragging = false;
2293
+
2294
+ _.shouldClick = (_.touchObject.swipeLength > 10) ? false : true;
2295
+
2296
+ if (_.touchObject.curX === undefined) {
2297
+ return false;
2298
+ }
2299
+
2300
+ if (_.touchObject.edgeHit === true) {
2301
+ _.$slider.trigger('edge', [_, _.swipeDirection()]);
2302
+ }
2303
+
2304
+ if (_.touchObject.swipeLength >= _.touchObject.minSwipe) {
2305
+
2306
+ switch (_.swipeDirection()) {
2307
+ case 'left':
2308
+ slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide + _.getSlideCount()) : _.currentSlide + _.getSlideCount();
2309
+ _.slideHandler(slideCount);
2310
+ _.currentDirection = 0;
2311
+ _.touchObject = {};
2312
+ _.$slider.trigger('swipe', [_, 'left']);
2313
+ break;
2314
+
2315
+ case 'right':
2316
+ slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide - _.getSlideCount()) : _.currentSlide - _.getSlideCount();
2317
+ _.slideHandler(slideCount);
2318
+ _.currentDirection = 1;
2319
+ _.touchObject = {};
2320
+ _.$slider.trigger('swipe', [_, 'right']);
2321
+ break;
2322
+ }
2323
+ } else {
2324
+ if (_.touchObject.startX !== _.touchObject.curX) {
2325
+ _.slideHandler(_.currentSlide);
2326
+ _.touchObject = {};
2327
+ }
2328
+ }
2329
+
2330
+ };
2331
+
2332
+ Slick.prototype.swipeHandler = function(event) {
2333
+
2334
+ var _ = this;
2335
+
2336
+ if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
2337
+ return;
2338
+ } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
2339
+ return;
2340
+ }
2341
+
2342
+ _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
2343
+ event.originalEvent.touches.length : 1;
2344
+
2345
+ _.touchObject.minSwipe = _.listWidth / _.options
2346
+ .touchThreshold;
2347
+
2348
+ if (_.options.verticalSwiping === true) {
2349
+ _.touchObject.minSwipe = _.listHeight / _.options
2350
+ .touchThreshold;
2351
+ }
2352
+
2353
+ switch (event.data.action) {
2354
+
2355
+ case 'start':
2356
+ _.swipeStart(event);
2357
+ break;
2358
+
2359
+ case 'move':
2360
+ _.swipeMove(event);
2361
+ break;
2362
+
2363
+ case 'end':
2364
+ _.swipeEnd(event);
2365
+ break;
2366
+
2367
+ }
2368
+
2369
+ };
2370
+
2371
+ Slick.prototype.swipeMove = function(event) {
2372
+
2373
+ var _ = this,
2374
+ edgeWasHit = false,
2375
+ curLeft, swipeDirection, swipeLength, positionOffset, touches;
2376
+
2377
+ touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
2378
+
2379
+ if (!_.dragging || touches && touches.length !== 1) {
2380
+ return false;
2381
+ }
2382
+
2383
+ curLeft = _.getLeft(_.currentSlide);
2384
+
2385
+ _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
2386
+ _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
2387
+
2388
+ _.touchObject.swipeLength = Math.round(Math.sqrt(
2389
+ Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
2390
+
2391
+ if (_.options.verticalSwiping === true) {
2392
+ _.touchObject.swipeLength = Math.round(Math.sqrt(
2393
+ Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
2394
+ }
2395
+
2396
+ swipeDirection = _.swipeDirection();
2397
+
2398
+ if (swipeDirection === 'vertical') {
2399
+ return;
2400
+ }
2401
+
2402
+ if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
2403
+ event.preventDefault();
2404
+ }
2405
+
2406
+ positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
2407
+ if (_.options.verticalSwiping === true) {
2408
+ positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
2409
+ }
2410
+
2411
+
2412
+ swipeLength = _.touchObject.swipeLength;
2413
+
2414
+ _.touchObject.edgeHit = false;
2415
+
2416
+ if (_.options.infinite === false) {
2417
+ if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
2418
+ swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
2419
+ _.touchObject.edgeHit = true;
2420
+ }
2421
+ }
2422
+
2423
+ if (_.options.vertical === false) {
2424
+ _.swipeLeft = curLeft + swipeLength * positionOffset;
2425
+ } else {
2426
+ _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
2427
+ }
2428
+ if (_.options.verticalSwiping === true) {
2429
+ _.swipeLeft = curLeft + swipeLength * positionOffset;
2430
+ }
2431
+
2432
+ if (_.options.fade === true || _.options.touchMove === false) {
2433
+ return false;
2434
+ }
2435
+
2436
+ if (_.animating === true) {
2437
+ _.swipeLeft = null;
2438
+ return false;
2439
+ }
2440
+
2441
+ _.setCSS(_.swipeLeft);
2442
+
2443
+ };
2444
+
2445
+ Slick.prototype.swipeStart = function(event) {
2446
+
2447
+ var _ = this,
2448
+ touches;
2449
+
2450
+ if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
2451
+ _.touchObject = {};
2452
+ return false;
2453
+ }
2454
+
2455
+ if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
2456
+ touches = event.originalEvent.touches[0];
2457
+ }
2458
+
2459
+ _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
2460
+ _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
2461
+
2462
+ _.dragging = true;
2463
+
2464
+ };
2465
+
2466
+ Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {
2467
+
2468
+ var _ = this;
2469
+
2470
+ if (_.$slidesCache !== null) {
2471
+
2472
+ _.unload();
2473
+
2474
+ _.$slideTrack.children(this.options.slide).detach();
2475
+
2476
+ _.$slidesCache.appendTo(_.$slideTrack);
2477
+
2478
+ _.reinit();
2479
+
2480
+ }
2481
+
2482
+ };
2483
+
2484
+ Slick.prototype.unload = function() {
2485
+
2486
+ var _ = this;
2487
+
2488
+ $('.slick-cloned', _.$slider).remove();
2489
+
2490
+ if (_.$dots) {
2491
+ _.$dots.remove();
2492
+ }
2493
+
2494
+ if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
2495
+ _.$prevArrow.remove();
2496
+ }
2497
+
2498
+ if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
2499
+ _.$nextArrow.remove();
2500
+ }
2501
+
2502
+ _.$slides
2503
+ .removeClass('slick-slide slick-active slick-visible slick-current')
2504
+ .attr('aria-hidden', 'true')
2505
+ .css('width', '');
2506
+
2507
+ };
2508
+
2509
+ Slick.prototype.unslick = function(fromBreakpoint) {
2510
+
2511
+ var _ = this;
2512
+ _.$slider.trigger('unslick', [_, fromBreakpoint]);
2513
+ _.destroy();
2514
+
2515
+ };
2516
+
2517
+ Slick.prototype.updateArrows = function() {
2518
+
2519
+ var _ = this,
2520
+ centerOffset;
2521
+
2522
+ centerOffset = Math.floor(_.options.slidesToShow / 2);
2523
+
2524
+ if ( _.options.arrows === true &&
2525
+ _.slideCount > _.options.slidesToShow &&
2526
+ !_.options.infinite ) {
2527
+
2528
+ _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2529
+ _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2530
+
2531
+ if (_.currentSlide === 0) {
2532
+
2533
+ _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2534
+ _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2535
+
2536
+ } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
2537
+
2538
+ _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2539
+ _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2540
+
2541
+ } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
2542
+
2543
+ _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2544
+ _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2545
+
2546
+ }
2547
+
2548
+ }
2549
+
2550
+ };
2551
+
2552
+ Slick.prototype.updateDots = function() {
2553
+
2554
+ var _ = this;
2555
+
2556
+ if (_.$dots !== null) {
2557
+
2558
+ _.$dots
2559
+ .find('li')
2560
+ .removeClass('slick-active')
2561
+ .attr('aria-hidden', 'true');
2562
+
2563
+ _.$dots
2564
+ .find('li')
2565
+ .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
2566
+ .addClass('slick-active')
2567
+ .attr('aria-hidden', 'false');
2568
+
2569
+ }
2570
+
2571
+ };
2572
+
2573
+ Slick.prototype.visibility = function() {
2574
+
2575
+ var _ = this;
2576
+
2577
+ if (document[_.hidden]) {
2578
+ _.paused = true;
2579
+ _.autoPlayClear();
2580
+ } else {
2581
+ if (_.options.autoplay === true) {
2582
+ _.paused = false;
2583
+ _.autoPlay();
2584
+ }
2585
+ }
2586
+
2587
+ };
2588
+ Slick.prototype.initADA = function() {
2589
+ var _ = this;
2590
+ _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
2591
+ 'aria-hidden': 'true',
2592
+ 'tabindex': '-1'
2593
+ }).find('a, input, button, select').attr({
2594
+ 'tabindex': '-1'
2595
+ });
2596
+
2597
+ _.$slideTrack.attr('role', 'listbox');
2598
+
2599
+ _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
2600
+ $(this).attr({
2601
+ 'role': 'option',
2602
+ 'aria-describedby': 'slick-slide' + _.instanceUid + i + ''
2603
+ });
2604
+ });
2605
+
2606
+ if (_.$dots !== null) {
2607
+ _.$dots.attr('role', 'tablist').find('li').each(function(i) {
2608
+ $(this).attr({
2609
+ 'role': 'presentation',
2610
+ 'aria-selected': 'false',
2611
+ 'aria-controls': 'navigation' + _.instanceUid + i + '',
2612
+ 'id': 'slick-slide' + _.instanceUid + i + ''
2613
+ });
2614
+ })
2615
+ .first().attr('aria-selected', 'true').end()
2616
+ .find('button').attr('role', 'button').end()
2617
+ .closest('div').attr('role', 'toolbar');
2618
+ }
2619
+ _.activateADA();
2620
+
2621
+ };
2622
+
2623
+ Slick.prototype.activateADA = function() {
2624
+ var _ = this;
2625
+
2626
+ _.$slideTrack.find('.slick-active').attr({
2627
+ 'aria-hidden': 'false'
2628
+ }).find('a, input, button, select').attr({
2629
+ 'tabindex': '0'
2630
+ });
2631
+
2632
+ };
2633
+
2634
+ Slick.prototype.focusHandler = function() {
2635
+ var _ = this;
2636
+ _.$slider.on('focus.slick blur.slick', '*', function(event) {
2637
+ event.stopImmediatePropagation();
2638
+ var sf = $(this);
2639
+ setTimeout(function() {
2640
+ if (_.isPlay) {
2641
+ if (sf.is(':focus')) {
2642
+ _.autoPlayClear();
2643
+ _.paused = true;
2644
+ } else {
2645
+ _.paused = false;
2646
+ _.autoPlay();
2647
+ }
2648
+ }
2649
+ }, 0);
2650
+ });
2651
+ };
2652
+
2653
+ $.fn.slick = function() {
2654
+ var _ = this,
2655
+ opt = arguments[0],
2656
+ args = Array.prototype.slice.call(arguments, 1),
2657
+ l = _.length,
2658
+ i,
2659
+ ret;
2660
+ for (i = 0; i < l; i++) {
2661
+ if (typeof opt == 'object' || typeof opt == 'undefined')
2662
+ _[i].slick = new Slick(_[i], opt);
2663
+ else
2664
+ ret = _[i].slick[opt].apply(_[i].slick, args);
2665
+ if (typeof ret != 'undefined') return ret;
2666
+ }
2667
+ return _;
2668
+ };
2669
+
2670
+ }));
assets/js/slick.min.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ _ _ _ _
3
+ ___| (_) ___| | __ (_)___
4
+ / __| | |/ __| |/ / | / __|
5
+ \__ \ | | (__| < _ | \__ \
6
+ |___/_|_|\___|_|\_(_)/ |___/
7
+ |__/
8
+
9
+ Version: 1.5.9
10
+ Author: Ken Wheeler
11
+ Website: http://kenwheeler.github.io
12
+ Docs: http://kenwheeler.github.io/slick
13
+ Repo: http://github.com/kenwheeler/slick
14
+ Issues: http://github.com/kenwheeler/slick/issues
15
+
16
+ */
17
+ !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(a,b){return'<button type="button" data-role="none" role="button" aria-required="false" tabindex="0">'+(b+1)+"</button>"},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!1,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.hidden="hidden",e.paused=!1,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,f,d),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0),e.checkResponsive(!0)}var b=0;return c}(),b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),e.options.vertical===!1?d[e.animType]="translate3d("+b+"px, 0px, 0px)":d[e.animType]="translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.asNavFor=function(b){var c=this,d=c.options.asNavFor;d&&null!==d&&(d=a(d).not(c.$slider)),null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};b.options.fade===!1?c[b.transitionType]=b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:c[b.transitionType]="opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer),a.slideCount>a.options.slidesToShow&&a.paused!==!0&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this;a.options.infinite===!1?1===a.direction?(a.currentSlide+1===a.slideCount-1&&(a.direction=0),a.slideHandler(a.currentSlide+a.options.slidesToScroll)):(a.currentSlide-1===0&&(a.direction=1),a.slideHandler(a.currentSlide-a.options.slidesToScroll)):a.slideHandler(a.currentSlide+a.options.slidesToScroll)},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass("slick-arrow"),b.$nextArrow=a(b.options.nextArrow).addClass("slick-arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(d='<ul class="'+b.options.dotsClass+'">',c=0;c<=b.getDotCount();c+=1)d+="<li>"+b.options.customPaging.call(this,b,c)+"</li>";d+="</ul>",b.$dots=a(d).appendTo(b.options.appendDots),b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr("data-slick-index",b).data("originalStyling",a(c).attr("style")||"")}),b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),(b.options.centerMode===!0||b.options.swipeToSlide===!0)&&(b.options.slidesToScroll=1),a("img[data-lazy]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.buildRows=function(){var b,c,d,e,f,g,h,a=this;if(e=document.createDocumentFragment(),g=a.$slider.children(),a.options.rows>1){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;f>b;b++){var i=document.createElement("div");for(c=0;c<a.options.rows;c++){var j=document.createElement("div");for(d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.html(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if("window"===d.respondTo?g=j:"slider"===d.respondTo?g=i:"min"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){f=null;for(e in d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(d.originalSettings.mobileFirst===!1?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint?(f!==d.activeBreakpoint||c)&&(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||h===!1||d.$slider.trigger("breakpoint",[d,h])}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.target);switch(e.is("a")&&b.preventDefault(),e.is("li")||(e=e.closest("li")),h=d.slideCount%d.options.slidesToScroll!==0,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var i=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c),e.children().trigger("focus");break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&(a("li",b.$dots).off("click.slick",b.changeSlide),b.options.pauseOnDotsHover===!0&&b.options.autoplay===!0&&a("li",b.$dots).off("mouseenter.slick",a.proxy(b.setPaused,b,!0)).off("mouseleave.slick",a.proxy(b.setPaused,b,!1))),b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off("click.slick",b.changeSlide),b.$nextArrow&&b.$nextArrow.off("click.slick",b.changeSlide)),b.$list.off("touchstart.slick mousedown.slick",b.swipeHandler),b.$list.off("touchmove.slick mousemove.slick",b.swipeHandler),b.$list.off("touchend.slick mouseup.slick",b.swipeHandler),b.$list.off("touchcancel.slick mouseleave.slick",b.swipeHandler),b.$list.off("click.slick",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.$list.off("mouseenter.slick",a.proxy(b.setPaused,b,!0)),b.$list.off("mouseleave.slick",a.proxy(b.setPaused,b,!1)),b.options.accessibility===!0&&b.$list.off("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().off("click.slick",b.selectHandler),a(window).off("orientationchange.slick.slick-"+b.instanceUid,b.orientationChange),a(window).off("resize.slick.slick-"+b.instanceUid,b.resize),a("[draggable!=true]",b.$slideTrack).off("dragstart",b.preventDefault),a(window).off("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).off("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.cleanUpRows=function(){var b,a=this;a.options.rows>1&&(b=a.$slides.children().children(),b.removeAttr("style"),a.$slider.html(b))},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a(".slick-cloned",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.prevArrow)&&c.$prevArrow.remove()),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.nextArrow)&&c.$nextArrow.remove()),c.$slides&&(c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass("slick-slider"),c.$slider.removeClass("slick-initialized"),c.unslicked=!0,b||c.$slider.trigger("destroy",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;b.cssTransitions===!1?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.$slidesCache=b.$slides,b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(a.options.centerMode===!0)d=a.slideCount;else for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=b.slideWidth*b.options.slidesToShow*-1,e=d*b.options.slidesToShow*-1),b.slideCount%b.options.slidesToScroll!==0&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth*-1,e=(b.options.slidesToShow-(a-b.slideCount))*d*-1):(b.slideOffset=b.slideCount%b.options.slidesToScroll*b.slideWidth*-1,e=b.slideCount%b.options.slidesToScroll*d*-1))):a+b.options.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?a*b.slideWidth*-1+b.slideOffset:a*d*-1+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,b.options.centerMode===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow+1),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?e=a.slideCount:(b=-1*a.options.slidesToScroll,c=-1*a.options.slidesToScroll,e=2*a.slideCount);e>b;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find(".slick-slide").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),c=Math.abs(a(d).attr("data-slick-index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass("slick-initialized")||(a(c.$slider).addClass("slick-initialized"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots()),b&&c.$slider.trigger("init",[c]),c.options.accessibility===!0&&c.initADA()},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&b.options.autoplay===!0&&a("li",b.$dots).on("mouseenter.slick",a.proxy(b.setPaused,b,!0)).on("mouseleave.slick",a.proxy(b.setPaused,b,!1))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),b.$list.on("mouseenter.slick",a.proxy(b.setPaused,b,!0)),b.$list.on("mouseleave.slick",a.proxy(b.setPaused,b,!1)),b.options.accessibility===!0&&b.$list.on("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on("resize.slick.slick-"+b.instanceUid,a.proxy(b.resize,b)),a("[draggable!=true]",b.$slideTrack).on("dragstart",b.preventDefault),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show(),a.options.autoplay===!0&&a.autoPlay()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:"previous"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:"next"}}))},b.prototype.lazyLoad=function(){function g(b){a("img[data-lazy]",b).each(function(){var b=a(this),c=a(this).attr("data-lazy"),d=document.createElement("img");d.onload=function(){b.animate({opacity:0},100,function(){b.attr("src",c).animate({opacity:1},200,function(){b.removeAttr("data-lazy").removeClass("slick-loading")})})},d.src=c})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=e+b.options.slidesToShow,b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find(".slick-slide").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find(".slick-slide"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:"next"}})},b.prototype.orientationChange=function(){var a=this;a.checkResponsive(),a.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.paused=!1,a.autoPlay()},b.prototype.postSlide=function(a){var b=this;b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay===!0&&b.paused===!1&&b.autoPlay(),b.options.accessibility===!0&&b.initADA()},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:"previous"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(){var c,d,b=this;c=a("img[data-lazy]",b.$slider).length,c>0&&(d=a("img[data-lazy]",b.$slider).first(),d.attr("src",null),d.attr("src",d.attr("data-lazy")).removeClass("slick-loading").load(function(){d.removeAttr("data-lazy"),b.progressiveLazyLoad(),b.options.adaptiveHeight===!0&&b.setPosition()}).error(function(){d.removeAttr("data-lazy"),b.progressiveLazyLoad()}))},b.prototype.refresh=function(b){var d,e,c=this;e=c.slideCount-c.options.slidesToShow,c.options.infinite||(c.slideCount<=c.options.slidesToShow?c.currentSlide=0:c.currentSlide>e&&(c.currentSlide=e)),d=c.currentSlide,c.destroy(!0),a.extend(c,c.initials,{currentSlide:d}),c.init(),b||c.changeSlide({data:{message:"index",index:d}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if("array"===a.type(f)&&f.length){b.respondTo=b.options.respondTo||"window";for(c in f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;e>=0;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.checkResponsive(!1,!0),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses(0),b.setPosition(),b.$slider.trigger("reInit",[b]),b.options.autoplay===!0&&b.focusHandler()},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return"boolean"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,d.slideCount<1||0>a||a>d.slideCount-1?!1:(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,void d.reinit())},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a),d="left"==b.positionProp?Math.ceil(a)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(".slick-slide").length))):a.options.variableWidth===!0?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(".slick-slide").length)));var b=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children(".slick-slide").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=b.slideWidth*d*-1,b.options.rtl===!0?a(e).css({position:"relative",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}):a(e).css({position:"relative",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css("height",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(b,c,d){var f,g,e=this;if("responsive"===b&&"array"===a.type(c))for(g in c)if("array"!==a.type(e.options.responsive))e.options.responsive=[c[g]];else{for(f=e.options.responsive.length-1;f>=0;)e.options.responsive[f].breakpoint===c[g].breakpoint&&e.options.responsive.splice(f,1),f--;e.options.responsive.push(c[g])}else e.options[b]=c;d===!0&&(e.unload(),e.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),(void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.msTransition)&&a.options.useCSS===!0&&(a.cssTransitions=!0),a.options.fade&&("number"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=a.options.useTransform&&null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;d=b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),b.$slides.eq(a).addClass("slick-current"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass("slick-active").attr("aria-hidden","false"):(e=b.options.slidesToShow+a,d.slice(e-c+1,e+c+2).addClass("slick-active").attr("aria-hidden","false")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center")),b.$slides.eq(a).addClass("slick-center")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):d.length<=b.options.slidesToShow?d.addClass("slick-active").attr("aria-hidden","false"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass("slick-active").attr("aria-hidden","false"):d.slice(e,e+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d-b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned");b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.setPaused=function(a){var b=this;b.options.autoplay===!0&&b.options.pauseOnHover===!0&&(b.paused=a,a?b.autoPlayClear():b.autoPlay())},b.prototype.selectHandler=function(b){var c=this,d=a(b.target).is(".slick-slide")?a(b.target):a(b.target).parents(".slick-slide"),e=parseInt(d.attr("data-slick-index"));return e||(e=0),c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(e),void c.asNavFor(e)):void c.slideHandler(e)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,h=null,i=this;return b=b||!1,i.animating===!0&&i.options.waitForAnimate===!0||i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(0>a||a>i.getDotCount()*i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d);
18
+ }):i.postSlide(d))):i.options.infinite===!1&&i.options.centerMode===!0&&(0>a||a>i.slideCount-i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):(i.options.autoplay===!0&&clearInterval(i.autoPlayTimer),e=0>d?i.slideCount%i.options.slidesToScroll!==0?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?i.slideCount%i.options.slidesToScroll!==0?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?(i.fadeSlideOut(f),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),void i.animateHeight()):void(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e))))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?e.options.rtl===!1?"left":"right":360>=d&&d>=315?e.options.rtl===!1?"left":"right":d>=135&&225>=d?e.options.rtl===!1?"right":"left":e.options.verticalSwiping===!0?d>=35&&135>=d?"left":"right":"vertical"},b.prototype.swipeEnd=function(a){var c,b=this;if(b.dragging=!1,b.shouldClick=b.touchObject.swipeLength>10?!1:!0,void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe)switch(b.swipeDirection()){case"left":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.slideHandler(c),b.currentDirection=0,b.touchObject={},b.$slider.trigger("swipe",[b,"left"]);break;case"right":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.slideHandler(c),b.currentDirection=1,b.touchObject={},b.$slider.trigger("swipe",[b,"right"])}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>4&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.options.vertical===!1?b.swipeLeft=d+f*g:b.swipeLeft=d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):void b.setCSS(b.swipeLeft)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return 1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,void(b.dragging=!0))},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger("unslick",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;document[a.hidden]?(a.paused=!0,a.autoPlayClear()):a.options.autoplay===!0&&(a.paused=!1,a.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),b.$slideTrack.attr("role","listbox"),b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function(c){a(this).attr({role:"option","aria-describedby":"slick-slide"+b.instanceUid+c})}),null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(c){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+c,id:"slick-slide"+b.instanceUid+c})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),b.activateADA()},b.prototype.activateADA=function(){var a=this;a.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},b.prototype.focusHandler=function(){var b=this;b.$slider.on("focus.slick blur.slick","*",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.isPlay&&(d.is(":focus")?(b.autoPlayClear(),b.paused=!0):(b.paused=!1,b.autoPlay()))},0)})},a.fn.slick=function(){var f,g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length;for(f=0;e>f;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a}});
includes/class-lsow-setup.php ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) {
4
+ exit;
5
+ }
6
+
7
+ if (!class_exists('LSOW_Setup')):
8
+
9
+ class LSOW_Setup {
10
+
11
+ public function __construct() {
12
+
13
+ add_filter('siteorigin_widgets_widget_folders', array($this, 'add_widgets_collection'));
14
+ add_filter('siteorigin_widgets_field_class_prefixes', array($this, 'custom_fields_class_prefixes'));
15
+ add_filter('siteorigin_widgets_field_class_paths', array($this, 'custom_fields_class_paths'));
16
+
17
+ add_filter('siteorigin_panels_widget_dialog_tabs', array($this, 'add_widget_tabs'), 20);
18
+
19
+ add_filter('siteorigin_panels_widgets', array($this, 'add_bundle_groups'), 11);
20
+
21
+
22
+ add_filter('siteorigin_panels_row_style_fields', array($this, 'row_style_fields'));
23
+
24
+
25
+ add_filter('siteorigin_panels_row_style_attributes', array($this, 'row_style_attributes'), 10, 2);
26
+
27
+ // Main filter to add any custom CSS.
28
+ add_filter('siteorigin_panels_css_object', array($this, 'filter_css_object'), 10, 3);
29
+
30
+
31
+ }
32
+
33
+ function row_style_fields($fields) {
34
+
35
+ $fields['top_padding'] = array(
36
+ 'name' => __('Top Padding', 'livemesh-so-widgets'),
37
+ 'type' => 'measurement',
38
+ 'group' => 'layout',
39
+ 'description' => __('Top Padding for the row.', 'livemesh-so-widgets'),
40
+ 'priority' => 11,
41
+ 'multiple' => true
42
+ );
43
+
44
+ $fields['bottom_padding'] = array(
45
+ 'name' => __('Bottom Padding', 'livemesh-so-widgets'),
46
+ 'type' => 'measurement',
47
+ 'group' => 'layout',
48
+ 'description' => __('Bottom Padding for the row.', 'livemesh-so-widgets'),
49
+ 'priority' => 12,
50
+ 'multiple' => true
51
+ );
52
+
53
+ $fields['tablet_top_padding'] = array(
54
+ 'name' => __('Top Padding in Tablet resolution', 'livemesh-so-widgets'),
55
+ 'type' => 'measurement',
56
+ 'group' => 'layout',
57
+ 'description' => __('Top Padding for the row in tablet resolutions.', 'livemesh-so-widgets'),
58
+ 'priority' => 13,
59
+ 'multiple' => true
60
+ );
61
+
62
+ $fields['tablet_bottom_padding'] = array(
63
+ 'name' => __('Bottom Padding in Tablet resolution', 'livemesh-so-widgets'),
64
+ 'type' => 'measurement',
65
+ 'group' => 'layout',
66
+ 'description' => __('Bottom Padding for the row in tablet resolutions.', 'livemesh-so-widgets'),
67
+ 'priority' => 14,
68
+ 'multiple' => true
69
+ );
70
+
71
+ $fields['mobile_top_padding'] = array(
72
+ 'name' => __('Top Padding in Mobile resolution', 'livemesh-so-widgets'),
73
+ 'type' => 'measurement',
74
+ 'group' => 'layout',
75
+ 'description' => __('Top Padding for the row in mobile resolutions.', 'livemesh-so-widgets'),
76
+ 'priority' => 15,
77
+ 'multiple' => true
78
+ );
79
+
80
+ $fields['mobile_bottom_padding'] = array(
81
+ 'name' => __('Bottom Padding in Mobile resolution', 'livemesh-so-widgets'),
82
+ 'type' => 'measurement',
83
+ 'group' => 'layout',
84
+ 'description' => __('Bottom Padding for the row in mobile resolutions.', 'livemesh-so-widgets'),
85
+ 'priority' => 16,
86
+ 'multiple' => true
87
+ );
88
+
89
+ /* Add design fields */
90
+
91
+ $fields['lsow_dark_bg'] = array(
92
+ 'name' => __('Dark Background?', 'livemesh-so-widgets'),
93
+ 'type' => 'checkbox',
94
+ 'group' => 'design',
95
+ 'label' => __('Indicate if this row has a dark background color. Dark color scheme will be applied for all widgets in this row.', 'livemesh-so-widgets'),
96
+ 'default' => false,
97
+ 'priority' => 4,
98
+ );
99
+
100
+
101
+ return $fields;
102
+ }
103
+
104
+ function row_style_attributes($attributes, $args) {
105
+
106
+ if (!empty($args['lsow_dark_bg']))
107
+ {
108
+ if (empty($attributes['class']))
109
+ $attributes['class'] = array();
110
+
111
+ $attributes['class'][] = 'lsow-dark-bg';
112
+ }
113
+
114
+ return $attributes;
115
+ }
116
+
117
+ function filter_css_object($css, $panels_data, $post_id) {
118
+
119
+ foreach ($panels_data['grids'] as $gi => $grid) {
120
+
121
+ $top_padding = (isset($grid['style']['top_padding']) ? $grid['style']['top_padding'] : null);
122
+ $bottom_padding = (isset($grid['style']['bottom_padding']) ? $grid['style']['bottom_padding'] : null);;
123
+
124
+ // Filter the bottom margin for this row with the arguments
125
+ if ($top_padding)
126
+ $css->add_row_css($post_id, $gi, '.panel-row-style', array('padding-top' => $top_padding), 1920);
127
+ if ($bottom_padding)
128
+ $css->add_row_css($post_id, $gi, '.panel-row-style', array('padding-bottom' => $bottom_padding), 1920);
129
+
130
+ $top_padding = (isset($grid['style']['tablet_top_padding']) ? $grid['style']['tablet_top_padding'] : null);
131
+ $bottom_padding = (isset($grid['style']['tablet_bottom_padding']) ? $grid['style']['tablet_bottom_padding'] : null);;
132
+
133
+ // Filter the bottom margin for this row with the arguments
134
+ if ($top_padding)
135
+ $css->add_row_css($post_id, $gi, '.panel-row-style', array('padding-top' => $top_padding), 960);
136
+ if ($bottom_padding)
137
+ $css->add_row_css($post_id, $gi, '.panel-row-style', array('padding-bottom' => $bottom_padding), 960);
138
+
139
+
140
+ $top_padding = (isset($grid['style']['mobile_top_padding']) ? $grid['style']['mobile_top_padding'] : null);
141
+ $bottom_padding = (isset($grid['style']['mobile_bottom_padding']) ? $grid['style']['mobile_bottom_padding'] : null);;
142
+
143
+ // Filter the bottom margin for this row with the arguments
144
+ if ($top_padding)
145
+ $css->add_row_css($post_id, $gi, '.panel-row-style', array('padding-top' => $top_padding), 478);
146
+ if ($bottom_padding)
147
+ $css->add_row_css($post_id, $gi, '.panel-row-style', array('padding-bottom' => $bottom_padding), 478);
148
+
149
+
150
+ }
151
+ return $css;
152
+ }
153
+
154
+ function add_widgets_collection($folders) {
155
+ $folders[] = LSOW_PLUGIN_DIR . 'includes/widgets/';
156
+ return $folders;
157
+ }
158
+
159
+
160
+ // Placing all widgets under the 'SiteOrigin Widgets' Tab
161
+ function add_widget_tabs($tabs) {
162
+ $tabs[] = array(
163
+ 'title' => __('Livemesh SiteOrigin Widgets', 'livemesh-so-widgets'),
164
+ 'filter' => array(
165
+ 'groups' => array('lsow-widgets')
166
+ )
167
+ );
168
+ return $tabs;
169
+ }
170
+
171
+
172
+ // Adding group for all Widgets
173
+ function add_bundle_groups($widgets) {
174
+ foreach ($widgets as $class => &$widget) {
175
+ if (preg_match('/LSOW_(.*)_Widget/', $class, $matches)) {
176
+ $widget['groups'] = array('lsow-widgets');
177
+ }
178
+ }
179
+ return $widgets;
180
+ }
181
+
182
+
183
+ function custom_fields_class_prefixes($class_prefixes) {
184
+ $class_prefixes[] = 'LSOW_Custom_Field_';
185
+ return $class_prefixes;
186
+ }
187
+
188
+ function custom_fields_class_paths($class_paths) {
189
+ $class_paths[] = LSOW_PLUGIN_DIR . 'includes/custom-fields/';
190
+ return $class_paths;
191
+ }
192
+
193
+ }
194
+
195
+ endif;
196
+
197
+ new LSOW_Setup();
includes/helper-functions.php ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if (!defined('ABSPATH'))
5
+ exit;
6
+
7
+
8
+ if (!function_exists('lsow_get_terms')) {
9
+
10
+ function lsow_get_terms($taxonomy) {
11
+
12
+ global $wpdb;
13
+
14
+ $term_coll = array();
15
+
16
+ if (taxonomy_exists($taxonomy)) {
17
+ $terms = get_terms($taxonomy); // Get all terms of a taxonomy
18
+
19
+ if ($terms && !is_wp_error($terms)) {
20
+ foreach ($terms as $term) {
21
+ $term_coll[$term->term_id] = $term->name;
22
+ }
23
+ }
24
+ }
25
+ else {
26
+
27
+ $qt = 'SELECT * FROM ' . $wpdb->terms . ' AS t INNER JOIN ' . $wpdb->term_taxonomy . ' AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = "' . $taxonomy . '" AND tt.count > 0 ORDER BY t.term_id DESC LIMIT 0 , 30';
28
+
29
+ $terms = $wpdb->get_results($qt, ARRAY_A);
30
+
31
+ if ($terms && !is_wp_error($terms)) {
32
+ foreach ($terms as $term) {
33
+ $term_coll[$term['term_id']] = $term['name'];
34
+ }
35
+ }
36
+ }
37
+
38
+ return $term_coll;
39
+ }
40
+ }
41
+
42
+ if (!function_exists('lsow_entry_terms_list')) {
43
+
44
+ function lsow_entry_terms_list($taxonomy = 'category', $separator = ', ', $before = ' ', $after = ' ') {
45
+ global $post;
46
+
47
+ $output = '<span class="lsow-' . $taxonomy . '-list">';
48
+ $output .= get_the_term_list($post->ID, $taxonomy, $before, $separator, $after);
49
+ $output .= '</span>';
50
+
51
+ return $output;
52
+ }
53
+ }
54
+
55
+ if (!function_exists('lsow_get_posts')) {
56
+
57
+ function lsow_get_posts() {
58
+
59
+ $list = array();
60
+
61
+ $args = $args = array(
62
+ 'posts_per_page' => -1,
63
+ 'offset' => 0,
64
+ 'category' => '',
65
+ 'category_name' => '',
66
+ 'orderby' => 'date',
67
+ 'order' => 'DESC',
68
+ 'include' => '',
69
+ 'exclude' => '',
70
+ 'meta_key' => '',
71
+ 'meta_value' => '',
72
+ 'post_type' => 'post',
73
+ 'post_mime_type' => '',
74
+ 'post_parent' => '',
75
+ 'author' => '',
76
+ 'post_status' => 'publish',
77
+ 'suppress_filters' => true
78
+ );
79
+
80
+ $posts = get_posts($args);
81
+
82
+ if (!empty ($posts)) {
83
+ foreach ($posts as $post) {
84
+ $list[$post->ID] = $post->post_title;
85
+ }
86
+ }
87
+
88
+ return $list;
89
+ }
90
+ }
91
+
92
+ if (!function_exists('lsow_get_taxonomy_info')) {
93
+
94
+ function lsow_get_taxonomy_info($taxonomy) {
95
+ $output = '';
96
+ $terms = get_the_terms(get_the_ID(), $taxonomy);
97
+ if ($terms) {
98
+ $output .= '<div class="lsow-terms">';
99
+ $term_count = 0;
100
+ foreach ($terms as $term) {
101
+ if ($term_count != 0)
102
+ $output .= ', ';
103
+ $output .= '<a href="' . get_term_link($term->slug, $taxonomy) . '">' . $term->name . '</a>';
104
+ $term_count = $term_count + 1;
105
+ }
106
+ $output .= '</div>';
107
+ }
108
+ return $output;
109
+ }
110
+ }
111
+
112
+
113
+ /** Isotope filtering support for Portfolio pages * */
114
+
115
+ if (!function_exists('lsow_get_taxonomy_terms_filter')) {
116
+
117
+ function lsow_get_taxonomy_terms_filter($taxonomy, $chosen_terms = array()) {
118
+
119
+ $output = '';
120
+
121
+ $terms = get_terms($taxonomy);
122
+
123
+ if (!empty($terms)) {
124
+
125
+ $output .= '<div class="lsow-taxonomy-filter">';
126
+
127
+ $output .= '<div class="lsow-filter-item segment-0 lsow-active"><a data-value="*" href="#">' . esc_html__('All', 'livemesh-so-widgets') . '</a></div>';
128
+
129
+ $segment_count = 1;
130
+ foreach ($terms as $term) {
131
+
132
+ if (!empty($chosen_terms) && !in_array($term->term_id, $chosen_terms))
133
+ continue; // skip if this is not a chosen term
134
+
135
+ $output .= '<div class="lsow-filter-item segment-' . intval($segment_count) . '"><a href="#" data-value=".term-' . intval($term->term_id) . '" title="' . esc_html__('View all items filed under ', 'peak') . esc_attr($term->name) . '">' . esc_html($term->name) . '</a></div>';
136
+
137
+ $segment_count++;
138
+ }
139
+
140
+ $output .= '</div>';
141
+
142
+ }
143
+
144
+ return $output;
145
+ }
146
+ }
147
+
148
+ /* Return the css class name to help achieve the number of columns specified */
149
+
150
+ if (!function_exists('lsow_get_column_class')) {
151
+
152
+ function lsow_get_column_class($column_size = 3, $no_margin = false) {
153
+
154
+ $style_class = 'lsow-threecol';
155
+
156
+ $no_margin = lsow_to_boolean($no_margin); // make sure it is not string
157
+
158
+ $column_styles = array(
159
+ 1 => 'lsow-twelvecol',
160
+ 2 => 'lsow-sixcol',
161
+ 3 => 'lsow-fourcol',
162
+ 4 => 'lsow-threecol',
163
+ 5 => 'lsow-onefifthcol',
164
+ 6 => 'lsow-twocol',
165
+ 12 => 'lsow-onecol'
166
+ );
167
+
168
+ if (array_key_exists($column_size, $column_styles) && !empty($column_styles[$column_size])) {
169
+ $style_class = $column_styles[$column_size];
170
+ }
171
+
172
+ $style_class = $no_margin ? ($style_class . ' lsow-zero-margin') : $style_class;
173
+
174
+ return $style_class;
175
+ }
176
+ }
177
+
178
+ /*
179
+ * Converting string to boolean is a big one in PHP
180
+ */
181
+ if (!function_exists('lsow_to_boolean')) {
182
+
183
+ function lsow_to_boolean($value) {
184
+ if (!isset($value))
185
+ return false;
186
+ if ($value == 'true' || $value == '1')
187
+ $value = true;
188
+ elseif ($value == 'false' || $value == '0')
189
+ $value = false;
190
+ return (bool)$value; // Make sure you do not touch the value if the value is not a string
191
+ }
192
+ }
includes/widgets/lsow-carousel-widget/assets/banner.svg ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="128px" height="128px" viewBox="0 0 128 128" style="enable-background:new 0 0 128 128;" xml:space="preserve">
6
+ <g>
7
+ <circle style="fill:#88C5CC;" cx="64" cy="64" r="64"/>
8
+ <g>
9
+ <g>
10
+ <path style="fill:#F5F5F5;" d="M36,33h74c1.1,0,2,0.9,2,2v53c0,1.1-0.9,2-2,2H18c-1.1,0-2-0.9-2-2V54L36,33z"/>
11
+ <path style="fill:#E6E6E6;" d="M34,54c1.1,0,2-0.9,2-2V33L16,54H34z"/>
12
+ </g>
13
+ <g>
14
+ <rect x="46" y="41" style="fill:#E6E6E6;" width="59" height="4"/>
15
+ <rect x="46" y="49" style="fill:#E6E6E6;" width="59" height="4"/>
16
+ <rect x="23" y="57" style="fill:#E6E6E6;" width="82" height="4"/>
17
+ <rect x="23" y="66" style="fill:#E6E6E6;" width="82" height="4"/>
18
+ <rect x="23" y="75" style="fill:#E6E6E6;" width="70" height="4"/>
19
+ </g>
20
+ </g>
21
+ </g>
22
+ </svg>
includes/widgets/lsow-carousel-widget/css/style.css ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ .lsow-carousel .lsow-carousel-item {
2
+ position: relative;
3
+ }
4
+ .lsow-carousel.lsow-container {
5
+ max-width: none;
6
+ }
includes/widgets/lsow-carousel-widget/lsow-carousel-widget.php ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Widget Name: Livemesh Carousel
5
+ Description: Display a list of custom HTML content as a carousel.
6
+ Author: LiveMesh
7
+ Author URI: http://portfoliotheme.org
8
+ */
9
+
10
+ class LSOW_Carousel_Widget extends SiteOrigin_Widget {
11
+
12
+ private $custom_css;
13
+
14
+ function __construct() {
15
+ parent::__construct(
16
+ 'lsow-carousel',
17
+ __('Livemesh Carousel', 'livemesh-so-widgets'),
18
+ array(
19
+ 'description' => __('Display a collection of html elements as a carousel.', 'livemesh-so-widgets'),
20
+ 'panels_icon' => 'dashicons dashicons-minus',
21
+ 'help' => 'http://portfoliotheme.org/widgets-bundle/carousel-widget-documentation/'
22
+ ),
23
+ array(),
24
+ array(
25
+ 'title' => array(
26
+ 'type' => 'text',
27
+ 'label' => __('Title', 'livemesh-so-widgets'),
28
+ ),
29
+
30
+ 'elements' => array(
31
+ 'type' => 'repeater',
32
+ 'label' => __('HTML Elements', 'livemesh-so-widgets'),
33
+ 'item_name' => __('HTML Element', 'livemesh-so-widgets'),
34
+ 'item_label' => array(
35
+ 'selector' => "[id*='elements-name']",
36
+ 'update_event' => 'change',
37
+ 'value_method' => 'val'
38
+ ),
39
+ 'fields' => array(
40
+ 'name' => array(
41
+ 'type' => 'text',
42
+ 'label' => __('Name', 'livemesh-so-widgets'),
43
+ 'description' => __('The title to identify the HTML element', 'livemesh-so-widgets'),
44
+ ),
45
+
46
+ 'text' => array(
47
+ 'type' => 'tinymce',
48
+ 'label' => __('HTML element', 'livemesh-so-widgets'),
49
+ 'description' => __('The HTML content for the carousel item.', 'livemesh-so-widgets'),
50
+ ),
51
+ )
52
+ ),
53
+
54
+ 'settings' => array(
55
+ 'type' => 'section',
56
+ 'label' => __('General Settings', 'livemesh-so-widgets'),
57
+ 'fields' => array(
58
+
59
+ 'custom_css' => array(
60
+ 'type' => 'textarea',
61
+ 'label' => __('Custom CSS for presentation of the HTML elements. Will be embedded inline with the page.', 'livemesh-so-widgets'),
62
+ 'rows' => 20
63
+ ),
64
+ )
65
+ ),
66
+
67
+ 'carousel_settings' => array(
68
+ 'type' => 'section',
69
+ 'label' => __('Carousel Settings', 'livemesh-so-widgets'),
70
+ 'fields' => array(
71
+
72
+ 'arrows' => array(
73
+ 'type' => 'checkbox',
74
+ 'label' => __('Prev/Next Arrows?', 'livemesh-so-widgets'),
75
+ 'default' => true
76
+ ),
77
+
78
+ 'dots' => array(
79
+ 'type' => 'checkbox',
80
+ 'label' => __('Show dot indicators for navigation?', 'livemesh-so-widgets'),
81
+ ),
82
+
83
+ 'autoplay' => array(
84
+ 'type' => 'checkbox',
85
+ 'label' => __('Autoplay?', 'livemesh-so-widgets'),
86
+ 'description' => __('Should the carousel autoplay as in a slideshow.', 'livemesh-so-widgets'),
87
+ 'default' => false
88
+ ),
89
+
90
+
91
+ 'autoplay_speed' => array(
92
+ 'type' => 'number',
93
+ 'label' => __('Autoplay speed in ms', 'livemesh-so-widgets'),
94
+ 'default' => 3000
95
+ ),
96
+
97
+
98
+ 'animation_speed' => array(
99
+ 'type' => 'number',
100
+ 'label' => __('Autoplay animation speed in ms', 'livemesh-so-widgets'),
101
+ 'default' => 300
102
+ ),
103
+
104
+ 'pause_on_hover' => array(
105
+ 'type' => 'checkbox',
106
+ 'label' => __('Pause on mouse hover?', 'livemesh-so-widgets'),
107
+ 'default' => true
108
+ ),
109
+
110
+ 'display_columns' => array(
111
+ 'type' => 'slider',
112
+ 'label' => __('Columns per row', 'livemesh-so-widgets'),
113
+ 'min' => 1,
114
+ 'max' => 5,
115
+ 'integer' => true,
116
+ 'default' => 3
117
+ ),
118
+
119
+ 'scroll_columns' => array(
120
+ 'type' => 'slider',
121
+ 'label' => __('Columns to scroll', 'livemesh-so-widgets'),
122
+ 'min' => 1,
123
+ 'max' => 5,
124
+ 'integer' => true,
125
+ 'default' => 3
126
+ ),
127
+
128
+ 'gutter' => array(
129
+ 'type' => 'number',
130
+ 'label' => __('Gutter', 'livemesh-so-widgets'),
131
+ 'description' => __('Space between columns.', 'livemesh-so-widgets'),
132
+ 'default' => 10
133
+ ),
134
+
135
+ 'responsive' => array(
136
+ 'type' => 'section',
137
+ 'label' => __('Responsive', 'livemesh-so-widgets'),
138
+ 'hide' => true,
139
+ 'fields' => array(
140
+ 'tablet' => array(
141
+ 'type' => 'section',
142
+ 'label' => __('Tablet', 'livemesh-so-widgets'),
143
+ 'fields' => array(
144
+ 'display_columns' => array(
145
+ 'type' => 'slider',
146
+ 'label' => __('Columns per row', 'livemesh-so-widgets'),
147
+ 'min' => 1,
148
+ 'max' => 5,
149
+ 'integer' => true,
150
+ 'default' => 2
151
+ ),
152
+ 'scroll_columns' => array(
153
+ 'type' => 'slider',
154
+ 'label' => __('Columns to scroll', 'livemesh-so-widgets'),
155
+ 'min' => 1,
156
+ 'max' => 5,
157
+ 'integer' => true,
158
+ 'default' => 2
159
+ ),
160
+ 'gutter' => array(
161
+ 'type' => 'number',
162
+ 'label' => __('Gutter', 'livemesh-so-widgets'),
163
+ 'description' => __('Space between columns.', 'livemesh-so-widgets'),
164
+ 'default' => 10
165
+ ),
166
+ 'width' => array(
167
+ 'type' => 'text',
168
+ 'label' => __('Resolution', 'livemesh-so-widgets'),
169
+ 'description' => __('The resolution to treat as a tablet resolution.', 'livemesh-so-widgets'),
170
+ 'default' => 800,
171
+ 'sanitize' => 'intval',
172
+ )
173
+ )
174
+ ),
175
+ 'mobile' => array(
176
+ 'type' => 'section',
177
+ 'label' => __('Mobile Phone', 'livemesh-so-widgets'),
178
+ 'fields' => array(
179
+ 'display_columns' => array(
180
+ 'type' => 'slider',
181
+ 'label' => __('Columns per row', 'livemesh-so-widgets'),
182
+ 'min' => 1,
183
+ 'max' => 5,
184
+ 'integer' => true,
185
+ 'default' => 1
186
+ ),
187
+ 'scroll_columns' => array(
188
+ 'type' => 'slider',
189
+ 'label' => __('Columns to scroll', 'livemesh-so-widgets'),
190
+ 'min' => 1,
191
+ 'max' => 5,
192
+ 'integer' => true,
193
+ 'default' => 1
194
+ ),
195
+ 'gutter' => array(
196
+ 'type' => 'number',
197
+ 'label' => __('Gutter', 'livemesh-so-widgets'),
198
+ 'description' => __('Space between columns.', 'livemesh-so-widgets'),
199
+ 'default' => 10
200
+ ),
201
+ 'width' => array(
202
+ 'type' => 'text',
203
+ 'label' => __('Resolution', 'livemesh-so-widgets'),
204
+ 'description' => __('The resolution to treat as a mobile resolution.', 'livemesh-so-widgets'),
205
+ 'default' => 480,
206
+ 'sanitize' => 'intval',
207
+ )
208
+ )
209
+ )
210
+
211
+ )
212
+ ),
213
+ )
214
+ ),
215
+ )
216
+ );
217
+ }
218
+
219
+ function initialize() {
220
+
221
+ $this->register_frontend_scripts(
222
+ array(
223
+ array(
224
+ 'lsow-slick-carousel',
225
+ LSOW_PLUGIN_URL . 'assets/js/slick' . SOW_BUNDLE_JS_SUFFIX . '.js',
226
+ array('jquery'),
227
+ LSOW_VERSION
228
+ ),
229
+ )
230
+ );
231
+
232
+ $this->register_frontend_styles(
233
+ array(
234
+ array(
235
+ 'lsow-slick',
236
+ LSOW_PLUGIN_URL . 'assets/css/slick.css',
237
+ array(),
238
+ LSOW_VERSION
239
+ ),
240
+ )
241
+ );
242
+
243
+ $this->register_frontend_styles(array(
244
+ array(
245
+ 'lsow-carousel',
246
+ plugin_dir_url(__FILE__) . 'css/style.css'
247
+ )
248
+ )
249
+ );
250
+
251
+ add_action('wp_enqueue_scripts', array($this, 'init_custom_css'), 15); // load as late as possible
252
+
253
+ }
254
+
255
+ function modify_instance($instance) {
256
+ return $instance;
257
+ }
258
+
259
+ function init_custom_css() {
260
+
261
+ if (!is_active_widget(false, false, $this->id_base)) {
262
+ return;
263
+ }
264
+
265
+ $custom_css = '';
266
+
267
+ $instances = $this->get_settings();
268
+
269
+ if (array_key_exists($this->number, $instances)) {
270
+ $instance = $instances[$this->number];
271
+ if (!empty($instance))
272
+ $custom_css = $instance['settings']['custom_css'];
273
+ }
274
+
275
+ if ($custom_css <> '') {
276
+ $custom_css = $custom_css . "\n";
277
+ wp_add_inline_style('lsow-carousel', $custom_css); // after custom.css file
278
+ }
279
+
280
+ }
281
+
282
+ function get_less_variables($instance) {
283
+ return array(
284
+
285
+ 'gutter' => intval($instance['carousel_settings']['gutter']) . 'px',
286
+
287
+ // All the responsive sizes
288
+ 'tablet_width' => intval($instance['carousel_settings']['responsive']['tablet']['width']) . 'px',
289
+ 'tablet_gutter' => intval($instance['carousel_settings']['responsive']['tablet']['gutter']) . 'px',
290
+ 'mobile_width' => intval($instance['carousel_settings']['responsive']['mobile']['width']) . 'px',
291
+ 'mobile_gutter' => intval($instance['carousel_settings']['responsive']['mobile']['gutter']) . 'px',
292
+ );
293
+ }
294
+
295
+ function get_template_variables($instance, $args) {
296
+
297
+
298
+ $return = array(
299
+ 'elements' => !empty($instance['elements']) ? $instance['elements'] : array(),
300
+ 'settings' => $instance['settings'],
301
+ 'carousel_settings' => $instance['carousel_settings']
302
+ );
303
+
304
+ unset($return['carousel_settings']['responsive']);
305
+
306
+ $return['carousel_settings']['tablet_width'] = $instance['carousel_settings']['responsive']['tablet']['width'];
307
+ $return['carousel_settings']['tablet_display_columns'] = $instance['carousel_settings']['responsive']['tablet']['display_columns'];
308
+ $return['carousel_settings']['tablet_scroll_columns'] = $instance['carousel_settings']['responsive']['tablet']['scroll_columns'];
309
+ $return['carousel_settings']['mobile_width'] = $instance['carousel_settings']['responsive']['mobile']['width'];
310
+ $return['carousel_settings']['mobile_display_columns'] = intval($instance['carousel_settings']['responsive']['mobile']['display_columns']);
311
+ $return['carousel_settings']['mobile_scroll_columns'] = $instance['carousel_settings']['responsive']['mobile']['scroll_columns'];
312
+
313
+ return $return;
314
+ }
315
+
316
+ }
317
+
318
+ siteorigin_widget_register('lsow-carousel', __FILE__, 'LSOW_Carousel_Widget');
includes/widgets/lsow-carousel-widget/styles/default.less ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../../../../../so-widgets-bundle/base/less/mixins";
2
+
3
+ @gutter: 20px;
4
+ @tablet_width: 800px;
5
+ @tablet_gutter: 10px;
6
+ @mobile_width: 480px;
7
+ @mobile_gutter: 10px;
8
+
9
+
10
+ .lsow-carousel {
11
+
12
+ .lsow-carousel-item {
13
+ padding: @gutter;
14
+
15
+ @media screen and (max-width: @tablet_width) {
16
+ padding: @tablet_gutter;
17
+ }
18
+
19
+ @media screen and (max-width: @mobile_width) {
20
+ padding: @mobile_gutter;
21
+ }
22
+ }
23
+ }
includes/widgets/lsow-carousel-widget/tpl/default.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var $carousel_settings
4
+ * @var $settings
5
+ * @var $elements
6
+ */
7
+
8
+ // Loop through the elements and do something with them.
9
+
10
+ if (!empty($elements)) : ?>
11
+
12
+ <div
13
+ class="lsow-carousel lsow-container" <?php foreach ($carousel_settings as $key => $val) : ?>
14
+
15
+ <?php if (!empty($val)) : ?>
16
+ data-<?php echo $key . '="' . esc_attr($val) . '"' ?>
17
+ <?php endif ?>
18
+
19
+ <?php endforeach; ?>>
20
+
21
+ <?php foreach ($elements as $element) : ?>
22
+
23
+ <div class="lsow-carousel-item">
24
+
25
+ <?php echo do_shortcode(wp_kses_post($element['text'])); ?>
26
+
27
+ </div><!--.lsow-carousel-item -->
28
+
29
+ <?php endforeach; ?>
30
+
31
+ </div> <!-- .lsow-carousel -->
32
+
33
+ <?php endif; ?>
includes/widgets/lsow-clients-widget/assets/banner.svg ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="128px" height="128px" viewBox="0 0 128 128" style="enable-background:new 0 0 128 128;" xml:space="preserve">
6
+ <g>
7
+ <circle style="fill:#4AB8A1;" cx="64" cy="64" r="64"/>
8
+ <path style="fill:#F7EAC6;" d="M29.455,91.027c-1.618-2.492-0.91-5.824,1.582-7.442l4.011-2.604
9
+ c-2.492,1.619-5.824,0.91-7.442-1.582c-1.618-2.491-0.91-5.822,1.582-7.441l3.008-1.953l0.005,0.007
10
+ c5.387-3.495,16.241-10.557,18.544-12.053c4.482-2.911,10.772-6.447,9.778-11.428c12.195-8.969,16.415-0.571,24.309-0.729
11
+ l4.061-2.637l15.303,23.563l-4.107,2.668c1.979,4.877-3.45,10.08-5.436,11.369c-1.924,1.25-21.365,13.875-30.994,20.129
12
+ c-2.471,1.604-4.296,2.789-5.013,3.254l-3.008,1.955l-0.02-0.029c-2.418,1.215-5.414,0.443-6.922-1.879s-0.994-5.372,1.1-7.086
13
+ l-0.019-0.029l-3.51,2.279c-2.492,1.617-5.824,0.91-7.442-1.582c-1.619-2.492-0.91-5.823,1.582-7.442l-3.509,2.279
14
+ C34.405,94.227,31.073,93.52,29.455,91.027z"/>
15
+ <path style="fill:#E6D9B8;" d="M94.798,71.956l-3.008-1.953l-0.005,0.007c-5.387-3.494-16.241-10.557-18.545-12.053
16
+ c-4.481-2.911-10.771-6.447-9.777-11.428c-0.496-0.364-0.984-0.697-1.47-1.017c-0.478,0.314-0.965,0.645-1.47,1.017
17
+ c0.994,4.981-5.296,8.518-9.778,11.428c-2.303,1.496-13.157,8.559-18.544,12.053l-0.005-0.007l-3.008,1.953
18
+ c-2.46,1.599-3.178,4.864-1.638,7.346c0.688,0.659,1.327,1.164,1.784,1.46c0.227,0.147,0.705,0.458,1.374,0.893
19
+ c1.426,0.388,3.003,0.195,4.341-0.674l-2.689,1.746c6.26,4.065,20.257,13.155,27.969,18.164c0.596,0.387,1.151,0.746,1.665,1.08
20
+ c0.515-0.334,1.07-0.693,1.666-1.08c7.711-5.009,21.709-14.099,27.969-18.164l-2.689-1.746c1.338,0.869,2.916,1.061,4.342,0.672
21
+ c0.668-0.434,1.146-0.743,1.373-0.892c0.457-0.296,1.096-0.801,1.783-1.459C97.976,76.82,97.258,73.555,94.798,71.956z"/>
22
+
23
+ <rect x="95.105" y="38.894" transform="matrix(0.8387 -0.5445 0.5445 0.8387 -13.7091 61.9816)" style="fill:#E6E6E6;" width="5.38" height="30.487"/>
24
+ <path style="fill:#805026;" d="M90.121,37.374l19.861,30.581l17.571-11.411c-1.491-12.852-6.787-24.537-14.735-33.909
25
+ L90.121,37.374z"/>
26
+ <path style="fill:#FFF4D9;" d="M92.139,91.027c1.618-2.492,0.91-5.824-1.582-7.442l-4.011-2.604
27
+ c2.491,1.619,5.823,0.91,7.442-1.582c1.617-2.491,0.91-5.822-1.582-7.441l-3.008-1.953l-0.004,0.007
28
+ c-5.388-3.495-16.242-10.557-18.546-12.053c-4.481-2.911-10.772-6.447-9.778-11.428c-12.195-8.969-21.541-3.906-24.309-0.729
29
+ l-4.061-2.637L17.399,66.727l4.107,2.668c-1.978,4.877,3.45,10.08,5.435,11.369c1.924,1.25,21.365,13.875,30.994,20.129
30
+ c2.471,1.604,4.296,2.789,5.013,3.254l3.007,1.955l0.02-0.029c2.418,1.215,5.414,0.443,6.922-1.879s0.994-5.372-1.1-7.086
31
+ l0.02-0.029l3.51,2.279c2.492,1.617,5.824,0.91,7.441-1.582c1.618-2.492,0.91-5.823-1.582-7.442l3.51,2.279
32
+ C87.189,94.227,90.521,93.52,92.139,91.027z"/>
33
+ <g>
34
+ <path style="fill:#F2E4C2;" d="M66.977,105.068l-0.019,0.029l-3.008-1.953c-0.717-0.465-2.542-1.651-5.013-3.256
35
+ c-9.629-6.253-29.07-18.878-30.994-20.128c-1.985-1.288-7.413-6.491-5.435-11.37l-4.107-2.666l14.548-22.402l-0.247-0.16
36
+ L17.4,66.725l4.107,2.668c-1.978,4.877,3.45,10.08,5.435,11.369c1.924,1.25,21.365,13.875,30.994,20.129
37
+ c2.471,1.604,4.296,2.789,5.013,3.254l3.008,1.955l0.019-0.029c2.277,1.144,5.052,0.509,6.628-1.506
38
+ C71.004,105.759,68.824,105.998,66.977,105.068z"/>
39
+ <path style="fill:#F2E4C2;" d="M76.326,98.354L55.286,84.832c-0.654-0.253-1.42,0.341-0.729,1.021l20.771,13.5
40
+ c2.365,1.537,5.472,0.955,7.166-1.238C80.738,99.443,78.279,99.622,76.326,98.354z"/>
41
+ <path style="fill:#F2E4C2;" d="M85.734,91.666L58.784,74.03c-0.654-0.253-1.42,0.341-0.729,1.021l26.68,17.614
42
+ c2.366,1.537,5.473,0.955,7.168-1.239C90.144,92.756,87.688,92.934,85.734,91.666z"/>
43
+ <path style="fill:#F2E4C2;" d="M87.546,80.072L66.804,66.398c-0.653-0.252-1.42,0.342-0.729,1.022l20.472,13.651
44
+ c2.366,1.537,5.472,0.955,7.167-1.239C91.957,81.162,89.499,81.34,87.546,80.072z"/>
45
+ </g>
46
+
47
+ <rect x="21.118" y="38.881" transform="matrix(-0.8387 -0.5446 0.5446 -0.8387 14.297 112.4834)" style="fill:#E6E6E6;" width="5.38" height="30.487"/>
48
+ <path style="fill:#406A80;" d="M0.101,60.479l11.512,7.476l19.859-30.581L12.983,25.367C5.502,35.23,0.814,47.324,0.101,60.479z"/>
49
+ <path style="fill:#F7EAC6;" d="M61.544,40.279c-3.661-0.075-13.898,2.167-16.364,1.943c-2.466-0.225-8.871,10.49-11.07,13.065
50
+ c-0.014,0.017-0.026,0.037-0.04,0.054c-0.058,0.062-0.115,0.112-0.173,0.18c-2.041,2.381-5.649,6.142-3.941,8.772
51
+ c1.132,1.743,3.059,2.652,4.995,2.576c0.001,0.003,0.004,0.011,0.004,0.011c0.046-0.004,0.096-0.01,0.145-0.015
52
+ c0.612-0.041,1.222-0.184,1.807-0.428c3.168-1.114,8.142-4.607,13.504-14.128c5.081,3.886,20.025,9.116,34.147-6.65
53
+ C78.431,42.446,65.206,40.354,61.544,40.279z"/>
54
+ <path style="fill:#FFFFFF;" d="M69.21,98.167l-1.567-1.019c-0.172-0.111-0.404-0.063-0.517,0.11l-2.849,4.388
55
+ c-0.112,0.172-0.063,0.404,0.11,0.517l1.566,1.019c1.385,0.898,3.236,0.506,4.135-0.88C70.988,100.917,70.594,99.066,69.21,98.167z
56
+ "/>
57
+ <path style="fill:#FFFFFF;" d="M78.177,90.994l-1.567-1.018c-0.172-0.112-0.404-0.063-0.517,0.109l-2.849,4.387
58
+ c-0.112,0.172-0.063,0.405,0.109,0.518l1.567,1.017c1.384,0.899,3.235,0.507,4.135-0.878
59
+ C79.953,93.744,79.561,91.893,78.177,90.994z"/>
60
+ <path style="fill:#FFFFFF;" d="M87.74,84.419L86.174,83.4c-0.172-0.111-0.405-0.063-0.518,0.109l-2.849,4.387
61
+ c-0.112,0.174-0.063,0.405,0.11,0.518l1.566,1.018c1.385,0.899,3.235,0.506,4.135-0.879C89.518,87.169,89.125,85.318,87.74,84.419z
62
+ "/>
63
+ <path style="fill:#FFFFFF;" d="M90.73,74.257l-1.566-1.018c-0.172-0.112-0.405-0.063-0.518,0.108l-2.849,4.387
64
+ c-0.112,0.174-0.062,0.406,0.11,0.518l1.566,1.018c1.385,0.899,3.235,0.506,4.135-0.879C92.508,77.007,92.113,75.156,90.73,74.257z
65
+ "/>
66
+ </g>
67
+ </svg>
includes/widgets/lsow-clients-widget/css/style.css ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ box-sizing: border-box; }
3
+
4
+ *, *::after, *::before {
5
+ box-sizing: inherit; }
6
+
7
+ .lsow-clients {
8
+ overflow: hidden;
9
+ margin: 0 auto; }
10
+ .lsow-clients .lsow-client {
11
+ position: relative;
12
+ border-right: 1px solid #ddd;
13
+ border-bottom: 1px solid #ddd;
14
+ overflow: hidden; }
15
+ .lsow-dark-bg .lsow-clients .lsow-client {
16
+ border-color: #505050 !important; }
17
+ .lsow-clients .lsow-client.lsow-twocol:nth-child(6n + 1) {
18
+ border-left: 1px solid #ddd; }
19
+ .lsow-clients .lsow-client.lsow-twocol:nth-child(-n + 6) {
20
+ border-top: 1px solid #ddd; }
21
+ .lsow-clients .lsow-client.lsow-onefifthcol:nth-child(5n + 1) {
22
+ border-left: 1px solid #ddd; }
23
+ .lsow-clients .lsow-client.lsow-onefifthcol:nth-child(-n + 5) {
24
+ border-top: 1px solid #ddd; }
25
+ .lsow-clients .lsow-client.lsow-threecol:nth-child(4n + 1) {
26
+ border-left: 1px solid #ddd; }
27
+ .lsow-clients .lsow-client.lsow-threecol:nth-child(-n + 4) {
28
+ border-top: 1px solid #ddd; }
29
+ .lsow-clients .lsow-client.lsow-fourcol:nth-child(3n + 1) {
30
+ border-left: 1px solid #ddd; }
31
+ .lsow-clients .lsow-client.lsow-fourcol:nth-child(-n + 3) {
32
+ border-top: 1px solid #ddd; }
33
+ .lsow-clients .lsow-client.lsow-sixcol:nth-child(2n + 1) {
34
+ border-left: 1px solid #ddd; }
35
+ .lsow-clients .lsow-client.lsow-sixcol:nth-child(-n + 2) {
36
+ border-top: 1px solid #ddd; }
37
+ @media only screen and (max-width: 800px) {
38
+ .lsow-clients .lsow-client.lsow-twocol:nth-child(n), .lsow-clients .lsow-client.lsow-threecol:nth-child(n), .lsow-clients .lsow-client.lsow-fourcol:nth-child(n), .lsow-clients .lsow-client.lsow-onefifthcol:nth-child(n), .lsow-clients .lsow-client.lsow-sixcol:nth-child(n) {
39
+ border-left: none;
40
+ border-top: none;
41
+ width: 50%;
42
+ float: left; }
43
+ .lsow-clients .lsow-client.lsow-twocol:nth-child(2n + 1), .lsow-clients .lsow-client.lsow-threecol:nth-child(2n + 1), .lsow-clients .lsow-client.lsow-fourcol:nth-child(2n + 1), .lsow-clients .lsow-client.lsow-onefifthcol:nth-child(2n + 1), .lsow-clients .lsow-client.lsow-sixcol:nth-child(2n + 1) {
44
+ border-left: 1px solid #ddd; }
45
+ .lsow-clients .lsow-client.lsow-twocol:nth-child(-n + 2), .lsow-clients .lsow-client.lsow-threecol:nth-child(-n + 2), .lsow-clients .lsow-client.lsow-fourcol:nth-child(-n + 2), .lsow-clients .lsow-client.lsow-onefifthcol:nth-child(-n + 2), .lsow-clients .lsow-client.lsow-sixcol:nth-child(-n + 2) {
46
+ border-top: 1px solid #ddd; } }
47
+ .lsow-clients .lsow-client img {
48
+ -webkit-transition: all 0.3s ease-in-out 0s;
49
+ -moz-transition: all 0.3s ease-in-out 0s;
50
+ transition: all 0.3s ease-in-out 0s;
51
+ width: 100%;
52
+ margin: 0; }
53
+ .lsow-clients .lsow-client .lsow-client-name {
54
+ position: absolute;
55
+ z-index: 2;
56
+ top: 50%;
57
+ text-align: center;
58
+ width: 100%;
59
+ height: 100%;
60
+ margin-top: -12px;
61
+ color: #fff;
62
+ font-size: 18px;
63
+ line-height: 26px;
64
+ -webkit-transition: opacity 0.4s ease-in-out 0s;
65
+ -moz-transition: opacity 0.4s ease-in-out 0s;
66
+ -ms-transition: opacity 0.4s ease-in-out 0s;
67
+ transition: opacity 0.4s ease-in-out 0s;
68
+ opacity: 0; }
69
+ .lsow-clients .lsow-client .lsow-image-overlay {
70
+ position: absolute;
71
+ left: 0;
72
+ top: 0;
73
+ overflow: hidden;
74
+ width: 100%;
75
+ height: 100%;
76
+ background: #000;
77
+ filter: alpha(opacity=0);
78
+ -moz-opacity: 0;
79
+ opacity: 0;
80
+ -webkit-transition: opacity 0.4s ease-in-out 0s;
81
+ -moz-transition: opacity 0.4s ease-in-out 0s;
82
+ -ms-transition: opacity 0.4s ease-in-out 0s;
83
+ transition: opacity 0.4s ease-in-out 0s; }
84
+ .lsow-clients .lsow-client:hover .lsow-image-overlay {
85
+ opacity: 0.7; }
86
+ .lsow-dark-bg .lsow-clients .lsow-client:hover .lsow-image-overlay {
87
+ opacity: 0.8; }
88
+ .lsow-clients .lsow-client:hover .lsow-client-name {
89
+ opacity: 1; }
90
+
91
+ /*# sourceMappingURL=style.css.map */
includes/widgets/lsow-clients-widget/css/style.css.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "mappings": "AAGE,IAAK;EACH,UAAU,EAAE,UAAU;;AAItB,sBAEU;EACR,UAAU,EAAE,OAAO;;ACRzB,aAAc;EACZ,QAAQ,EAAE,MAAM;EAChB,MAAM,EAAE,MAAM;EACd,0BAAa;IACX,QAAQ,EAAE,QAAQ;IAClB,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,cAAc;IAC7B,QAAQ,EAAE,MAAM;IAChB,wCAAgB;MACd,YAAY,EAAE,kBAAkB;IAElC,wDAAgC;MAC9B,WAAW,EAAE,cAAc;IAE7B,wDAAgC;MAC9B,UAAU,EAAE,cAAc;IAE5B,6DAAqC;MACnC,WAAW,EAAE,cAAc;IAE7B,6DAAqC;MACnC,UAAU,EAAE,cAAc;IAE5B,0DAAkC;MAChC,WAAW,EAAE,cAAc;IAE7B,0DAAkC;MAChC,UAAU,EAAE,cAAc;IAE5B,yDAAiC;MAC/B,WAAW,EAAE,cAAc;IAE7B,yDAAiC;MAC/B,UAAU,EAAE,cAAc;IAE5B,wDAAgC;MAC9B,WAAW,EAAE,cAAc;IAE7B,wDAAgC;MAC9B,UAAU,EAAE,cAAc;ICqB9B,yCAA8C;MDlB1C,+QAAmJ;QACjJ,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,IAAI;MAEb,wSAA4K;QAC1K,WAAW,EAAE,cAAc;MAE7B,wSAA4K;QAC1K,UAAU,EAAE,cAAc;IAG9B,8BAAI;MACF,kBAAkB,EAAE,uBAAuB;MAC3C,eAAe,EAAE,uBAAuB;MACxC,UAAU,EAAE,uBAAuB;MACnC,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,CAAC;IAEX,4CAAkB;MAChB,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,CAAC;MACV,GAAG,EAAE,GAAG;MACR,UAAU,EAAE,MAAM;MAClB,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,KAAK;MACjB,KAAK,EAAE,IAAI;MACX,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MC9CrB,kBAAoB,EAwEU,2BAA+B;MAvE7D,eAAiB,EAuEa,2BAA+B;MAtE7D,cAAgB,EAsEc,2BAA+B;MArE7D,UAAY,EAqEkB,2BAA+B;MDxBzD,OAAO,EAAE,CAAC;IAEZ,8CAAoB;MAClB,QAAQ,EAAE,QAAQ;MAClB,IAAI,EAAE,CAAC;MACP,GAAG,EAAE,CAAC;MACN,QAAQ,EAAE,MAAM;MAChB,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,gBAAkB;MAC1B,YAAY,EAAE,CAAC;MACf,OAAO,EAAE,CAAC;MC5Dd,kBAAoB,EAwEU,2BAA+B;MAvE7D,eAAiB,EAuEa,2BAA+B;MAtE7D,cAAgB,EAsEc,2BAA+B;MArE7D,UAAY,EAqEkB,2BAA+B;IDRvD,oDAAoB;MAClB,OAAO,EAAE,GAAG;MACZ,kEAAgB;QACZ,OAAO,EAAE,GAAG;IAGlB,kDAAkB;MAChB,OAAO,EAAE,CAAC",
4
+ "sources": ["../../../../../../bower_components/neat/app/assets/stylesheets/grid/_box-sizing.scss","style.scss","../../../../assets/css/_lsow-lib.scss"],
5
+ "names": [],
6
+ "file": "style.css"
7
+ }
includes/widgets/lsow-clients-widget/css/style.scss ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ @import "../../../../assets/css/lsow-lib";
3
+
4
+ .lsow-clients {
5
+ overflow: hidden;
6
+ margin: 0 auto;
7
+ .lsow-client {
8
+ position: relative;
9
+ border-right: 1px solid #ddd;
10
+ border-bottom: 1px solid #ddd;
11
+ overflow: hidden;
12
+ .lsow-dark-bg & {
13
+ border-color: #505050 !important;
14
+ }
15
+ &.lsow-twocol:nth-child(6n + 1) {
16
+ border-left: 1px solid #ddd;
17
+ }
18
+ &.lsow-twocol:nth-child(-n + 6) {
19
+ border-top: 1px solid #ddd;
20
+ }
21
+ &.lsow-onefifthcol:nth-child(5n + 1) {
22
+ border-left: 1px solid #ddd;
23
+ }
24
+ &.lsow-onefifthcol:nth-child(-n + 5) {
25
+ border-top: 1px solid #ddd;
26
+ }
27
+ &.lsow-threecol:nth-child(4n + 1) {
28
+ border-left: 1px solid #ddd;
29
+ }
30
+ &.lsow-threecol:nth-child(-n + 4) {
31
+ border-top: 1px solid #ddd;
32
+ }
33
+ &.lsow-fourcol:nth-child(3n + 1) {
34
+ border-left: 1px solid #ddd;
35
+ }
36
+ &.lsow-fourcol:nth-child(-n + 3) {
37
+ border-top: 1px solid #ddd;
38
+ }
39
+ &.lsow-sixcol:nth-child(2n + 1) {
40
+ border-left: 1px solid #ddd;
41
+ }
42
+ &.lsow-sixcol:nth-child(-n + 2) {
43
+ border-top: 1px solid #ddd;
44
+ }
45
+ @include respond-to-max(800) {
46
+ &.lsow-twocol:nth-child(n), &.lsow-threecol:nth-child(n), &.lsow-fourcol:nth-child(n), &.lsow-onefifthcol:nth-child(n), &.lsow-sixcol:nth-child(n) {
47
+ border-left: none;
48
+ border-top: none;
49
+ width: 50%;
50
+ float: left;
51
+ }
52
+ &.lsow-twocol:nth-child(2n + 1), &.lsow-threecol:nth-child(2n + 1), &.lsow-fourcol:nth-child(2n + 1), &.lsow-onefifthcol:nth-child(2n + 1), &.lsow-sixcol:nth-child(2n + 1) {
53
+ border-left: 1px solid #ddd;
54
+ }
55
+ &.lsow-twocol:nth-child(-n + 2), &.lsow-threecol:nth-child(-n + 2), &.lsow-fourcol:nth-child(-n + 2), &.lsow-onefifthcol:nth-child(-n + 2), &.lsow-sixcol:nth-child(-n + 2) {
56
+ border-top: 1px solid #ddd;
57
+ }
58
+ }
59
+ img {
60
+ -webkit-transition: all 0.3s ease-in-out 0s;
61
+ -moz-transition: all 0.3s ease-in-out 0s;
62
+ transition: all 0.3s ease-in-out 0s;
63
+ width: 100%;
64
+ margin: 0;
65
+ }
66
+ .lsow-client-name {
67
+ position: absolute;
68
+ z-index: 2;
69
+ top: 50%;
70
+ text-align: center;
71
+ width: 100%;
72
+ height: 100%;
73
+ margin-top: -12px;
74
+ color: #fff;
75
+ font-size: 18px;
76
+ line-height: 26px;
77
+ @include lsow-transition(opacity);
78
+ opacity: 0;
79
+ }
80
+ .lsow-image-overlay {
81
+ position: absolute;
82
+ left: 0;
83
+ top: 0;
84
+ overflow: hidden;
85
+ width: 100%;
86
+ height: 100%;
87
+ background: #000;
88
+ filter: alpha(opacity = 0);
89
+ -moz-opacity: 0;
90
+ opacity: 0;
91
+ @include lsow-transition(opacity);
92
+ }
93
+ &:hover {
94
+ .lsow-image-overlay {
95
+ opacity: 0.7;
96
+ .lsow-dark-bg & {
97
+ opacity: 0.8;
98
+ }
99
+ }
100
+ .lsow-client-name {
101
+ opacity: 1;
102
+ }
103
+ }
104
+ }
105
+ }
includes/widgets/lsow-clients-widget/lsow-clients-widget.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Widget Name: Livemesh Clients
5
+ Description: Display list of your clients in a multi-column grid.
6
+ Author: LiveMesh
7
+ Author URI: http://portfoliotheme.org
8
+ */
9
+
10
+ class LSOW_Client_Widget extends SiteOrigin_Widget {
11
+
12
+ function __construct() {
13
+ parent::__construct(
14
+ 'lsow-clients',
15
+ __('Livemesh Clients', 'livemesh-so-widgets'),
16
+ array(
17
+ 'description' => __('Display one or more clients in a multi-column grid.', 'livemesh-so-widgets'),
18
+ 'panels_icon' => 'dashicons dashicons-minus',
19
+ 'help' => 'http://portfoliotheme.org/widgets-bundle/odometer-widget-documentation/'
20
+ ),
21
+ array(),
22
+ array(
23
+ 'title' => array(
24
+ 'type' => 'text',
25
+ 'label' => __('Title', 'livemesh-so-widgets'),
26
+ ),
27
+
28
+ 'clients' => array(
29
+ 'type' => 'repeater',
30
+ 'label' => __('Clients', 'livemesh-so-widgets'),
31
+ 'item_name' => __('Client', 'livemesh-so-widgets'),
32
+ 'item_label' => array(
33
+ 'selector' => "[id*='clients-name']",
34
+ 'update_event' => 'change',
35
+ 'value_method' => 'val'
36
+ ),
37
+ 'fields' => array(
38
+ 'name' => array(
39
+ 'type' => 'text',
40
+ 'label' => __('Client Name', 'livemesh-so-widgets'),
41
+ 'description' => __('The name of the client/customer.', 'livemesh-so-widgets'),
42
+ ),
43
+
44
+ 'image' => array(
45
+ 'type' => 'media',
46
+ 'label' => __('Client Logo', 'livemesh-so-widgets'),
47
+ 'library' => 'image',
48
+ 'description' => __('The logo image for the client/customer.', 'livemesh-so-widgets'),
49
+ ),
50
+ )
51
+ ),
52
+
53
+ 'settings' => array(
54
+ 'type' => 'section',
55
+ 'label' => __('Settings', 'livemesh-so-widgets'),
56
+ 'fields' => array(
57
+
58
+ 'per_line' => array(
59
+ 'type' => 'slider',
60
+ 'label' => __('Columns per row', 'livemesh-so-widgets'),
61
+ 'min' => 1,
62
+ 'max' => 6,
63
+ 'integer' => true,
64
+ 'default' => 4
65
+ ),
66
+ )
67
+ ),
68
+
69
+ )
70
+ );
71
+ }
72
+
73
+ function initialize() {
74
+
75
+ $this->register_frontend_scripts(
76
+ array(
77
+ array(
78
+ 'lsow-waypoints',
79
+ LSOW_PLUGIN_URL . 'assets/js/jquery.waypoints' . SOW_BUNDLE_JS_SUFFIX . '.js',
80
+ array('jquery'),
81
+ LSOW_VERSION
82
+ ),
83
+ )
84
+ );
85
+
86
+ $this->register_frontend_styles(array(
87
+ array(
88
+ 'lsow-clients',
89
+ plugin_dir_url(__FILE__) . 'css/style.css'
90
+ )
91
+ ));
92
+ }
93
+
94
+ function get_template_variables($instance, $args) {
95
+ return array(
96
+ 'clients' => !empty($instance['clients']) ? $instance['clients'] : array(),
97
+ 'settings' => $instance['settings']
98
+ );
99
+ }
100
+
101
+ }
102
+
103
+ siteorigin_widget_register('lsow-clients', __FILE__, 'LSOW_Client_Widget');
includes/widgets/lsow-clients-widget/tpl/default.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var $clients
4
+ */
5
+
6
+ ?>
7
+
8
+ <?php $num_of_columns = intval($settings['per_line']); ?>
9
+
10
+ <?php $column_style = lsow_get_column_class($num_of_columns); ?>
11
+
12
+ <div class="lsow-clients lsow-container">
13
+
14
+ <?php $column_count = 0; ?>
15
+
16
+ <?php foreach ($clients as $client): ?>
17
+
18
+ <?php $column_count%$num_of_columns == 0 ? ' lsow-last-row' : ''; ?>
19
+
20
+ <div class="lsow-client <?php echo $column_style; ?> lsow-zero-margin">
21
+
22
+ <?php echo wp_get_attachment_image($client['image'], 'full', false, array('class' => 'lsow-image full', 'alt' => $client['name'])); ?>
23
+
24
+ <div class="lsow-client-name"><?php echo esc_html($client['name']); ?></div>
25
+
26
+ <div class="lsow-image-overlay"></div>
27
+
28
+ </div>
29
+
30
+ <?php
31
+
32
+ endforeach;
33
+
34
+ ?>
35
+
36
+ </div>
includes/widgets/lsow-heading-widget/assets/banner.svg ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="128px" height="128px" viewBox="0 0 128 128" style="enable-background:new 0 0 128 128;" xml:space="preserve">
6
+ <g>
7
+ <circle style="fill:#88C5CC;" cx="64" cy="64" r="64"/>
8
+ <path style="fill:#CCCCCC;" d="M25,99c-3.859,0-7-3.141-7-7V35c0-3.859,2.141-6,6-6h79c3.859,0,7,3.141,7,7v56c0,3.859-3.141,7-7,7
9
+ H25z"/>
10
+ <circle style="fill:#CC584C;" cx="23.953" cy="35" r="2"/>
11
+ <circle style="fill:#FFD464;" cx="29.953" cy="35" r="2"/>
12
+ <circle style="fill:#198058;" cx="35.953" cy="35" r="2"/>
13
+ <path style="fill:#F5F5F5;" d="M100.953,36c0,0.55-0.45,1-1,1h-58c-0.55,0-1-0.45-1-1v-2c0-0.55,0.45-1,1-1h58c0.55,0,1,0.45,1,1
14
+ V36z"/>
15
+ <path style="fill:#F5F5F5;" d="M106,93c0,1.1-0.9,2-2,2H24c-1.1,0-2-0.9-2-2V43c0-1.1,0.9-2,2-2h80c1.1,0,2,0.9,2,2V93z"/>
16
+ <rect x="25" y="44" style="fill:#406A80;" width="78" height="9"/>
17
+ <rect x="25" y="55" style="fill:#406A80;" width="17" height="18"/>
18
+ <rect x="85" y="78" style="fill:#FFD464;" width="17" height="14"/>
19
+ <g>
20
+ <rect x="44" y="55" style="fill:#406A80;" width="59" height="2"/>
21
+ <rect x="44" y="59" style="fill:#406A80;" width="59" height="2"/>
22
+ <rect x="44" y="63" style="fill:#406A80;" width="59" height="2"/>
23
+ <rect x="44" y="67" style="fill:#406A80;" width="59" height="2"/>
24
+ <rect x="44" y="71" style="fill:#406A80;" width="59" height="2"/>
25
+ </g>
26
+ <g>
27
+ <rect x="25" y="78" style="fill:#B3B3B3;" width="59" height="2"/>
28
+ <rect x="25" y="82" style="fill:#B3B3B3;" width="59" height="2"/>
29
+ <rect x="25" y="86" style="fill:#B3B3B3;" width="59" height="2"/>
30
+ <rect x="25" y="90" style="fill:#B3B3B3;" width="59" height="2"/>
31
+ </g>
32
+ </g>
33
+ </svg>
includes/widgets/lsow-heading-widget/css/style.css ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ box-sizing: border-box; }
3
+
4
+ *, *::after, *::before {
5
+ box-sizing: inherit; }
6
+
7
+ .lsow-heading.lsow-style1 {
8
+ text-align: center;
9
+ margin: 0 auto 60px; }
10
+ @media only screen and (max-width: 767px) {
11
+ .lsow-heading.lsow-style1 {
12
+ margin-bottom: 40px; } }
13
+ .lsow-heading.lsow-style1 .lsow-title {
14
+ font-weight: 700;
15
+ font-size: 32px;
16
+ line-height: 42px;
17
+ margin: 0 auto 20px;
18
+ max-width: 640px;
19
+ color: #333;
20
+ font-weight: bold; }
21
+ @media only screen and (max-width: 767px) {
22
+ .lsow-heading.lsow-style1 .lsow-title {
23
+ font-size: 24px;
24
+ line-height: 32px; } }
25
+ .lsow-heading.lsow-style1 .lsow-subtitle {
26
+ margin: 0 auto 10px;
27
+ max-width: 700px;
28
+ color: #4b1e14;
29
+ font-size: 14px;
30
+ line-height: 24px;
31
+ text-transform: uppercase;
32
+ font-weight: 700;
33
+ letter-spacing: 4px; }
34
+ @media only screen and (max-width: 767px) {
35
+ .lsow-heading.lsow-style1 .lsow-subtitle {
36
+ font-size: 13px;
37
+ line-height: 24px; } }
38
+ .lsow-dark-bg .lsow-heading.lsow-style1 .lsow-title {
39
+ color: #e5e5e5; }
40
+ .lsow-dark-bg .lsow-heading.lsow-style1 .lsow-subtitle {
41
+ color: #505050; }
42
+ .lsow-dark-bg .lsow-heading.lsow-style1 .lsow-text {
43
+ color: #909090; }
44
+
45
+ .lsow-heading .lsow-text {
46
+ font-size: 18px;
47
+ line-height: 28px;
48
+ max-width: 600px;
49
+ margin: 0 auto; }
50
+ @media only screen and (max-width: 767px) {
51
+ .lsow-heading .lsow-text {
52
+ font-size: 15px;
53
+ line-height: 26px; } }
54
+
55
+ /*# sourceMappingURL=style.css.map */
includes/widgets/lsow-heading-widget/css/style.css.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "mappings": "AAGE,IAAK;EACH,UAAU,EAAE,UAAU;;AAItB,sBAEU;EACR,UAAU,EAAE,OAAO;;ACRzB,yBAA0B;EACxB,UAAU,EAAE,MAAM;EAClB,MAAM,EAAE,WAAW;EC0DnB,yCAA8C;ID5DhD,yBAA0B;MAItB,aAAa,EAAE,IAAI;EAErB,qCAAY;IACV,WAAW,EAAE,GAAG;IAChB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,MAAM,EAAE,WAAW;IACnB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,IAAI;IC+CnB,yCAA8C;MDtD9C,qCAAY;QASR,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,IAAI;EAGrB,wCAAe;IACb,MAAM,EAAE,WAAW;IACnB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,cAAc,EAAE,SAAS;IACzB,WAAW,EAAE,GAAG;IAChB,cAAc,EAAE,GAAG;ICiCrB,yCAA8C;MDzC9C,wCAAe;QAUX,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,IAAI;EAIjB,mDAAY;IACV,KAAK,EAAE,OAAO;EAEhB,sDAAe;IACb,KAAK,EAAE,OAAO;EAEhB,kDAAW;IACT,KAAK,EAAE,OAAO;;AAKtB,wBAAyB;EACvB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,IAAI;EACjB,SAAS,EAAE,KAAK;EAChB,MAAM,EAAE,MAAM;ECUd,yCAA8C;IDdhD,wBAAyB;MAMrB,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI",
4
+ "sources": ["../../../../../../bower_components/neat/app/assets/stylesheets/grid/_box-sizing.scss","style.scss","../../../../assets/css/_lsow-lib.scss"],
5
+ "names": [],
6
+ "file": "style.css"
7
+ }
includes/widgets/lsow-heading-widget/css/style.scss ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ @import "../../../../assets/css/lsow-lib";
3
+
4
+ .lsow-heading.lsow-style1 {
5
+ text-align: center;
6
+ margin: 0 auto 60px;
7
+ @include respond-to-max(767) {
8
+ margin-bottom: 40px;
9
+ }
10
+ .lsow-title {
11
+ font-weight: 700;
12
+ font-size: 32px;
13
+ line-height: 42px;
14
+ margin: 0 auto 20px;
15
+ max-width: 640px;
16
+ color: #333;
17
+ font-weight: bold;
18
+ @include respond-to-max(767) {
19
+ font-size: 24px;
20
+ line-height: 32px;
21
+ }
22
+ }
23
+ .lsow-subtitle {
24
+ margin: 0 auto 10px;
25
+ max-width: 700px;
26
+ color: #4b1e14;
27
+ font-size: 14px;
28
+ line-height: 24px;
29
+ text-transform: uppercase;
30
+ font-weight: 700;
31
+ letter-spacing: 4px;
32
+ @include respond-to-max(767) {
33
+ font-size: 13px;
34
+ line-height: 24px;
35
+ }
36
+ }
37
+ .lsow-dark-bg & {
38
+ .lsow-title {
39
+ color: #e5e5e5;
40
+ }
41
+ .lsow-subtitle {
42
+ color: #505050;
43
+ }
44
+ .lsow-text {
45
+ color: #909090;
46
+ }
47
+ }
48
+ }
49
+
50
+ .lsow-heading .lsow-text {
51
+ font-size: 18px;
52
+ line-height: 28px;
53
+ max-width: 600px;
54
+ margin: 0 auto;
55
+ @include respond-to-max(767) {
56
+ font-size: 15px;
57
+ line-height: 26px;
58
+ }
59
+ }
includes/widgets/lsow-heading-widget/lsow-heading-widget.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Widget Name: Livemesh Heading
5
+ Description: Create heading for display on the top of a section.
6
+ Author: LiveMesh
7
+ Author URI: http://portfoliotheme.org
8
+ */
9
+
10
+ class LSOW_Heading_Widget extends SiteOrigin_Widget {
11
+
12
+ function __construct() {
13
+ parent::__construct(
14
+ 'lsow-heading',
15
+ __('Livemesh Heading', 'livemesh-so-widgets'),
16
+ array(
17
+ 'description' => __('Create heading for display on the top of a section.', 'livemesh-so-widgets'),
18
+ 'panels_icon' => 'dashicons dashicons-minus',
19
+ 'help' => 'http://portfoliotheme.org/widgets-bundle/heading-widget-documentation/'
20
+ ),
21
+ array(),
22
+ array(
23
+ 'title' => array(
24
+ 'type' => 'text',
25
+ 'label' => __('Title', 'livemesh-so-widgets'),
26
+ ),
27
+
28
+ 'style' => array(
29
+ 'type' => 'select',
30
+ 'label' => __('Choose Style', 'livemesh-so-widgets'),
31
+ 'state_emitter' => array(
32
+ 'callback' => 'select',
33
+ 'args' => array('style')
34
+ ),
35
+ 'default' => 'style1',
36
+ 'options' => array(
37
+ 'style1' => __('Style 1', 'livemesh-so-widgets'),
38
+ 'style2' => __('Style 2', 'livemesh-so-widgets'),
39
+ )
40
+ ),
41
+
42
+ 'heading' => array(
43
+ 'type' => 'text',
44
+ 'label' => __('Heading Title', 'livemesh-so-widgets'),
45
+ 'description' => __('Title for the heading.', 'livemesh-so-widgets'),
46
+ ),
47
+
48
+ 'subtitle' => array(
49
+ 'type' => 'text',
50
+ 'label' => __('Subheading', 'livemesh-so-widgets'),
51
+ 'description' => __('A subtitle displayed above the title heading.', 'livemesh-so-widgets'),
52
+ 'state_handler' => array(
53
+ 'style[style2]' => array('show'),
54
+ 'style[style1]' => array('hide'),
55
+ ),
56
+ ),
57
+
58
+ 'short_text' => array(
59
+ 'type' => 'textarea',
60
+ 'label' => __('Short Text', 'livemesh-so-widgets'),
61
+ 'description' => __('Short text generally displayed below the heading title.', 'livemesh-so-widgets'),
62
+ ),
63
+
64
+ )
65
+ );
66
+ }
67
+
68
+ function initialize() {
69
+
70
+ $this->register_frontend_styles(array(
71
+ array(
72
+ 'lsow-heading',
73
+ plugin_dir_url(__FILE__) . 'css/style.css'
74
+ )
75
+ ));
76
+ }
77
+
78
+ function get_template_variables($instance, $args) {
79
+ return array(
80
+ 'style' => $instance['style'],
81
+ 'heading' => $instance['heading'],
82
+ 'short_text' => !empty($instance['short_text']) ? $instance['short_text'] : '',
83
+ 'subtitle' => !empty($instance['subtitle']) ? $instance['subtitle'] : ''
84
+ );
85
+ }
86
+
87
+ }
88
+
89
+ siteorigin_widget_register('lsow-heading', __FILE__, 'LSOW_Heading_Widget');
includes/widgets/lsow-heading-widget/tpl/default.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var $style
4
+ * @var $heading
5
+ * @var $subtitle
6
+ * @var $short_text
7
+ */
8
+
9
+ ?>
10
+
11
+ <div class="lsow-heading lsow-<?php echo $style; ?>">
12
+
13
+ <?php if ($style == 'style2' && !empty($subtitle)): ?>
14
+
15
+ <h3 class="lsow-subtitle"><?php echo esc_html($subtitle); ?></h3>
16
+
17
+ <?php endif; ?>
18
+
19
+ <h3 class="lsow-title"><?php echo wp_kses_post($heading); ?></h3>
20
+
21
+ <?php if (!empty($short_text)): ?>
22
+
23
+ <p class="lsow-text"><?php echo wp_kses_post($short_text); ?></p>
24
+
25
+ <?php endif; ?>
26
+
27
+ </div>
includes/widgets/lsow-hero-image-widget/assets/banner.svg ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="128px" height="128px" viewBox="0 0 128 128" style="enable-background:new 0 0 128 128;" xml:space="preserve">
6
+ <g>
7
+ <path style="fill:#88C5CC;" d="M64,0C28.654,0,0,28.654,0,64c0,35.346,28.654,64,64,64s64-28.654,64-64C128,28.654,99.346,0,64,0z"
8
+ />
9
+ <g>
10
+ <path style="fill:#F5F5F5;" d="M51,21h44c1.1,0,2,0.9,2,2v82c0,1.1-0.9,2-2,2H33c-1.1,0-2-0.9-2-2V42L51,21z"/>
11
+ <path style="fill:#E6E6E6;" d="M49,42c1.1,0,2-0.9,2-2V21L31,42H49z"/>
12
+ </g>
13
+ <circle style="fill:#E16B5A;" cx="64" cy="68" r="18"/>
14
+ <path style="fill:#F5F5F5;" d="M59.868,60.496C59.391,60.223,59,60.45,59,61v14c0,0.55,0.391,0.777,0.868,0.504l12.264-7.008
15
+ c0.479-0.273,0.479-0.719,0-0.992L59.868,60.496z"/>
16
+ </g>
17
+ </svg>
includes/widgets/lsow-hero-image-widget/css/style.css ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ box-sizing: border-box; }
3
+
4
+ *, *::after, *::before {
5
+ box-sizing: inherit; }
6
+
7
+ .lsow-hero-header {
8
+ position: relative; }
9
+
10
+ .lsow-hero-header {
11
+ padding: 200px 0;
12
+ margin: 0;
13
+ overflow: hidden;
14
+ /* Hide the image background when ytp video is playing */ }
15
+ @media only screen and (max-width: 1100px) {
16
+ .lsow-hero-header {
17
+ background-attachment: scroll !important;
18
+ background-position: center center !important; } }
19
+ @media only screen and (max-width: 767px) {
20
+ .lsow-hero-header {
21
+ padding: 60px 0; } }
22
+ .lsow-hero-header .lsow-overlay {
23
+ position: absolute;
24
+ top: 0px;
25
+ left: 0px;
26
+ width: 100%;
27
+ height: 100%; }
28
+ .lsow-hero-header .lsow-parallax-bg, .lsow-hero-header .lsow-image-bg, .lsow-hero-header .lsow-html5-video-bg {
29
+ position: absolute;
30
+ width: 100%;
31
+ height: 100%;
32
+ top: 0;
33
+ left: 0;
34
+ margin: 0 auto; }
35
+ .lsow-hero-header .lsow-html5-video-bg video {
36
+ width: 100%;
37
+ height: auto; }
38
+ @media only screen and (max-width: 767px) {
39
+ .lsow-hero-header .lsow-html5-video-bg video {
40
+ width: auto;
41
+ height: 100%; } }
42
+ .lsow-hero-header .lsow-parallax-bg, .lsow-hero-header .lsow-image-bg {
43
+ background-repeat: no-repeat;
44
+ background-position: center center;
45
+ background-size: cover; }
46
+ .lsow-hero-header.ytp-bg .lsow-hero-header-content, .lsow-hero-header.lsow-section-bg-parallax .lsow-hero-header-content, .lsow-hero-header.image-banner .lsow-hero-header-content {
47
+ position: relative; }
48
+ .lsow-hero-header.mb_YTPlayer .lsow-image-bg {
49
+ display: none; }
50
+ .lsow-hero-header.lsow-section-bg-parallax {
51
+ overflow: hidden; }
52
+ .lsow-hero-header.lsow-section-bg-parallax .lsow-parallax-bg {
53
+ height: 200%;
54
+ -webkit-transform: translate3d(0, -50%, 0);
55
+ -moz-transform: translate3d(0, -50%, 0);
56
+ -ms-transform: translate3d(0, -50%, 0);
57
+ transform: translate3d(0, -50%, 0); }
58
+ .lsow-mobile-device .lsow-hero-header.lsow-section-bg-parallax .lsow-parallax-bg {
59
+ height: 100%;
60
+ -webkit-transform: translate3d(0, 0, 0);
61
+ -moz-transform: translate3d(0, 0, 0);
62
+ -ms-transform: translate3d(0, 0, 0);
63
+ transform: translate3d(0, 0, 0); }
64
+
65
+ .lsow-hero-header .lsow-header-content {
66
+ position: relative;
67
+ max-width: 700px;
68
+ margin: 0 auto;
69
+ text-align: center;
70
+ padding: 0 20px; }
71
+ .lsow-hero-header .lsow-header-content .lsow-subheading {
72
+ color: #aaa;
73
+ font-style: italic;
74
+ font-size: 16px;
75
+ line-height: 26px;
76
+ margin-bottom: 10px;
77
+ font-weight: 400; }
78
+ .lsow-hero-header .lsow-header-content .lsow-heading {
79
+ text-transform: uppercase;
80
+ letter-spacing: 2px;
81
+ font-size: 28px;
82
+ line-height: 40px;
83
+ font-weight: bold;
84
+ margin: 0;
85
+ color: #ebebeb; }
86
+ .lsow-hero-header .lsow-header-content .lsow-button {
87
+ display: inline-block;
88
+ font-size: 14px;
89
+ line-height: 22px;
90
+ text-transform: uppercase;
91
+ letter-spacing: 4px;
92
+ border: 1px solid #bbb;
93
+ padding: 10px 35px;
94
+ color: #eeeeee;
95
+ -webkit-transition: all 0.4s ease-in-out 0s;
96
+ -moz-transition: all 0.4s ease-in-out 0s;
97
+ -ms-transition: all 0.4s ease-in-out 0s;
98
+ transition: all 0.4s ease-in-out 0s;
99
+ margin-top: 30px; }
100
+ .lsow-hero-header .lsow-header-content .lsow-button:hover {
101
+ color: #fff;
102
+ border-color: #ffffff; }
103
+ @media only screen and (max-width: 600px) {
104
+ .lsow-hero-header .lsow-header-content .lsow-subheading {
105
+ font-size: 16px;
106
+ line-height: 24px; }
107
+ .lsow-hero-header .lsow-header-content .lsow-heading {
108
+ font-size: 20px;
109
+ line-height: 30px; } }
110
+
111
+ .lsow-hero-header iframe,
112
+ .lsow-hero-header object,
113
+ .lsow-hero-header embed {
114
+ position: absolute;
115
+ top: 0;
116
+ left: 0;
117
+ width: 100%;
118
+ height: 100%;
119
+ max-width: none;
120
+ /* important */ }
121
+
122
+ /* ------ Pointer down button ------ */
123
+ .lsow-hero-header .lsow-pointer-down {
124
+ display: block;
125
+ left: 50%;
126
+ bottom: 10px;
127
+ margin-left: -26px;
128
+ position: absolute;
129
+ font-size: 32px;
130
+ z-index: 3;
131
+ padding: 10px 20px;
132
+ border-radius: 2px;
133
+ -webkit-transition: all ease-in-out 0.3s 0s;
134
+ -moz-transition: all ease-in-out 0.3s 0s;
135
+ -ms-transition: all ease-in-out 0.3s 0s;
136
+ transition: all ease-in-out 0.3s 0s;
137
+ color: #fff; }
138
+ @media only screen and (max-width: 767px) {
139
+ .lsow-hero-header .lsow-pointer-down {
140
+ display: none; } }
141
+ .lsow-hero-header .lsow-pointer-down:hover {
142
+ background: rgba(255, 255, 255, 0.2); }
143
+
144
+ /*# sourceMappingURL=style.css.map */
includes/widgets/lsow-hero-image-widget/css/style.css.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "mappings": "AAGE,IAAK;EACH,UAAU,EAAE,UAAU;;AAItB,sBAEU;EACR,UAAU,EAAE,OAAO;;ACTzB,iBAAkB;EAChB,QAAQ,EAAE,QAAQ;;AAGpB,iBAAkB;EAChB,OAAO,EAAE,OAAO;EAChB,MAAM,EAAE,CAAC;EACT,QAAQ,EAAE,MAAM;;ECsDhB,0CAA8C;IDzDhD,iBAAkB;MAKd,qBAAqB,EAAE,iBAAiB;MACxC,mBAAmB,EAAE,wBAAwB;ECmD/C,yCAA8C;IDzDhD,iBAAkB;MASd,OAAO,EAAE,MAAM;EAEjB,+BAAc;IACZ,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;EAEd,6GAAwD;IACtD,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,MAAM;EAGZ,4CAAM;IACJ,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IC4BlB,yCAA8C;MD9B1C,4CAAM;QAIF,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;EAIpB,qEAAkC;IAChC,iBAAiB,EAAE,SAAS;IAC5B,mBAAmB,EAAE,aAAa;IAClC,eAAe,EAAE,KAAK;EAGtB,kLAA0B;IACxB,QAAQ,EAAE,QAAQ;EAKpB,4CAAe;IACb,OAAO,EAAE,IAAI;EAGjB,0CAA2B;IACzB,QAAQ,EAAE,MAAM;IAChB,4DAAkB;MAChB,MAAM,EAAE,IAAI;MChChB,iBAAoB,EAAE,uBAAM;MAC5B,cAAiB,EAAE,uBAAM;MACzB,aAAgB,EAAE,uBAAM;MACxB,SAAY,EAAE,uBAAM;MD+BhB,gFAAsB;QACpB,MAAM,EAAE,IAAI;QCnClB,iBAAoB,EAAE,oBAAM;QAC5B,cAAiB,EAAE,oBAAM;QACzB,aAAgB,EAAE,oBAAM;QACxB,SAAY,EAAE,oBAAM;;ADyCpB,sCAAqB;EACnB,QAAQ,EAAE,QAAQ;EAClB,SAAS,EAAE,KAAK;EAChB,MAAM,EAAE,MAAM;EACd,UAAU,EAAE,MAAM;EAClB,OAAO,EAAE,MAAM;EACf,uDAAiB;IACf,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,GAAG;EAElB,oDAAc;IACZ,cAAc,EAAE,SAAS;IACzB,cAAc,EAAE,GAAG;IACnB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,IAAI;IACjB,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,OAAO;EAEhB,mDAAa;IACX,OAAO,EAAE,YAAY;IACrB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,cAAc,EAAE,SAAS;IACzB,cAAc,EAAE,GAAG;IACnB,MAAM,EAAE,cAAc;IACtB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IC3ElB,kBAAoB,EAwEU,uBAA+B;IAvE7D,eAAiB,EAuEa,uBAA+B;IAtE7D,cAAgB,EAsEc,uBAA+B;IArE7D,UAAY,EAqEkB,uBAA+B;IDKzD,UAAU,EAAE,IAAI;IAChB,yDAAQ;MACN,KAAK,EAAE,IAAI;MACX,YAAY,EAAE,OAAO;EC9C3B,yCAA8C;IDkD1C,uDAAiB;MACf,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;IAEnB,oDAAc;MACZ,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;;AAMzB;;uBAEwB;EACtB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,SAAS,EAAE,IAAI;;;;AAMjB,oCAAqC;EACnC,OAAO,EAAE,KAAK;EACd,IAAI,EAAE,GAAG;EACT,MAAM,EAAE,IAAI;EACZ,WAAW,EAAE,KAAK;EAClB,QAAQ,EAAE,QAAQ;EAClB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,CAAC;EACV,OAAO,EAAE,SAAS;EAClB,aAAa,EAAE,GAAG;ECvHlB,kBAAoB,EDwHU,uBAAwB;ECvHtD,eAAiB,EDuHa,uBAAwB;ECtHtD,cAAgB,EDsHc,uBAAwB;ECrHtD,UAAY,EDqHkB,uBAAwB;EACtD,KAAK,EAAE,IAAI;ECvFX,yCAA8C;ID4EhD,oCAAqC;MAajC,OAAO,EAAE,IAAI;EAEf,0CAAQ;IACN,UAAU,EAAE,wBAAwB",
4
+ "sources": ["../../../../../../bower_components/neat/app/assets/stylesheets/grid/_box-sizing.scss","style.scss","../../../../assets/css/_lsow-lib.scss"],
5
+ "names": [],
6
+ "file": "style.css"
7
+ }
includes/widgets/lsow-hero-image-widget/css/style.scss ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../../../../assets/css/lsow-lib";
2
+
3
+ .lsow-hero-header {
4
+ position: relative;
5
+ }
6
+
7
+ .lsow-hero-header {
8
+ padding: 200px 0;
9
+ margin: 0;
10
+ overflow: hidden;
11
+ @include respond-to-max(1100) {
12
+ background-attachment: scroll !important;
13
+ background-position: center center !important;
14
+ }
15
+ @include respond-to-max(767) {
16
+ padding: 60px 0;
17
+ }
18
+ .lsow-overlay {
19
+ position: absolute;
20
+ top: 0px;
21
+ left: 0px;
22
+ width: 100%;
23
+ height: 100%;
24
+ }
25
+ .lsow-parallax-bg, .lsow-image-bg, .lsow-html5-video-bg {
26
+ position: absolute;
27
+ width: 100%;
28
+ height: 100%;
29
+ top: 0;
30
+ left: 0;
31
+ margin: 0 auto;
32
+ }
33
+ .lsow-html5-video-bg {
34
+ video {
35
+ width: 100%;
36
+ height: auto;
37
+ @include respond-to-max(767) {
38
+ width: auto;
39
+ height: 100%;
40
+ }
41
+ }
42
+ }
43
+ .lsow-parallax-bg, .lsow-image-bg {
44
+ background-repeat: no-repeat;
45
+ background-position: center center;
46
+ background-size: cover;
47
+ }
48
+ &.ytp-bg, &.lsow-section-bg-parallax, &.image-banner {
49
+ .lsow-hero-header-content {
50
+ position: relative;
51
+ }
52
+ }
53
+ /* Hide the image background when ytp video is playing */
54
+ &.mb_YTPlayer {
55
+ .lsow-image-bg {
56
+ display: none;
57
+ }
58
+ }
59
+ &.lsow-section-bg-parallax {
60
+ overflow: hidden;
61
+ .lsow-parallax-bg {
62
+ height: 200%;
63
+ @include vendorize(transform, translate3d(0, -50%, 0));
64
+ .lsow-mobile-device & {
65
+ height: 100%;
66
+ @include vendorize(transform, translate3d(0, 0, 0));
67
+ }
68
+ }
69
+
70
+ }
71
+ }
72
+
73
+ .lsow-hero-header {
74
+ .lsow-header-content {
75
+ position: relative;
76
+ max-width: 700px;
77
+ margin: 0 auto;
78
+ text-align: center;
79
+ padding: 0 20px;
80
+ .lsow-subheading {
81
+ color: #aaa;
82
+ font-style: italic;
83
+ font-size: 16px;
84
+ line-height: 26px;
85
+ margin-bottom: 10px;
86
+ font-weight: 400;
87
+ }
88
+ .lsow-heading {
89
+ text-transform: uppercase;
90
+ letter-spacing: 2px;
91
+ font-size: 28px;
92
+ line-height: 40px;
93
+ font-weight: bold;
94
+ margin: 0;
95
+ color: #ebebeb;
96
+ }
97
+ .lsow-button {
98
+ display: inline-block;
99
+ font-size: 14px;
100
+ line-height: 22px;
101
+ text-transform: uppercase;
102
+ letter-spacing: 4px;
103
+ border: 1px solid #bbb;
104
+ padding: 10px 35px;
105
+ color: #eeeeee;
106
+ @include lsow-transition();
107
+ margin-top: 30px;
108
+ &:hover {
109
+ color: #fff;
110
+ border-color: #ffffff;
111
+ }
112
+ }
113
+ @include respond-to-max(600) {
114
+ .lsow-subheading {
115
+ font-size: 16px;
116
+ line-height: 24px;
117
+ }
118
+ .lsow-heading {
119
+ font-size: 20px;
120
+ line-height: 30px;
121
+ }
122
+ }
123
+ }
124
+ }
125
+
126
+ .lsow-hero-header iframe,
127
+ .lsow-hero-header object,
128
+ .lsow-hero-header embed {
129
+ position: absolute;
130
+ top: 0;
131
+ left: 0;
132
+ width: 100%;
133
+ height: 100%;
134
+ max-width: none; /* important */
135
+ }
136
+
137
+
138
+ /* ------ Pointer down button ------ */
139
+
140
+ .lsow-hero-header .lsow-pointer-down {
141
+ display: block;
142
+ left: 50%;
143
+ bottom: 10px;
144
+ margin-left: -26px;
145
+ position: absolute;
146
+ font-size: 32px;
147
+ z-index: 3;
148
+ padding: 10px 20px;
149
+ border-radius: 2px;
150
+ @include vendorize(transition, all ease-in-out 0.3s 0s);
151
+ color: #fff;
152
+ @include respond-to-max(767) {
153
+ display: none;
154
+ }
155
+ &:hover {
156
+ background: rgba(255, 255, 255, 0.2);
157
+ }
158
+ }
includes/widgets/lsow-hero-image-widget/lsow-hero-image-widget.php ADDED
@@ -0,0 +1,404 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Widget Name: Livemesh Hero Header
5
+ Description: Display custom header content with option to set HTML5/YouTube video or parallax image background.
6
+ Author: LiveMesh
7
+ Author URI: http://portfoliotheme.org
8
+ */
9
+
10
+ class LSOW_Hero_Image_Widget extends SiteOrigin_Widget {
11
+
12
+ function __construct() {
13
+ parent::__construct(
14
+ 'lsow-hero-image',
15
+ __('Livemesh Hero Header', 'livemesh-so-widgets'),
16
+ array(
17
+ 'description' => __('Display a hero background with video or image background.', 'livemesh-so-widgets'),
18
+ 'panels_icon' => 'dashicons dashicons-minus',
19
+ 'help' => 'http://portfoliotheme.org/widgets-bundle/hero-image-widget-documentation/'
20
+ ),
21
+ array(),
22
+ array(
23
+ 'title' => array(
24
+ 'type' => 'text',
25
+ 'label' => __('Title', 'livemesh-so-widgets'),
26
+ ),
27
+
28
+ 'header_type' => array(
29
+ 'type' => 'radio',
30
+ 'label' => __('Header Type', 'livemesh-so-widgets'),
31
+ 'default' => 'standard',
32
+ 'state_emitter' => array(
33
+ 'callback' => 'select',
34
+ 'args' => array('header_type')
35
+ ),
36
+ 'options' => array(
37
+ 'standard' => __('Standard', 'livemesh-so-widgets'),
38
+ 'custom' => __('Custom', 'livemesh-so-widgets'),
39
+ )
40
+ ),
41
+
42
+ 'custom_header' => array(
43
+ 'type' => 'section',
44
+ 'label' => __('Custom Header', 'livemesh-so-widgets'),
45
+ 'state_handler' => array(
46
+ 'header_type[custom]' => array('show'),
47
+ '_else[header_type]' => array('hide'),
48
+ ),
49
+ 'fields' => array(
50
+ 'custom' => array(
51
+ 'type' => 'tinymce',
52
+ 'label' => __('Custom text', 'livemesh-so-widgets'),
53
+ ),
54
+
55
+ 'custom_css' => array(
56
+ 'type' => 'textarea',
57
+ 'label' => __('Custom CSS for presentation of the Custom header elements. Will be embedded inline with the page.', 'livemesh-so-widgets'),
58
+ 'rows' => 20
59
+ ),
60
+ )
61
+ ),
62
+
63
+
64
+ 'standard_header' => array(
65
+ 'type' => 'section',
66
+ 'label' => __('Standard Header', 'livemesh-so-widgets'),
67
+ 'state_handler' => array(
68
+ 'header_type[standard]' => array('show'),
69
+ '_else[header_type]' => array('hide'),
70
+ ),
71
+ 'fields' => array(
72
+ 'heading' => array(
73
+ 'type' => 'text',
74
+ 'label' => __('Header text', 'livemesh-so-widgets'),
75
+ ),
76
+
77
+ 'subheading' => array(
78
+ 'type' => 'text',
79
+ 'label' => __('Sub-heading text', 'livemesh-so-widgets'),
80
+ 'optional' => 'true',
81
+ ),
82
+
83
+ 'button_text' => array(
84
+ 'type' => 'text',
85
+ 'label' => __('Button text', 'livemesh-so-widgets'),
86
+ ),
87
+
88
+ 'button_url' => array(
89
+ 'type' => 'link',
90
+ 'label' => __('Button URL', 'livemesh-so-widgets'),
91
+ ),
92
+
93
+ 'new_window' => array(
94
+ 'type' => 'checkbox',
95
+ 'label' => __('Open URL in a new window', 'livemesh-so-widgets'),
96
+ ),
97
+ )
98
+ ),
99
+
100
+ 'pointer_down_url' => array(
101
+ 'type' => 'text',
102
+ 'label' => __('URL for Pointer Down', 'livemesh-so-widgets'),
103
+ 'description' => __('If an URL for the pointer down is specified, the hero image will sport a pointer down indicator to help user smooth scroll to the section indicated by this URL.', 'livemesh-so-widgets'),
104
+ ),
105
+
106
+ 'background' => array(
107
+ 'type' => 'section',
108
+ 'label' => __('Background', 'livemesh-so-widgets'),
109
+ 'fields' => array(
110
+
111
+ 'bg_type' => array(
112
+ 'type' => 'radio',
113
+ 'label' => __('Background Type', 'livemesh-so-widgets'),
114
+ 'default' => 'parallax',
115
+ 'state_emitter' => array(
116
+ 'callback' => 'select',
117
+ 'args' => array('bg_type')
118
+ ),
119
+ 'options' => array(
120
+ 'cover' => __('Cover Image', 'livemesh-so-widgets'),
121
+ 'parallax' => __('Parallax Image', 'livemesh-so-widgets'),
122
+ 'youtube' => __('YouTube Video', 'livemesh-so-widgets'),
123
+ 'html5video' => __('HTML5 Video', 'livemesh-so-widgets'),
124
+ )
125
+ ),
126
+
127
+ 'youtube_video' => array(
128
+ 'type' => 'section',
129
+ 'label' => __('YouTube Background Video', 'livemesh-so-widgets'),
130
+ 'state_handler' => array(
131
+ 'bg_type[youtube]' => array('show'),
132
+ '_else[bg_type]' => array('hide'),
133
+ ),
134
+ 'fields' => array(
135
+
136
+ 'youtube_url' => array(
137
+ 'type' => 'text',
138
+ 'sanitize' => 'url',
139
+ 'label' => __('YouTube URL', 'livemesh-so-widgets'),
140
+ 'description' => __('An URL of the YouTube video that will act as background video for this section.', 'livemesh-so-widgets'),
141
+ ),
142
+
143
+ 'quality' => array(
144
+ 'type' => 'select',
145
+ 'label' => __('Choose the YouTube video quality', 'livemesh-so-widgets'),
146
+ 'default' => 'highres',
147
+ 'options' => array(
148
+ 'highres' => __('High Resolution', 'livemesh-so-widgets'),
149
+ 'default' => __('Default', 'livemesh-so-widgets'),
150
+ 'small' => __('Small', 'livemesh-so-widgets'),
151
+ 'medium' => __('Medium', 'livemesh-so-widgets'),
152
+ 'large' => __('Large', 'livemesh-so-widgets'),
153
+ 'hd720' => __('HD 720p', 'livemesh-so-widgets'),
154
+ 'hd1080' => __('HD 1080p', 'livemesh-so-widgets'),
155
+ )
156
+ ),
157
+
158
+ 'ratio' => array(
159
+ 'type' => 'select',
160
+ 'label' => __('Aspect ratio of the YouTube video', 'livemesh-so-widgets'),
161
+ 'default' => '16/9',
162
+ 'options' => array(
163
+ '16/9' => __('16/9', 'livemesh-so-widgets'),
164
+ 'auto' => __('Auto', 'livemesh-so-widgets'),
165
+ '4/3' => __('4/3', 'livemesh-so-widgets'),
166
+ )
167
+ ),
168
+
169
+ ),
170
+ ),
171
+
172
+ 'html5_videos' => array(
173
+ 'type' => 'section',
174
+ 'label' => __('HTML5 Background videos', 'livemesh-so-widgets'),
175
+ 'state_handler' => array(
176
+ 'bg_type[html5video]' => array('show'),
177
+ '_else[bg_type]' => array('hide'),
178
+ ),
179
+ 'fields' => array(
180
+
181
+ 'mp4_file' => array(
182
+ 'type' => 'media',
183
+ 'library' => 'video',
184
+ 'label' => __('MP4 Video file', 'livemesh-so-widgets'),
185
+ ),
186
+ 'webm_file' => array(
187
+ 'type' => 'media',
188
+ 'library' => 'video',
189
+ 'label' => __('WebM Video file', 'livemesh-so-widgets'),
190
+ ),
191
+ 'ogg_file' => array(
192
+ 'type' => 'media',
193
+ 'library' => 'video',
194
+ 'label' => __('Ogg Video file', 'livemesh-so-widgets'),
195
+ ),
196
+
197
+ ),
198
+ ),
199
+
200
+ 'bg_image' => array(
201
+ 'type' => 'section',
202
+ 'label' => __('Background Image', 'livemesh-so-widgets'),
203
+ 'fields' => array(
204
+
205
+ 'image' => array(
206
+ 'type' => 'media',
207
+ 'label' => __('Background Image', 'livemesh-so-widgets'),
208
+ 'label' => __('This background image will be used as a placeholder image if YouTube or HTML5 video background option is chosen.', 'livemesh-so-widgets'),
209
+ 'library' => 'image',
210
+ 'fallback' => true,
211
+ ),
212
+ ),
213
+ ),
214
+
215
+ 'overlay' => array(
216
+ 'type' => 'section',
217
+ 'label' => __('Background Overlay', 'livemesh-so-widgets'),
218
+ 'fields' => array(
219
+
220
+ 'overlay_color' => array(
221
+ 'type' => 'color',
222
+ 'label' => __('Overlay color', 'livemesh-so-widgets'),
223
+ 'default' => '#333333',
224
+ ),
225
+
226
+ 'overlay_opacity' => array(
227
+ 'label' => __('Overlay opacity', 'livemesh-so-widgets'),
228
+ 'type' => 'slider',
229
+ 'min' => 0,
230
+ 'max' => 100,
231
+ 'default' => 30,
232
+ ),
233
+
234
+ ),
235
+ ),
236
+ )
237
+ ),
238
+
239
+ 'settings' => array(
240
+ 'type' => 'section',
241
+ 'label' => __('Settings', 'livemesh-so-widgets'),
242
+ 'fields' => array(
243
+
244
+ 'top_padding' => array(
245
+ 'type' => 'number',
246
+ 'label' => __('Top padding', 'livemesh-so-widgets'),
247
+ 'default' => 100,
248
+ ),
249
+
250
+ 'bottom_padding' => array(
251
+ 'type' => 'number',
252
+ 'label' => __('Bottom padding', 'livemesh-so-widgets'),
253
+ 'default' => 100,
254
+ ),
255
+
256
+
257
+ 'responsive' => array(
258
+ 'type' => 'section',
259
+ 'label' => __('Responsive', 'livemesh-so-widgets'),
260
+ 'hide' => true,
261
+ 'fields' => array(
262
+ 'tablet' => array(
263
+ 'type' => 'section',
264
+ 'label' => __('Tablet', 'livemesh-so-widgets'),
265
+ 'fields' => array(
266
+ 'top_padding' => array(
267
+ 'type' => 'number',
268
+ 'label' => __('Top padding', 'livemesh-so-widgets'),
269
+ 'default' => 80,
270
+ ),
271
+
272
+ 'bottom_padding' => array(
273
+ 'type' => 'number',
274
+ 'label' => __('Bottom padding', 'livemesh-so-widgets'),
275
+ 'default' => 80,
276
+ ),
277
+
278
+ 'width' => array(
279
+ 'type' => 'text',
280
+ 'label' => __('Resolution', 'livemesh-so-widgets'),
281
+ 'description' => __('The resolution to treat as a tablet resolution.', 'livemesh-so-widgets'),
282
+ 'default' => 800,
283
+ 'sanitize' => 'intval',
284
+ )
285
+ )
286
+ ),
287
+ 'mobile' => array(
288
+ 'type' => 'section',
289
+ 'label' => __('Mobile Phone', 'livemesh-so-widgets'),
290
+ 'fields' => array(
291
+ 'top_padding' => array(
292
+ 'type' => 'number',
293
+ 'label' => __('Top padding', 'livemesh-so-widgets'),
294
+ 'default' => 50,
295
+ ),
296
+
297
+ 'bottom_padding' => array(
298
+ 'type' => 'number',
299
+ 'label' => __('Bottom padding', 'livemesh-so-widgets'),
300
+ 'default' => 50,
301
+ ),
302
+
303
+ 'width' => array(
304
+ 'type' => 'text',
305
+ 'label' => __('Resolution', 'livemesh-so-widgets'),
306
+ 'description' => __('The resolution to treat as a mobile resolution.', 'livemesh-so-widgets'),
307
+ 'default' => 400,
308
+ 'sanitize' => 'intval',
309
+ )
310
+ )
311
+ )
312
+
313
+ )
314
+ ),
315
+ )
316
+ ),
317
+
318
+
319
+ )
320
+ );
321
+ }
322
+
323
+ function initialize() {
324
+
325
+ $this->register_frontend_scripts(
326
+ array(
327
+ array(
328
+ 'lsow-ytp',
329
+ LSOW_PLUGIN_URL . 'assets/js/jquery.mb.YTPlayer' . SOW_BUNDLE_JS_SUFFIX . '.js',
330
+ array('jquery'),
331
+ LSOW_VERSION
332
+ ),
333
+ )
334
+ );
335
+
336
+ $this->register_frontend_styles(array(
337
+ array(
338
+ 'lsow-hero-image',
339
+ plugin_dir_url(__FILE__) . 'css/style.css'
340
+ )
341
+ ));
342
+
343
+
344
+ add_action('wp_enqueue_scripts', array($this, 'init_custom_css'), 15); // load as late as possible
345
+
346
+ }
347
+
348
+ function init_custom_css() {
349
+
350
+ if (!is_active_widget(false, false, $this->id_base)) {
351
+ return;
352
+ }
353
+
354
+ $custom_css = '';
355
+
356
+ $instances = $this->get_settings();
357
+
358
+ if (array_key_exists($this->number, $instances)) {
359
+ $instance = $instances[$this->number];
360
+ if (!empty($instance)) {
361
+ $header_type = $instance['header_type'];
362
+ if ($header_type == 'custom')
363
+ $custom_css = $instance['custom_header']['custom_css'];
364
+ }
365
+ }
366
+
367
+ if ($custom_css <> '') {
368
+ $custom_css = $custom_css . "\n";
369
+ wp_add_inline_style('lsow-hero-image', $custom_css); // after custom.css file
370
+ }
371
+
372
+ }
373
+
374
+
375
+ function get_less_variables($instance) {
376
+ return array(
377
+ 'top_padding' => intval($instance['settings']['top_padding']) . 'px',
378
+ 'bottom_padding' => intval($instance['settings']['bottom_padding']) . 'px',
379
+
380
+ 'tablet_width' => intval($instance['settings']['responsive']['tablet']['width']) . 'px',
381
+ 'mobile_width' => intval($instance['settings']['responsive']['mobile']['width']) . 'px',
382
+
383
+ 'tablet_top_padding' => intval($instance['settings']['responsive']['tablet']['top_padding']) . 'px',
384
+ 'tablet_bottom_padding' => intval($instance['settings']['responsive']['tablet']['bottom_padding']) . 'px',
385
+
386
+ 'mobile_top_padding' => intval($instance['settings']['responsive']['mobile']['top_padding']) . 'px',
387
+ 'mobile_bottom_padding' => intval($instance['settings']['responsive']['mobile']['bottom_padding']) . 'px',
388
+ );
389
+ }
390
+
391
+ function get_template_variables($instance, $args) {
392
+ return array(
393
+ 'header_type' => $instance['header_type'],
394
+ 'custom_header' => $instance['custom_header'],
395
+ 'standard_header' => $instance['standard_header'],
396
+ 'pointer_down_url' => $instance['pointer_down_url'],
397
+ 'background' => $instance['background'],
398
+ 'settings' => $instance['settings']
399
+ );
400
+ }
401
+
402
+ }
403
+
404
+ siteorigin_widget_register('lsow-hero-image', __FILE__, 'LSOW_Hero_Image_Widget');
includes/widgets/lsow-hero-image-widget/styles/default.less ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../../../../../so-widgets-bundle/base/less/mixins";
2
+
3
+ // Column sizes
4
+ @top_padding: 100px;
5
+ @bottom_padding: 100px;
6
+
7
+ @tablet_top_padding: 80px;
8
+ @tablet_bottom_padding: 80px;
9
+ @mobile_top_padding: 50px;
10
+ @mobile_bottom_padding: 50px;
11
+
12
+ @tablet_width: 800px;
13
+ @mobile_width: 480px;
14
+
15
+ .lsow-hero-header {
16
+
17
+ padding-top: @top_padding;
18
+ padding-bottom: @bottom_padding;
19
+
20
+ @media screen and (max-width: @tablet_width) {
21
+ padding-top: @tablet_top_padding;
22
+ padding-bottom: @tablet_bottom_padding;
23
+ }
24
+
25
+ @media screen and (max-width: @mobile_width) {
26
+ padding-top: @mobile_top_padding;
27
+ padding-bottom: @mobile_bottom_padding;
28
+ }
29
+ }
includes/widgets/lsow-hero-image-widget/tpl/default.php ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var $header_type
4
+ * @var $custom_header
5
+ * @var $standard_header
6
+ * @var $pointer_down_url
7
+ * @var $background
8
+ * @var $settings
9
+ */
10
+
11
+ $youtube_markup = '';
12
+ if ($background['bg_type'] == 'youtube') {
13
+ $youtube_markup = ' data-property="{mute:true,autoPlay:true,opacity:1,loop:true, ' . 'videoURL:\'' . esc_url($background['youtube_video']['youtube_url']) . '\',' . 'quality:\'' . esc_attr($background['youtube_video']['quality']) . '\',' . 'ratio:\'' . esc_attr($background['youtube_video']['ratio']) . '\'}"';
14
+ }
15
+
16
+ ?>
17
+
18
+ <div class="lsow-hero-header lsow-section-bg-<?php echo $background['bg_type']; ?>" <?php echo $youtube_markup; ?>>
19
+
20
+ <div class="lsow-background">
21
+
22
+ <?php if ($background['bg_type'] == 'html5video'): ?>
23
+
24
+ <div class="lsow-html5-video-bg">
25
+
26
+ <video poster="<?php echo wp_get_attachment_url($background['bg_image']['image']); ?>" preload="auto"
27
+ autoplay loop muted>
28
+
29
+ <source src="<?php echo wp_get_attachment_url($background['html5_videos']['mp4_file']); ?>"
30
+ type="video/mp4">
31
+ <source src="<?php echo wp_get_attachment_url($background['html5_videos']['webm_file']); ?>"
32
+ type="video/ogg">
33
+ <source src="<?php echo wp_get_attachment_url($background['html5_videos']['ogg_file']); ?>"
34
+ type="video/webm">
35
+
36
+ </video>
37
+
38
+ </div><!-- .lsow-html5-video-bg -->
39
+
40
+ <?php else: ?>
41
+
42
+ <?php $attachment = wp_get_attachment_image_src(intval($background['bg_image']['image']), 'full'); ?>
43
+
44
+ <?php if (!empty($attachment)): ?>
45
+
46
+ <?php if ($background['bg_type'] == 'parallax'): ?>
47
+
48
+ <div class="lsow-parallax-bg"
49
+ style="background-image: url(<?php echo $attachment[0]; ?>);"></div>
50
+
51
+ <?php elseif ($background['bg_type'] == 'cover' || $background['bg_type'] == 'youtube'): ?>
52
+
53
+ <div class="lsow-image-bg"
54
+ style="background-image: url(<?php echo $attachment[0]; ?>);"></div>
55
+
56
+ <?php endif; ?>
57
+
58
+ <?php endif; ?>
59
+
60
+ <?php endif; ?>
61
+
62
+ </div><!-- .lsow-background -->
63
+
64
+ <?php
65
+
66
+ $overlay = $background['overlay'];
67
+
68
+ if (!empty($overlay['overlay_color'])) :
69
+
70
+ $hex = $overlay['overlay_color'];
71
+ list($r, $g, $b) = sscanf($hex, "#%02x%02x%02x");
72
+ $overlay_opacity = $overlay['overlay_opacity'] / 100;
73
+
74
+ $bg_color = empty($overlay['overlay_color']) ? "" : "background-color: rgba(" . "$r, $g, $b, $overlay_opacity);";
75
+ ?>
76
+
77
+ <div class="lsow-overlay" style="<?php echo($bg_color); ?>"></div>
78
+
79
+ <?php
80
+
81
+ endif;
82
+
83
+ ?>
84
+
85
+ <div class="lsow-header-content">
86
+
87
+ <?php if ($header_type == 'standard') : ?>
88
+
89
+ <div class="lsow-standard-header">
90
+
91
+ <?php echo empty($standard_header['subheading']) ? '' : '<div class="lsow-subheading">' . htmlspecialchars_decode($standard_header['subheading']) . '</div>'; ?>
92
+
93
+ <?php echo empty($standard_header['heading']) ? '' : '<h3 class="lsow-heading">' . $standard_header['heading'] . '</h3>'; ?>
94
+
95
+ <?php if (!empty($standard_header['button_url'])) : ?>
96
+
97
+ <a class="lsow-button"
98
+ href="<?php echo $standard_header['button_url']; ?>"
99
+ <?php echo (empty($standard_header['new_window'])) ? '' : 'target="_blank"'; ?>><?php echo $standard_header['button_text']; ?></a>
100
+
101
+ <?php endif; ?>
102
+
103
+ </div>
104
+
105
+ <?php elseif ($header_type == 'custom'): ?>
106
+
107
+ <div class="lsow-custom-header">
108
+
109
+ <?php echo $custom_header['custom']; ?>
110
+
111
+ </div>
112
+
113
+ <?php endif; ?>
114
+
115
+
116
+ </div>
117
+
118
+ <?php if (!empty($pointer_down_url)): ?>
119
+
120
+ <a href="<?php echo $pointer_down_url; ?>" class="icon-angle-down lsow-pointer-down"></a>
121
+
122
+ <?php endif; ?>
123
+
124
+ </div>
includes/widgets/lsow-odometers-widget/assets/banner.svg ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="128px" height="128px" viewBox="0 0 128 128" style="enable-background:new 0 0 128 128;" xml:space="preserve">
6
+ <g>
7
+ <circle style="fill:#C2D5D8;" cx="64" cy="64" r="64"/>
8
+ <g>
9
+ <path style="fill:#263740;" d="M19,87c-5.233,0-8-2.767-8-8c0-29.225,23.775-53,53-53s53,23.775,53,53c0,5.233-2.767,8-8,8H19z"/>
10
+ <path style="fill:#1E2C33;" d="M64,26c-0.503,0-1,0.023-1.5,0.038C91.032,26.837,114,50.277,114,79c0,5.233-2.767,8-8,8h3
11
+ c5.233,0,8-2.767,8-8C117,49.775,93.225,26,64,26z"/>
12
+ <path style="fill:#F5F5F5;" d="M19,79c0-24.854,20.147-45,45-45s45,20.146,45,45H19z"/>
13
+ <path style="fill:#E6E6E6;" d="M66,34.051C65.336,34.021,64.671,34,64,34c-24.853,0-45,20.146-45,45h4
14
+ C23,54.818,42.076,35.098,66,34.051z"/>
15
+ <path style="fill:#CC6152;" d="M42.182,49.915c-5.673,4.083-10.124,9.805-12.675,16.697c-0.768,2.07,0.291,4.372,2.363,5.139
16
+ c2.063,0.769,4.372-0.29,5.139-2.363c2.087-5.64,5.693-10.218,10.323-13.396L42.182,49.915z"/>
17
+ <path style="fill:#74B340;" d="M90.991,69.388c0.597,1.614,2.125,2.613,3.751,2.613c0.462,0,0.931-0.08,1.388-0.25
18
+ c2.072-0.767,3.131-3.067,2.363-5.139c-2.229-6.021-5.92-11.132-10.596-15.054l-5.479,5.75
19
+ C86.207,60.386,89.176,64.482,90.991,69.388z"/>
20
+ <path style="fill:#E78244;" d="M42.182,49.941l5.135,6.067C52,52.789,57.731,51,64,51v-8C55.866,43,48.316,45.521,42.182,49.941z"
21
+ />
22
+ <path style="fill:#FFD464;" d="M82.419,57.311l5.479-5.752C81.434,46.137,73.078,43,64,43v8
23
+ C71.066,51,77.449,53.273,82.419,57.311z"/>
24
+ <path style="fill:#E16B5A;" d="M67.093,79c-0.028-0.634-0.246-1.263-0.684-1.787L41.641,47.525
25
+ c-0.257-0.31-0.71-0.383-1.054-0.156c-0.369,0.242-0.472,0.738-0.229,1.107L60.416,79H67.093z"/>
26
+ <path style="fill:#E16B5A;" d="M57,79c0-3.866,3.134-7,7-7s7,3.134,7,7H57z"/>
27
+ </g>
28
+ </g>
29
+ </svg>
includes/widgets/lsow-odometers-widget/css/style.css ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ box-sizing: border-box; }
3
+
4
+ *, *::after, *::before {
5
+ box-sizing: inherit; }
6
+
7
+ .odometer.odometer-auto-theme, .odometer.odometer-theme-default {
8
+ display: inline-block;
9
+ vertical-align: middle;
10
+ *vertical-align: auto;
11
+ *zoom: 1;
12
+ *display: inline;
13
+ position: relative; }
14
+
15
+ .odometer.odometer-auto-theme .odometer-digit, .odometer.odometer-theme-default .odometer-digit {
16
+ display: inline-block;
17
+ vertical-align: middle;
18
+ *vertical-align: auto;
19
+ *zoom: 1;
20
+ *display: inline;
21
+ position: relative; }
22
+
23
+ .odometer.odometer-auto-theme .odometer-digit .odometer-digit-spacer, .odometer.odometer-theme-default .odometer-digit .odometer-digit-spacer {
24
+ display: inline-block;
25
+ vertical-align: middle;
26
+ *vertical-align: auto;
27
+ *zoom: 1;
28
+ *display: inline;
29
+ visibility: hidden; }
30
+
31
+ .odometer.odometer-auto-theme .odometer-digit .odometer-digit-inner, .odometer.odometer-theme-default .odometer-digit .odometer-digit-inner {
32
+ text-align: left;
33
+ display: block;
34
+ position: absolute;
35
+ top: 0;
36
+ left: 0;
37
+ right: 0;
38
+ bottom: 0;
39
+ overflow: hidden; }
40
+
41
+ .odometer.odometer-auto-theme .odometer-digit .odometer-ribbon, .odometer.odometer-theme-default .odometer-digit .odometer-ribbon {
42
+ display: block; }
43
+
44
+ .odometer.odometer-auto-theme .odometer-digit .odometer-ribbon-inner, .odometer.odometer-theme-default .odometer-digit .odometer-ribbon-inner {
45
+ display: block;
46
+ -webkit-backface-visibility: hidden; }
47
+
48
+ .odometer.odometer-auto-theme .odometer-digit .odometer-value, .odometer.odometer-theme-default .odometer-digit .odometer-value {
49
+ display: block;
50
+ -webkit-transform: translateZ(0); }
51
+
52
+ .odometer.odometer-auto-theme .odometer-digit .odometer-value.odometer-last-value, .odometer.odometer-theme-default .odometer-digit .odometer-value.odometer-last-value {
53
+ position: absolute; }
54
+
55
+ .odometer.odometer-auto-theme.odometer-animating-up .odometer-ribbon-inner, .odometer.odometer-theme-default.odometer-animating-up .odometer-ribbon-inner {
56
+ -webkit-transition: -webkit-transform 2s;
57
+ -moz-transition: -moz-transform 2s;
58
+ -ms-transition: -ms-transform 2s;
59
+ -o-transition: -o-transform 2s;
60
+ transition: transform 2s; }
61
+
62
+ .odometer.odometer-auto-theme.odometer-animating-up.odometer-animating .odometer-ribbon-inner, .odometer.odometer-theme-default.odometer-animating-up.odometer-animating .odometer-ribbon-inner {
63
+ -webkit-transform: translateY(-100%);
64
+ -moz-transform: translateY(-100%);
65
+ -ms-transform: translateY(-100%);
66
+ -o-transform: translateY(-100%);
67
+ transform: translateY(-100%); }
68
+
69
+ .odometer.odometer-auto-theme.odometer-animating-down .odometer-ribbon-inner, .odometer.odometer-theme-default.odometer-animating-down .odometer-ribbon-inner {
70
+ -webkit-transform: translateY(-100%);
71
+ -moz-transform: translateY(-100%);
72
+ -ms-transform: translateY(-100%);
73
+ -o-transform: translateY(-100%);
74
+ transform: translateY(-100%); }
75
+
76
+ .odometer.odometer-auto-theme.odometer-animating-down.odometer-animating .odometer-ribbon-inner, .odometer.odometer-theme-default.odometer-animating-down.odometer-animating .odometer-ribbon-inner {
77
+ -webkit-transition: -webkit-transform 2s;
78
+ -moz-transition: -moz-transform 2s;
79
+ -ms-transition: -ms-transform 2s;
80
+ -o-transition: -o-transform 2s;
81
+ transition: transform 2s;
82
+ -webkit-transform: translateY(0);
83
+ -moz-transform: translateY(0);
84
+ -ms-transform: translateY(0);
85
+ -o-transform: translateY(0);
86
+ transform: translateY(0); }
87
+
88
+ .odometer.odometer-auto-theme, .odometer.odometer-theme-default {
89
+ font-family: "Helvetica Neue", sans-serif;
90
+ line-height: 1.1em; }
91
+
92
+ .odometer.odometer-auto-theme .odometer-value, .odometer.odometer-theme-default .odometer-value {
93
+ text-align: center; }
94
+
95
+ /* --- Animate Numbers ---- */
96
+ .lsow-odometers {
97
+ font-size: 0;
98
+ /* inline-block hack */ }
99
+ .lsow-odometers .lsow-odometer {
100
+ display: inline-block;
101
+ vertical-align: top;
102
+ text-align: left;
103
+ position: relative;
104
+ margin-bottom: 50px; }
105
+ .lsow-odometers .lsow-odometer:last-child:after {
106
+ border: none; }
107
+ .lsow-odometers .lsow-odometer .lsow-prefix, .lsow-odometers .lsow-odometer .lsow-suffix {
108
+ display: inline;
109
+ font-size: 36px;
110
+ line-height: 48px;
111
+ color: #333;
112
+ vertical-align: middle; }
113
+ .lsow-odometers .lsow-odometer .lsow-prefix {
114
+ margin-right: 5px;
115
+ margin-left: 5px; }
116
+ .lsow-odometers .lsow-odometer .lsow-suffix {
117
+ margin-left: 5px; }
118
+ .lsow-odometers .lsow-odometer .lsow-number {
119
+ font-size: 60px;
120
+ line-height: 72px;
121
+ font-style: normal;
122
+ text-transform: none;
123
+ letter-spacing: 2px;
124
+ font-weight: 900;
125
+ color: #333;
126
+ margin-bottom: 10px; }
127
+ .lsow-odometers .lsow-odometer .lsow-number span {
128
+ font-size: 60px; }
129
+ .lsow-dark-bg .lsow-odometers .lsow-odometer .lsow-number {
130
+ color: #e5e5e5; }
131
+ .lsow-odometers .lsow-odometer .lsow-stats-title {
132
+ font-size: 18px;
133
+ line-height: 28px;
134
+ display: inline-block;
135
+ color: #888; }
136
+ .lsow-dark-bg .lsow-odometers .lsow-odometer .lsow-stats-title {
137
+ color: #909090; }
138
+ .lsow-odometers .lsow-odometer .lsow-stats-title span {
139
+ float: left;
140
+ margin-right: 15px; }
141
+ .lsow-odometers .lsow-odometer .lsow-stats-title .lsow-icon-wrapper {
142
+ font-size: 32px;
143
+ margin-right: 10px;
144
+ vertical-align: middle;
145
+ color: #ccc; }
146
+
147
+ @media only screen and (max-width: 960px) {
148
+ .lsow-odometers .lsow-odometer .lsow-number {
149
+ font-size: 48px;
150
+ line-height: 56px;
151
+ margin-bottom: 0; }
152
+ .lsow-odometers .lsow-odometer .lsow-number span {
153
+ font-size: 48px; }
154
+ .lsow-odometers .lsow-odometer .lsow-stats-title {
155
+ font-size: 15px;
156
+ line-height: 26px; } }
157
+ @media only screen and (max-width: 479px) {
158
+ .lsow-odometers .lsow-odometer {
159
+ text-align: center; } }
160
+
161
+ /*# sourceMappingURL=style.css.map */
includes/widgets/lsow-odometers-widget/css/style.css.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "mappings": "AAGE,IAAK;EACH,UAAU,EAAE,UAAU;;AAItB,sBAEU;EACR,UAAU,EAAE,OAAO;;ACTzB,+DAAgE;EAC9D,OAAO,EAAE,YAAY;EACrB,cAAc,EAAE,MAAM;EACtB,eAAe,EAAE,IAAI;EACrB,KAAK,EAAE,CAAC;EACR,QAAQ,EAAE,MAAM;EAChB,QAAQ,EAAE,QAAQ;;AAEpB,+FAAgG;EAC9F,OAAO,EAAE,YAAY;EACrB,cAAc,EAAE,MAAM;EACtB,eAAe,EAAE,IAAI;EACrB,KAAK,EAAE,CAAC;EACR,QAAQ,EAAE,MAAM;EAChB,QAAQ,EAAE,QAAQ;;AAEpB,6IAA8I;EAC5I,OAAO,EAAE,YAAY;EACrB,cAAc,EAAE,MAAM;EACtB,eAAe,EAAE,IAAI;EACrB,KAAK,EAAE,CAAC;EACR,QAAQ,EAAE,MAAM;EAChB,UAAU,EAAE,MAAM;;AAEpB,2IAA4I;EAC1I,UAAU,EAAE,IAAI;EAChB,OAAO,EAAE,KAAK;EACd,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,CAAC;EACN,IAAI,EAAE,CAAC;EACP,KAAK,EAAE,CAAC;EACR,MAAM,EAAE,CAAC;EACT,QAAQ,EAAE,MAAM;;AAElB,iIAAkI;EAChI,OAAO,EAAE,KAAK;;AAEhB,6IAA8I;EAC5I,OAAO,EAAE,KAAK;EACd,2BAA2B,EAAE,MAAM;;AAErC,+HAAgI;EAC9H,OAAO,EAAE,KAAK;EACd,iBAAiB,EAAE,aAAa;;AAElC,uKAAwK;EACtK,QAAQ,EAAE,QAAQ;;AAEpB,yJAA0J;EACxJ,kBAAkB,EAAE,oBAAoB;EACxC,eAAe,EAAE,iBAAiB;EAClC,cAAc,EAAE,gBAAgB;EAChC,aAAa,EAAE,eAAe;EAC9B,UAAU,EAAE,YAAY;;AAE1B,+LAAgM;EAC9L,iBAAiB,EAAE,iBAAiB;EACpC,cAAc,EAAE,iBAAiB;EACjC,aAAa,EAAE,iBAAiB;EAChC,YAAY,EAAE,iBAAiB;EAC/B,SAAS,EAAE,iBAAiB;;AAE9B,6JAA8J;EAC5J,iBAAiB,EAAE,iBAAiB;EACpC,cAAc,EAAE,iBAAiB;EACjC,aAAa,EAAE,iBAAiB;EAChC,YAAY,EAAE,iBAAiB;EAC/B,SAAS,EAAE,iBAAiB;;AAE9B,mMAAoM;EAClM,kBAAkB,EAAE,oBAAoB;EACxC,eAAe,EAAE,iBAAiB;EAClC,cAAc,EAAE,gBAAgB;EAChC,aAAa,EAAE,eAAe;EAC9B,UAAU,EAAE,YAAY;EACxB,iBAAiB,EAAE,aAAa;EAChC,cAAc,EAAE,aAAa;EAC7B,aAAa,EAAE,aAAa;EAC5B,YAAY,EAAE,aAAa;EAC3B,SAAS,EAAE,aAAa;;AAE1B,+DAAgE;EAC9D,WAAW,EAAE,4BAA4B;EACzC,WAAW,EAAE,KAAK;;AAEpB,+FAAgG;EAC9F,UAAU,EAAE,MAAM;;;AAIpB,eAAgB;EACd,SAAS,EAAE,CAAC;;EAEZ,8BAAe;IACb,OAAO,EAAE,YAAY;IACrB,cAAc,EAAE,GAAG;IACnB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,QAAQ;IAClB,aAAa,EAAE,IAAI;IACnB,+CAAmB;MACjB,MAAM,EAAE,IAAI;IAEd,wFAA2B;MACzB,OAAO,EAAE,MAAM;MACf,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MACjB,KAAK,EAAE,IAAI;MACX,cAAc,EAAE,MAAM;IAExB,2CAAa;MACX,YAAY,EAAE,GAAG;MACjB,WAAW,EAAE,GAAG;IAElB,2CAAa;MACX,WAAW,EAAE,GAAG;IAElB,2CAAa;MACX,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MACjB,UAAU,EAAE,MAAM;MAClB,cAAc,EAAE,IAAI;MACpB,cAAc,EAAE,GAAG;MACnB,WAAW,EAAE,GAAG;MAChB,KAAK,EAAE,IAAI;MACX,aAAa,EAAE,IAAI;MACnB,gDAAK;QACH,SAAS,EAAE,IAAI;MAEjB,yDAAgB;QACd,KAAK,EAAE,OAAO;IAGlB,gDAAkB;MAChB,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MACjB,OAAO,EAAE,YAAY;MACrB,KAAK,EAAE,IAAI;MACX,8DAAgB;QACd,KAAK,EAAE,OAAO;MAEhB,qDAAK;QACH,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,IAAI;MAEpB,mEAAmB;QACjB,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,MAAM;QACtB,KAAK,EAAE,IAAI;;AAMnB,yCAA0C;EAEtC,2CAAa;IACX,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,CAAC;IAChB,gDAAK;MACH,SAAS,EAAE,IAAI;EAInB,gDAAkB;IAChB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;AC1GrB,yCAA8C;EDiH5C,8BAAe;IACb,UAAU,EAAE,MAAM",
4
+ "sources": ["../../../../../../bower_components/neat/app/assets/stylesheets/grid/_box-sizing.scss","style.scss","../../../../assets/css/_lsow-lib.scss"],
5
+ "names": [],
6
+ "file": "style.css"
7
+ }
includes/widgets/lsow-odometers-widget/css/style.scss ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../../../../assets/css/lsow-lib";
2
+
3
+ .odometer.odometer-auto-theme, .odometer.odometer-theme-default {
4
+ display: inline-block;
5
+ vertical-align: middle;
6
+ *vertical-align: auto;
7
+ *zoom: 1;
8
+ *display: inline;
9
+ position: relative; }
10
+
11
+ .odometer.odometer-auto-theme .odometer-digit, .odometer.odometer-theme-default .odometer-digit {
12
+ display: inline-block;
13
+ vertical-align: middle;
14
+ *vertical-align: auto;
15
+ *zoom: 1;
16
+ *display: inline;
17
+ position: relative; }
18
+
19
+ .odometer.odometer-auto-theme .odometer-digit .odometer-digit-spacer, .odometer.odometer-theme-default .odometer-digit .odometer-digit-spacer {
20
+ display: inline-block;
21
+ vertical-align: middle;
22
+ *vertical-align: auto;
23
+ *zoom: 1;
24
+ *display: inline;
25
+ visibility: hidden; }
26
+
27
+ .odometer.odometer-auto-theme .odometer-digit .odometer-digit-inner, .odometer.odometer-theme-default .odometer-digit .odometer-digit-inner {
28
+ text-align: left;
29
+ display: block;
30
+ position: absolute;
31
+ top: 0;
32
+ left: 0;
33
+ right: 0;
34
+ bottom: 0;
35
+ overflow: hidden; }
36
+
37
+ .odometer.odometer-auto-theme .odometer-digit .odometer-ribbon, .odometer.odometer-theme-default .odometer-digit .odometer-ribbon {
38
+ display: block; }
39
+
40
+ .odometer.odometer-auto-theme .odometer-digit .odometer-ribbon-inner, .odometer.odometer-theme-default .odometer-digit .odometer-ribbon-inner {
41
+ display: block;
42
+ -webkit-backface-visibility: hidden; }
43
+
44
+ .odometer.odometer-auto-theme .odometer-digit .odometer-value, .odometer.odometer-theme-default .odometer-digit .odometer-value {
45
+ display: block;
46
+ -webkit-transform: translateZ(0); }
47
+
48
+ .odometer.odometer-auto-theme .odometer-digit .odometer-value.odometer-last-value, .odometer.odometer-theme-default .odometer-digit .odometer-value.odometer-last-value {
49
+ position: absolute; }
50
+
51
+ .odometer.odometer-auto-theme.odometer-animating-up .odometer-ribbon-inner, .odometer.odometer-theme-default.odometer-animating-up .odometer-ribbon-inner {
52
+ -webkit-transition: -webkit-transform 2s;
53
+ -moz-transition: -moz-transform 2s;
54
+ -ms-transition: -ms-transform 2s;
55
+ -o-transition: -o-transform 2s;
56
+ transition: transform 2s; }
57
+
58
+ .odometer.odometer-auto-theme.odometer-animating-up.odometer-animating .odometer-ribbon-inner, .odometer.odometer-theme-default.odometer-animating-up.odometer-animating .odometer-ribbon-inner {
59
+ -webkit-transform: translateY(-100%);
60
+ -moz-transform: translateY(-100%);
61
+ -ms-transform: translateY(-100%);
62
+ -o-transform: translateY(-100%);
63
+ transform: translateY(-100%); }
64
+
65
+ .odometer.odometer-auto-theme.odometer-animating-down .odometer-ribbon-inner, .odometer.odometer-theme-default.odometer-animating-down .odometer-ribbon-inner {
66
+ -webkit-transform: translateY(-100%);
67
+ -moz-transform: translateY(-100%);
68
+ -ms-transform: translateY(-100%);
69
+ -o-transform: translateY(-100%);
70
+ transform: translateY(-100%); }
71
+
72
+ .odometer.odometer-auto-theme.odometer-animating-down.odometer-animating .odometer-ribbon-inner, .odometer.odometer-theme-default.odometer-animating-down.odometer-animating .odometer-ribbon-inner {
73
+ -webkit-transition: -webkit-transform 2s;
74
+ -moz-transition: -moz-transform 2s;
75
+ -ms-transition: -ms-transform 2s;
76
+ -o-transition: -o-transform 2s;
77
+ transition: transform 2s;
78
+ -webkit-transform: translateY(0);
79
+ -moz-transform: translateY(0);
80
+ -ms-transform: translateY(0);
81
+ -o-transform: translateY(0);
82
+ transform: translateY(0); }
83
+
84
+ .odometer.odometer-auto-theme, .odometer.odometer-theme-default {
85
+ font-family: "Helvetica Neue", sans-serif;
86
+ line-height: 1.1em; }
87
+
88
+ .odometer.odometer-auto-theme .odometer-value, .odometer.odometer-theme-default .odometer-value {
89
+ text-align: center; }
90
+
91
+ /* --- Animate Numbers ---- */
92
+
93
+ .lsow-odometers {
94
+ font-size: 0;
95
+ /* inline-block hack */
96
+ .lsow-odometer {
97
+ display: inline-block;
98
+ vertical-align: top;
99
+ text-align: left;
100
+ position: relative;
101
+ margin-bottom: 50px;
102
+ &:last-child:after {
103
+ border: none;
104
+ }
105
+ .lsow-prefix, .lsow-suffix {
106
+ display: inline;
107
+ font-size: 36px;
108
+ line-height: 48px;
109
+ color: #333;
110
+ vertical-align: middle;
111
+ }
112
+ .lsow-prefix {
113
+ margin-right: 5px;
114
+ margin-left: 5px;
115
+ }
116
+ .lsow-suffix {
117
+ margin-left: 5px;
118
+ }
119
+ .lsow-number {
120
+ font-size: 60px;
121
+ line-height: 72px;
122
+ font-style: normal;
123
+ text-transform: none;
124
+ letter-spacing: 2px;
125
+ font-weight: 900;
126
+ color: #333;
127
+ margin-bottom: 10px;
128
+ span {
129
+ font-size: 60px;
130
+ }
131
+ .lsow-dark-bg & {
132
+ color: #e5e5e5;
133
+ }
134
+ }
135
+ .lsow-stats-title {
136
+ font-size: 18px;
137
+ line-height: 28px;
138
+ display: inline-block;
139
+ color: #888;
140
+ .lsow-dark-bg & {
141
+ color: #909090;
142
+ }
143
+ span {
144
+ float: left;
145
+ margin-right: 15px;
146
+ }
147
+ .lsow-icon-wrapper {
148
+ font-size: 32px;
149
+ margin-right: 10px;
150
+ vertical-align: middle;
151
+ color: #ccc;
152
+ }
153
+ }
154
+ }
155
+ }
156
+
157
+ @media only screen and (max-width: 960px) {
158
+ .lsow-odometers .lsow-odometer {
159
+ .lsow-number {
160
+ font-size: 48px;
161
+ line-height: 56px;
162
+ margin-bottom: 0;
163
+ span {
164
+ font-size: 48px;
165
+ }
166
+ }
167
+
168
+ .lsow-stats-title {
169
+ font-size: 15px;
170
+ line-height: 26px;
171
+ }
172
+ }
173
+ }
174
+
175
+ @include respond-to-max(479) {
176
+ .lsow-odometers {
177
+ .lsow-odometer {
178
+ text-align: center;
179
+ }
180
+ }
181
+ }
includes/widgets/lsow-odometers-widget/js/odometer.js ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function ($) {
2
+
3
+ $('.lsow-odometers').waypoint(function (direction) {
4
+
5
+ $(this).find('.lsow-odometer .lsow-number').each(function () {
6
+
7
+ var odometer = $(this);
8
+
9
+ setTimeout(function () {
10
+ var data_stop = odometer.attr('data-stop');
11
+ $(odometer).text(data_stop);
12
+
13
+ }, 100);
14
+
15
+
16
+ });
17
+
18
+ }, { offset: $.waypoints('viewportHeight') - 100,
19
+ triggerOnce: true});
20
+
21
+
22
+ });
includes/widgets/lsow-odometers-widget/js/odometer.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(function(t){t(".lsow-odometers").waypoint(function(o){t(this).find(".lsow-odometer .lsow-number").each(function(){var o=t(this);setTimeout(function(){var e=o.attr("data-stop");t(o).text(e)},100)})},{offset:t.waypoints("viewportHeight")-100,triggerOnce:!0})});
includes/widgets/lsow-odometers-widget/lsow-odometers-widget.php ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Widget Name: Livemesh Odometers
5
+ Description: Display one or more animated odometer statistics in a multi-column grid.
6
+ Author: LiveMesh
7
+ Author URI: http://portfoliotheme.org
8
+ */
9
+
10
+ class LSOW_Odometer_Widget extends SiteOrigin_Widget {
11
+
12
+ function __construct() {
13
+ parent::__construct(
14
+ 'lsow-odometers',
15
+ __('Livemesh Odometers', 'livemesh-so-widgets'),
16
+ array(
17
+ 'description' => __('Display statistics as animated odometers in a multi-column grid.', 'livemesh-so-widgets'),
18
+ 'panels_icon' => 'dashicons dashicons-minus',
19
+ 'help' => 'http://portfoliotheme.org/widgets-bundle/odometer-widget-documentation/'
20
+ ),
21
+ array(),
22
+ array(
23
+ 'title' => array(
24
+ 'type' => 'text',
25
+ 'label' => __('Title', 'livemesh-so-widgets'),
26
+ ),
27
+
28
+ 'odometers' => array(
29
+ 'type' => 'repeater',
30
+ 'label' => __('Odometers', 'livemesh-so-widgets'),
31
+ 'item_name' => __('Odometer', 'livemesh-so-widgets'),
32
+ 'item_label' => array(
33
+ 'selector' => "[id*='odometers-title']",
34
+ 'update_event' => 'change',
35
+ 'value_method' => 'val'
36
+ ),
37
+ 'fields' => array(
38
+ 'stats_title' => array(
39
+ 'type' => 'text',
40
+ 'label' => __('Stats Title', 'livemesh-so-widgets'),
41
+ 'description' => __('The title for the odometer stats', 'livemesh-so-widgets'),
42
+ ),
43
+
44
+ 'start_value' => array(
45
+ 'type' => 'number',
46
+ 'label' => __('Start Value', 'livemesh-so-widgets'),
47
+ 'description' => __('The start value for the odometer stats.', 'livemesh-so-widgets'),
48
+ ),
49
+
50
+ 'stop_value' => array(
51
+ 'type' => 'number',
52
+ 'label' => __('Stop Value', 'livemesh-so-widgets'),
53
+ 'description' => __('The stop value for the odometer stats.', 'livemesh-so-widgets'),
54
+ ),
55
+
56
+ 'icon_type' => array(
57
+ 'type' => 'select',
58
+ 'label' => __('Choose Icon Type', 'livemesh-so-widgets'),
59
+ 'default' => 'icon',
60
+ 'state_emitter' => array(
61
+ 'callback' => 'select',
62
+ 'args' => array('icon_type')
63
+ ),
64
+ 'options' => array(
65
+ 'icon' => __('Icon', 'livemesh-so-widgets'),
66
+ 'icon_image' => __('Icon Image', 'livemesh-so-widgets'),
67
+ )
68
+ ),
69
+
70
+ 'icon_image' => array(
71
+ 'type' => 'media',
72
+ 'label' => __('Stats Image.', 'livemesh-so-widgets'),
73
+ 'state_handler' => array(
74
+ 'icon_type[icon_image]' => array('show'),
75
+ 'icon_type[icon]' => array('hide'),
76
+ ),
77
+ ),
78
+
79
+ 'icon' => array(
80
+ 'type' => 'icon',
81
+ 'label' => __('Stats Icon.', 'livemesh-so-widgets'),
82
+ 'state_handler' => array(
83
+ 'icon_type[icon]' => array('show'),
84
+ 'icon_type[icon_image]' => array('hide'),
85
+ ),
86
+ ),
87
+
88
+ 'prefix' => array(
89
+ 'type' => 'text',
90
+ 'label' => __('Prefix', 'livemesh-so-widgets'),
91
+ 'description' => __('The prefix string for the odometer stats. Examples include currency symbols like $ to indicate a monetary value.', 'livemesh-so-widgets'),
92
+ ),
93
+
94
+ 'suffix' => array(
95
+ 'type' => 'text',
96
+ 'label' => __('Suffix', 'livemesh-so-widgets'),
97
+ 'description' => __('The suffix string for the odometer stats. Examples include strings like hr for hours or m for million.', 'livemesh-so-widgets'),
98
+ ),
99
+ )
100
+ ),
101
+
102
+ 'settings' => array(
103
+ 'type' => 'section',
104
+ 'label' => __('Settings', 'livemesh-so-widgets'),
105
+ 'fields' => array(
106
+
107
+ 'per_line' => array(
108
+ 'type' => 'slider',
109
+ 'label' => __('Odometers per row', 'livemesh-so-widgets'),
110
+ 'min' => 1,
111
+ 'max' => 5,
112
+ 'integer' => true,
113
+ 'default' => 4
114
+ ),
115
+ )
116
+ ),
117
+
118
+ )
119
+ );
120
+ }
121
+
122
+ function initialize() {
123
+
124
+ $this->register_frontend_scripts(
125
+ array(
126
+ array(
127
+ 'lsow-waypoints',
128
+ LSOW_PLUGIN_URL . 'assets/js/jquery.waypoints' . SOW_BUNDLE_JS_SUFFIX . '.js',
129
+ array('jquery'),
130
+ LSOW_VERSION
131
+ ),
132
+ array(
133
+ 'lsow-stats',
134
+ LSOW_PLUGIN_URL . 'assets/js/jquery.stats' . SOW_BUNDLE_JS_SUFFIX . '.js',
135
+ array('jquery'),
136
+ LSOW_VERSION
137
+ ),
138
+ )
139
+ );
140
+
141
+
142
+ $this->register_frontend_scripts(
143
+ array(
144
+ array(
145
+ 'lsow-odometers',
146
+ plugin_dir_url(__FILE__) . 'js/odometer' . SOW_BUNDLE_JS_SUFFIX . '.js',
147
+ array('jquery')
148
+ )
149
+ )
150
+ );
151
+
152
+ $this->register_frontend_styles(array(
153
+ array(
154
+ 'lsow-odometers',
155
+ plugin_dir_url(__FILE__) . 'css/style.css'
156
+ )
157
+ ));
158
+ }
159
+
160
+ function get_template_variables($instance, $args) {
161
+ return array(
162
+ 'odometers' => !empty($instance['odometers']) ? $instance['odometers'] : array(),
163
+ 'settings' => $instance['settings']
164
+ );
165
+ }
166
+
167
+ }
168
+
169
+ siteorigin_widget_register('lsow-odometers', __FILE__, 'LSOW_Odometer_Widget');
includes/widgets/lsow-odometers-widget/tpl/default.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var $odometers
4
+ */
5
+
6
+ ?>
7
+
8
+ <?php $column_style = lsow_get_column_class(intval($settings['per_line'])); ?>
9
+
10
+ <div class="lsow-odometers lsow-container">
11
+
12
+ <?php foreach ($odometers as $odometer): ?>
13
+
14
+ <?php
15
+
16
+ $prefix = (!empty ($odometer['prefix'])) ? '<span class="prefix">' . $odometer['prefix'] . '</span>' : '';
17
+ $suffix = (!empty ($odometer['suffix'])) ? '<span class="suffix">' . $odometer['suffix'] . '</span>' : '';
18
+
19
+ ?>
20
+
21
+ <div class="lsow-odometer <?php echo $column_style; ?>">
22
+
23
+ <?php echo (!empty ($odometer['prefix'])) ? '<span class="lsow-prefix">' . $odometer['prefix'] . '</span>' : ''; ?>
24
+
25
+ <div class="lsow-number odometer" data-stop="<?php echo intval($odometer['stop_value']); ?>">
26
+
27
+ <?php echo intval($odometer['start_value']); ?>
28
+
29
+ </div>
30
+
31
+ <? echo (!empty ($odometer['suffix'])) ? '<span class="lsow-suffix">' . $odometer['suffix'] . '</span>' : ''; ?>
32
+
33
+ <?php $icon_type = esc_html($odometer['icon_type']); ?>
34
+
35
+ <?php if ($icon_type == 'icon_image') : ?>
36
+
37
+ <?php $icon_html = '<span class="lsow-image-wrapper">' . wp_get_attachment_image($odometer['icon_image'], 'full', false, array('class' => 'lsow-image full')) . '</span>'; ?>
38
+
39
+ <?php else : ?>
40
+
41
+ <?php $icon_html = '<span class="lsow-icon-wrapper">' . siteorigin_widget_get_icon($odometer['icon']) . '</span>'; ?>
42
+
43
+ <?php endif; ?>
44
+
45
+ <div class="lsow-stats-title-wrap">
46
+
47
+ <div class="lsow-stats-title"><?php echo $icon_html . esc_html($odometer['stats_title']); ?></div>
48
+
49
+ </div>
50
+
51
+ </div>
52
+
53
+ <?php
54
+
55
+ endforeach;
56
+
57
+ ?>
58
+
59
+ </div>
includes/widgets/lsow-piecharts-widget/assets/banner.svg ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="128px" height="128px" viewBox="0 0 128 128" style="enable-background:new 0 0 128 128;" xml:space="preserve">
6
+ <g>
7
+ <circle style="fill:#2D4452;" cx="64" cy="64" r="64"/>
8
+ <g>
9
+ <path style="fill:#F5F5F5;" d="M49,18h44c1.1,0,2,0.9,2,2v82c0,1.1-0.9,2-2,2H31c-1.1,0-2-0.9-2-2V39L49,18z"/>
10
+ <path style="fill:#E6E6E6;" d="M47,39c1.1,0,2-0.9,2-2V18L29,39H47z"/>
11
+ </g>
12
+ <path style="fill:#E16B5A;" d="M61,52c-5.522,0-10,4.478-10,10h10V52z"/>
13
+ <path style="fill:#2179A6;" d="M63,54v10H53c0,5.522,4.478,10,10,10s10-4.478,10-10S68.522,54,63,54z"/>
14
+ <rect x="75" y="54" style="fill:#B3B3B3;" width="11" height="2"/>
15
+ <rect x="38" y="54" style="fill:#B3B3B3;" width="11" height="2"/>
16
+ <rect x="33" y="57" style="fill:#B3B3B3;" width="16" height="2"/>
17
+ <rect x="33" y="60" style="fill:#B3B3B3;" width="16" height="2"/>
18
+ <rect x="75" y="58" style="fill:#B3B3B3;" width="16" height="2"/>
19
+ <rect x="75" y="61" style="fill:#B3B3B3;" width="16" height="2"/>
20
+ <rect x="75" y="64" style="fill:#B3B3B3;" width="16" height="2"/>
21
+ <rect x="75" y="67" style="fill:#B3B3B3;" width="16" height="2"/>
22
+ <rect x="75" y="70" style="fill:#B3B3B3;" width="16" height="2"/>
23
+ <rect x="33" y="79" style="fill:#B3B3B3;" width="22" height="3"/>
24
+ <rect x="33" y="84" style="fill:#B3B3B3;" width="58" height="2"/>
25
+ <rect x="33" y="87" style="fill:#B3B3B3;" width="58" height="2"/>
26
+ <rect x="33" y="90" style="fill:#B3B3B3;" width="58" height="2"/>
27
+ <rect x="33" y="93" style="fill:#B3B3B3;" width="58" height="2"/>
28
+ </g>
29
+ </svg>
includes/widgets/lsow-piecharts-widget/css/style.css ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ box-sizing: border-box; }
3
+
4
+ *, *::after, *::before {
5
+ box-sizing: inherit; }
6
+
7
+ /*---- Pie Charts --------- */
8
+ .lsow-piechart {
9
+ position: relative;
10
+ text-align: center;
11
+ float: left;
12
+ overflow: hidden;
13
+ float: left;
14
+ padding: 10px; }
15
+ .lsow-piechart canvas {
16
+ position: relative;
17
+ top: 0;
18
+ left: 0;
19
+ max-width: 100%;
20
+ margin: 0 auto; }
21
+ .lsow-piechart .lsow-label {
22
+ text-align: center;
23
+ position: absolute;
24
+ left: 0;
25
+ right: 0;
26
+ margin-left: auto;
27
+ margin-right: auto;
28
+ top: 55%;
29
+ max-width: 65%;
30
+ color: #888; }
31
+ .lsow-dark-bg .lsow-piechart .lsow-label {
32
+ color: #909090; }
33
+ .lsow-piechart .lsow-percentage span {
34
+ position: absolute;
35
+ top: 25%;
36
+ left: 0;
37
+ right: 0;
38
+ margin-left: auto;
39
+ margin-right: auto;
40
+ font-size: 60px;
41
+ line-height: 60px;
42
+ font-weight: 300;
43
+ text-align: center;
44
+ color: #333;
45
+ font-weight: bolder; }
46
+ .lsow-dark-bg .lsow-piechart .lsow-percentage span {
47
+ color: #e5e5e5; }
48
+ .lsow-piechart .lsow-percentage sup {
49
+ font-size: 18px;
50
+ vertical-align: super; }
51
+ .lsow-piechart.dark-bg .lsow-label {
52
+ color: #fff; }
53
+ .lsow-piechart.dark-bg .lsow-percentage span {
54
+ color: #eee; }
55
+
56
+ @media only screen and (max-width: 479px) {
57
+ .lsow-piechart canvas {
58
+ margin-bottom: 15px; } }
59
+
60
+ /*# sourceMappingURL=style.css.map */
includes/widgets/lsow-piecharts-widget/css/style.css.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "mappings": "AAGE,IAAK;EACH,UAAU,EAAE,UAAU;;AAItB,sBAEU;EACR,UAAU,EAAE,OAAO;;;ACPzB,cAAe;EACb,QAAQ,EAAE,QAAQ;EAClB,UAAU,EAAE,MAAM;EAClB,KAAK,EAAE,IAAI;EACX,QAAQ,EAAE,MAAM;EAChB,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,IAAI;EACb,qBAAO;IACL,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,MAAM;EAEhB,0BAAY;IACV,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,WAAW,EAAE,IAAI;IACjB,YAAY,EAAE,IAAI;IAClB,GAAG,EAAE,GAAG;IACR,SAAS,EAAE,GAAG;IACd,KAAK,EAAE,IAAI;IACX,wCAAgB;MACd,KAAK,EAAE,OAAO;EAIhB,oCAAK;IACH,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,WAAW,EAAE,IAAI;IACjB,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,GAAG;IAChB,UAAU,EAAE,MAAM;IAClB,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,MAAM;IACnB,kDAAgB;MACd,KAAK,EAAE,OAAO;EAGlB,mCAAI;IACF,SAAS,EAAE,IAAI;IACf,cAAc,EAAE,KAAK;EAIvB,kCAAY;IACV,KAAK,EAAE,IAAI;EAEb,4CAAsB;IACpB,KAAK,EAAE,IAAI;;AAKjB,yCAA0C;EACxC,qBAAsB;IACpB,aAAa,EAAE,IAAI",
4
+ "sources": ["../../../../../../bower_components/neat/app/assets/stylesheets/grid/_box-sizing.scss","style.scss"],
5
+ "names": [],
6
+ "file": "style.css"
7
+ }
includes/widgets/lsow-piecharts-widget/css/style.scss ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../../../../assets/css/lsow-lib";
2
+
3
+ /*---- Pie Charts --------- */
4
+
5
+ .lsow-piechart {
6
+ position: relative;
7
+ text-align: center;
8
+ float: left;
9
+ overflow: hidden;
10
+ float: left;
11
+ padding: 10px;
12
+ canvas {
13
+ position: relative;
14
+ top: 0;
15
+ left: 0;
16
+ max-width: 100%;
17
+ margin: 0 auto;
18
+ }
19
+ .lsow-label {
20
+ text-align: center;
21
+ position: absolute;
22
+ left: 0;
23
+ right: 0;
24
+ margin-left: auto;
25
+ margin-right: auto;
26
+ top: 55%;
27
+ max-width: 65%;
28
+ color: #888;
29
+ .lsow-dark-bg & {
30
+ color: #909090;
31
+ }
32
+ }
33
+ .lsow-percentage {
34
+ span {
35
+ position: absolute;
36
+ top: 25%;
37
+ left: 0;
38
+ right: 0;
39
+ margin-left: auto;
40
+ margin-right: auto;
41
+ font-size: 60px;
42
+ line-height: 60px;
43
+ font-weight: 300;
44
+ text-align: center;
45
+ color: #333;
46
+ font-weight: bolder;
47
+ .lsow-dark-bg & {
48
+ color: #e5e5e5;
49
+ }
50
+ }
51
+ sup {
52
+ font-size: 18px;
53
+ vertical-align: super;
54
+ }
55
+ }
56
+ &.dark-bg {
57
+ .lsow-label {
58
+ color: #fff;
59
+ }
60
+ .lsow-percentage span {
61
+ color: #eee;
62
+ }
63
+ }
64
+ }
65
+
66
+ @media only screen and (max-width: 479px) {
67
+ .lsow-piechart canvas {
68
+ margin-bottom: 15px;
69
+ }
70
+ }
includes/widgets/lsow-piecharts-widget/js/piechart.js ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function ($) {
2
+
3
+ $('.lsow-piecharts').waypoint(function (direction) {
4
+
5
+ $(this).find('.lsow-piechart .lsow-percentage').each(function () {
6
+
7
+ var track_color = $(this).data('track-color');
8
+ var bar_color = $(this).data('bar-color');
9
+
10
+ $(this).easyPieChart({
11
+ animate: 2000,
12
+ lineWidth: 10,
13
+ barColor: bar_color,
14
+ trackColor: track_color,
15
+ scaleColor: false,
16
+ lineCap: 'square',
17
+ size: 220
18
+
19
+ });
20
+
21
+ });
22
+
23
+ }, { offset: $.waypoints('viewportHeight') - 100,
24
+ triggerOnce: true});
25
+
26
+
27
+ });
includes/widgets/lsow-piecharts-widget/js/piechart.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(function(t){t(".lsow-piecharts").waypoint(function(a){t(this).find(".lsow-piechart .lsow-percentage").each(function(){var a=t(this).data("track-color"),e=t(this).data("bar-color");t(this).easyPieChart({animate:2e3,lineWidth:5,barColor:e,trackColor:a,scaleColor:!1,lineCap:"square",size:220})})},{offset:t.waypoints("viewportHeight")-100,triggerOnce:!0})});
includes/widgets/lsow-piecharts-widget/lsow-piecharts-widget.php ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Widget Name: Livemesh Piecharts
5
+ Description: Display one or more piecharts depicting a percentage value in a multi-column grid.
6
+ Author: LiveMesh
7
+ Author URI: http://portfoliotheme.org
8
+ */
9
+
10
+ class LSOW_Piechart_Widget extends SiteOrigin_Widget {
11
+
12
+ function __construct() {
13
+ parent::__construct(
14
+ 'lsow-piecharts',
15
+ __('Livemesh Piecharts', 'livemesh-so-widgets'),
16
+ array(
17
+ 'description' => __('Display statistics or skills as a percentage piechart.', 'livemesh-so-widgets'),
18
+ 'panels_icon' => 'dashicons dashicons-minus',
19
+ 'help' => 'http://portfoliotheme.org/widgets-bundle/piechart-widget-documentation/'
20
+ ),
21
+ array(),
22
+ array(
23
+ 'title' => array(
24
+ 'type' => 'text',
25
+ 'label' => __('Title', 'livemesh-so-widgets'),
26
+ ),
27
+
28
+ 'piecharts' => array(
29
+ 'type' => 'repeater',
30
+ 'label' => __('Piecharts', 'livemesh-so-widgets'),
31
+ 'item_name' => __('Piechart', 'livemesh-so-widgets'),
32
+ 'item_label' => array(
33
+ 'selector' => "[id*='piecharts-title']",
34
+ 'update_event' => 'change',
35
+ 'value_method' => 'val'
36
+ ),
37
+ 'fields' => array(
38
+ 'stats_title' => array(
39
+ 'type' => 'text',
40
+ 'label' => __('Stats Title', 'livemesh-so-widgets'),
41
+ 'description' => __('The title for the piechart', 'livemesh-so-widgets'),
42
+ ),
43
+
44
+ 'percentage' => array(
45
+ 'type' => 'text',
46
+ 'label' => __('Percentage Value', 'livemesh-so-widgets'),
47
+ 'description' => __('The percentage value for the stats.', 'livemesh-so-widgets'),
48
+ ),
49
+ )
50
+ ),
51
+
52
+ 'settings' => array(
53
+ 'type' => 'section',
54
+ 'label' => __('Settings', 'livemesh-so-widgets'),
55
+ 'fields' => array(
56
+
57
+ 'bar_color' => array(
58
+ 'type' => 'color',
59
+ 'label' => __('Bar color', 'livemesh-so-widgets'),
60
+ 'default' => '#fe5000'
61
+ ),
62
+
63
+ 'track_color' => array(
64
+ 'type' => 'color',
65
+ 'label' => __('Track color', 'livemesh-so-widgets'),
66
+ 'default' => '#dddddd'
67
+ ),
68
+
69
+ 'per_line' => array(
70
+ 'type' => 'slider',
71
+ 'label' => __( 'Piecharts per row', 'livemesh-so-widgets' ),
72
+ 'min' => 1,
73
+ 'max' => 5,
74
+ 'integer' => true,
75
+ 'default' => 4
76
+ ),
77
+ )
78
+ ),
79
+
80
+ )
81
+ );
82
+ }
83
+
84
+ function initialize() {
85
+
86
+ $this->register_frontend_scripts(
87
+ array(
88
+ array(
89
+ 'lsow-waypoints',
90
+ LSOW_PLUGIN_URL . 'assets/js/jquery.waypoints' . SOW_BUNDLE_JS_SUFFIX . '.js',
91
+ array('jquery'),
92
+ LSOW_VERSION
93
+ ),
94
+ array(
95
+ 'lsow-stats',
96
+ LSOW_PLUGIN_URL . 'assets/js/jquery.stats' . SOW_BUNDLE_JS_SUFFIX . '.js',
97
+ array('jquery'),
98
+ LSOW_VERSION
99
+ ),
100
+ )
101
+ );
102
+
103
+
104
+ $this->register_frontend_scripts(
105
+ array(
106
+ array(
107
+ 'lsow-piecharts',
108
+ plugin_dir_url(__FILE__) . 'js/piechart' . SOW_BUNDLE_JS_SUFFIX . '.js',
109
+ array('jquery')
110
+ )
111
+ )
112
+ );
113
+
114
+ $this->register_frontend_styles(array(
115
+ array(
116
+ 'lsow-piecharts',
117
+ plugin_dir_url(__FILE__) . 'css/style.css'
118
+ )
119
+ ));
120
+ }
121
+
122
+ function get_template_variables($instance, $args) {
123
+ return array(
124
+ 'piecharts' => !empty($instance['piecharts']) ? $instance['piecharts'] : array(),
125
+ 'settings' => $instance['settings']
126
+ );
127
+ }
128
+
129
+ }
130
+
131
+ siteorigin_widget_register('lsow-piecharts', __FILE__, 'LSOW_Piechart_Widget');
includes/widgets/lsow-piecharts-widget/tpl/default.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var $piecharts
4
+ */
5
+
6
+ ?>
7
+
8
+ <?php $column_style = lsow_get_column_class(intval($settings['per_line'])); ?>
9
+
10
+ <?php
11
+
12
+ $bar_color = ' data-bar-color="' . esc_attr($settings['bar_color']) . '"';
13
+ $track_color = ' data-track-color="' . esc_attr($settings['track_color']) . '"';
14
+
15
+ ?>
16
+
17
+ <div class="lsow-piecharts lsow-container">
18
+
19
+ <?php foreach ($piecharts as $piechart): ?>
20
+
21
+ <div class="lsow-piechart <?php echo $column_style; ?>">
22
+
23
+ <div class="lsow-percentage" <?php echo $bar_color; ?> <?php echo $track_color; ?>
24
+ data-percent="<?php echo intval($piechart['percentage']); ?>">
25
+
26
+ <span><?php echo intval($piechart['percentage']); ?><sup>%</sup></span>
27
+
28
+ </div>
29
+
30
+ <div class="lsow-label"><?php echo esc_html($piechart['stats_title']); ?></div>
31
+
32
+ </div>
33
+
34
+ <?php
35
+
36
+ endforeach;
37
+
38
+ ?>
39
+
40
+ </div>
includes/widgets/lsow-portfolio-widget/assets/banner.svg ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="128px" height="128px" viewBox="0 0 128 128" style="enable-background:new 0 0 128 128;" xml:space="preserve">
6
+ <g>
7
+ <circle style="fill:#88C5CC;" cx="64" cy="64" r="64"/>
8
+ <g>
9
+ <g>
10
+ <path style="fill:#F5F5F5;" d="M51,23h44c1.1,0,2,0.9,2,2v82c0,1.1-0.9,2-2,2H33c-1.1,0-2-0.9-2-2V44L51,23z"/>
11
+ <path style="fill:#E6E6E6;" d="M49,44c1.1,0,2-0.9,2-2V23L31,44H49z"/>
12
+ </g>
13
+ <g>
14
+ <rect x="38" y="51" style="fill:#E6E6E6;" width="54" height="51"/>
15
+ <rect x="37" y="50" style="fill:#FFFFFF;" width="54" height="51"/>
16
+ <rect x="39" y="52" style="fill:#91D2F2;" width="50" height="38"/>
17
+ <circle style="opacity:0.4;fill:#FFE399;enable-background:new ;" cx="51" cy="62" r="7"/>
18
+ <circle style="opacity:0.2;fill:#FFE399;enable-background:new ;" cx="51" cy="62" r="9"/>
19
+ <circle style="fill:#FFE399;" cx="51" cy="62" r="6"/>
20
+ <path style="fill:#F5F5F5;" d="M84,57c-0.034,0-0.066,0.009-0.1,0.01C83.439,54.723,81.422,53,79,53c-2.762,0-5,2.239-5,5
21
+ c0,0.413,0.064,0.808,0.158,1.191C73.477,59.51,73,60.197,73,61c0,1.104,0.896,2,2,2c0.602,0,8.159,0,9,0c1.657,0,3-1.343,3-3
22
+ S85.657,57,84,57z"/>
23
+ <path style="fill:#E6E6E6;" d="M84,57c-0.034,0-0.066,0.009-0.1,0.01C83.439,54.723,81.422,53,79,53
24
+ c-0.16,0-0.313,0.032-0.468,0.047c2.179,0.233,3.942,1.848,4.368,3.963C82.934,57.009,82.965,57,83,57c1.657,0,3,1.343,3,3
25
+ s-1.343,3-3,3c0.488,0,0.854,0,1,0c1.657,0,3-1.343,3-3S85.657,57,84,57z"/>
26
+ <path style="fill:#F5F5F5;" d="M57,61c0.034,0,0.066,0.009,0.1,0.01C57.561,58.723,59.578,57,62,57c2.762,0,5,2.239,5,5
27
+ c0,0.413-0.064,0.808-0.158,1.191C67.523,63.51,68,64.197,68,65c0,1.104-0.896,2-2,2c-0.602,0-8.159,0-9,0c-1.657,0-3-1.343-3-3
28
+ S55.343,61,57,61z"/>
29
+ <path style="fill:#E6E6E6;" d="M66.842,63.191C66.936,62.807,67,62.412,67,62c0-2.761-2.238-5-5-5
30
+ c-0.338,0-0.664,0.041-0.982,0.104C63.291,57.574,65,59.587,65,62c0,0.413-0.064,0.808-0.158,1.191C65.523,63.51,66,64.197,66,65
31
+ c0,1.104-0.896,2-2,2c1.035,0,1.823,0,2,0c1.104,0,2-0.896,2-2C68,64.197,67.523,63.51,66.842,63.191z"/>
32
+ <polygon style="fill:#198058;" points="52,90 65,75 74,80 84,67 89,75 89,90 "/>
33
+ <polygon style="fill:#F5F5F5;" points="58,83 65,75 74,80 67,78 65,80 64,79 "/>
34
+ <polygon style="fill:#F5F5F5;" points="84,67 89,75 85,73 83,75 82,72 77,76 "/>
35
+ </g>
36
+ </g>
37
+ </g>
38
+ </svg>
includes/widgets/lsow-portfolio-widget/css/style.css ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ box-sizing: border-box; }
3
+
4
+ *, *::after, *::before {
5
+ box-sizing: inherit; }
6
+
7
+ .lsow-portfolio-wrap .lsow-portfolio-header {
8
+ max-width: 1140px;
9
+ margin-left: auto;
10
+ margin-right: auto; }
11
+ .lsow-portfolio-wrap .lsow-heading {
12
+ font-size: 18px;
13
+ line-height: 26px;
14
+ letter-spacing: 1px;
15
+ font-weight: bold;
16
+ color: #333;
17
+ text-transform: uppercase;
18
+ clear: none;
19
+ margin-top: 0;
20
+ margin-bottom: 10px;
21
+ text-align: left;
22
+ display: inline-block;
23
+ font-size: 32px;
24
+ line-height: 44px;
25
+ margin-bottom: 30px; }
26
+ .lsow-dark-bg .lsow-portfolio-wrap .lsow-heading {
27
+ color: #e5e5e5; }
28
+ .lsow-portfolio-wrap .lsow-taxonomy-filter {
29
+ display: inline-block;
30
+ position: relative;
31
+ float: right;
32
+ margin: 0;
33
+ padding: 0;
34
+ border-bottom: 1px solid #ddd; }
35
+ .lsow-dark-bg .lsow-portfolio-wrap .lsow-taxonomy-filter {
36
+ border-color: #666; }
37
+ @media only screen and (max-width: 800px) {
38
+ .lsow-portfolio-wrap .lsow-taxonomy-filter {
39
+ display: block;
40
+ float: none;
41
+ margin-bottom: 30px; } }
42
+ .lsow-portfolio-wrap .lsow-taxonomy-filter .lsow-filter-item {
43
+ display: inline-block;
44
+ margin: 0 12px 0 0;
45
+ padding: 0;
46
+ font-style: italic; }
47
+ @media only screen and (max-width: 479px) {
48
+ .lsow-portfolio-wrap .lsow-taxonomy-filter .lsow-filter-item {
49
+ margin-right: 8px; } }
50
+ .lsow-portfolio-wrap .lsow-taxonomy-filter .lsow-filter-item a {
51
+ font-size: 15px;
52
+ line-height: 24px;
53
+ padding: 0 15px 8px;
54
+ -webkit-transition: all 0.4s ease-in-out 0s;
55
+ -moz-transition: all 0.4s ease-in-out 0s;
56
+ -ms-transition: all 0.4s ease-in-out 0s;
57
+ transition: all 0.4s ease-in-out 0s;
58
+ display: block; }
59
+ @media only screen and (max-width: 479px) {
60
+ .lsow-portfolio-wrap .lsow-taxonomy-filter .lsow-filter-item a {
61
+ padding: 0 10px 8px; } }
62
+ .lsow-portfolio-wrap .lsow-taxonomy-filter .lsow-filter-item.lsow-active {
63
+ border-bottom: 2px solid #888; }
64
+ .lsow-dark-bg .lsow-portfolio-wrap .lsow-taxonomy-filter .lsow-filter-item.lsow-active {
65
+ border-color: #aaa; }
66
+ .lsow-portfolio-wrap .lsow-taxonomy-filter .lsow-filter-item:last-child {
67
+ margin-right: 0; }
68
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item {
69
+ margin-bottom: 30px; }
70
+ @media only screen and (max-width: 1024px) {
71
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item {
72
+ margin-bottom: 20px; } }
73
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item.lsow-zero-margin {
74
+ margin: 0; }
75
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .hentry {
76
+ margin: 0;
77
+ padding: 0;
78
+ border: none;
79
+ background: none;
80
+ box-shadow: none; }
81
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image {
82
+ position: relative;
83
+ overflow: hidden; }
84
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image img {
85
+ display: block;
86
+ -webkit-transition: all 0.4s ease-in-out 0s;
87
+ -moz-transition: all 0.4s ease-in-out 0s;
88
+ -ms-transition: all 0.4s ease-in-out 0s;
89
+ transition: all 0.4s ease-in-out 0s; }
90
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image img:hover {
91
+ -webkit-filter: brightness(80%);
92
+ -moz-filter: brightness(80%);
93
+ -ms-filter: brightness(80%);
94
+ filter: brightness(80%); }
95
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image .lsow-image-overlay {
96
+ position: absolute;
97
+ left: 0;
98
+ top: 0;
99
+ overflow: hidden;
100
+ width: 100%;
101
+ height: 100%;
102
+ background: #000;
103
+ filter: alpha(opacity=0);
104
+ -moz-opacity: 0;
105
+ opacity: 0;
106
+ -webkit-transition: opacity 0.4s ease-in-out 0s;
107
+ -moz-transition: opacity 0.4s ease-in-out 0s;
108
+ -ms-transition: opacity 0.4s ease-in-out 0s;
109
+ transition: opacity 0.4s ease-in-out 0s; }
110
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image .lsow-image-info {
111
+ display: block;
112
+ z-index: 120;
113
+ position: absolute;
114
+ top: 0;
115
+ width: 100%;
116
+ height: 100%;
117
+ text-align: center;
118
+ opacity: 0;
119
+ filter: alpha(opacity=0);
120
+ -webkit-transition: opacity 0.4s ease-in-out 0s;
121
+ -moz-transition: opacity 0.4s ease-in-out 0s;
122
+ -ms-transition: opacity 0.4s ease-in-out 0s;
123
+ transition: opacity 0.4s ease-in-out 0s; }
124
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image .lsow-image-info .lsow-entry-info {
125
+ text-align: center;
126
+ display: block;
127
+ position: absolute;
128
+ height: 82px;
129
+ top: 0;
130
+ bottom: 0;
131
+ left: 0;
132
+ right: 0;
133
+ margin: auto;
134
+ width: 100%; }
135
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image .lsow-image-info h3 {
136
+ padding: 10px;
137
+ margin: 0;
138
+ font-size: 24px;
139
+ line-height: 36px;
140
+ font-weight: 400;
141
+ color: #fff; }
142
+ @media only screen and (max-width: 1024px) {
143
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image .lsow-image-info h3 {
144
+ font-size: 18px;
145
+ line-height: 26px; } }
146
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image .lsow-image-info h3 a {
147
+ display: inline;
148
+ color: #fff;
149
+ -webkit-transition: all 0.3s ease-in-out 0s;
150
+ -moz-transition: all 0.3s ease-in-out 0s;
151
+ -ms-transition: all 0.3s ease-in-out 0s;
152
+ transition: all 0.3s ease-in-out 0s;
153
+ border-bottom: 1px solid transparent; }
154
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image .lsow-image-info h3 a:hover {
155
+ border-bottom: 2px solid #ccc; }
156
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image .lsow-image-info .lsow-terms {
157
+ display: block;
158
+ color: #f9f9f9; }
159
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image .lsow-image-info .lsow-terms a {
160
+ color: #ddd;
161
+ position: relative;
162
+ display: inline;
163
+ zoom: 1;
164
+ font-size: 14px;
165
+ line-height: 26px;
166
+ font-style: italic;
167
+ -webkit-transition: color 0.3s ease-in-out 0s;
168
+ -moz-transition: color 0.3s ease-in-out 0s;
169
+ -ms-transition: color 0.3s ease-in-out 0s;
170
+ transition: color 0.3s ease-in-out 0s; }
171
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image .lsow-image-info .lsow-terms a:hover {
172
+ color: #fff; }
173
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image:hover {
174
+ background: rgba(0, 0, 0, 0.3); }
175
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image:hover .lsow-image-info {
176
+ opacity: 1; }
177
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-project-image:hover .lsow-image-overlay {
178
+ opacity: 0.5; }
179
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .lsow-entry-text-wrap {
180
+ text-align: center;
181
+ max-width: 650px;
182
+ margin: 20px auto 0; }
183
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .entry-title {
184
+ font-size: 18px;
185
+ line-height: 26px;
186
+ font-weight: normal;
187
+ margin-bottom: 10px; }
188
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .entry-title:after, .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .entry-title:before {
189
+ display: none; }
190
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .entry-title a {
191
+ -webkit-transition: all 0.4s ease-in-out 0s;
192
+ -moz-transition: all 0.4s ease-in-out 0s;
193
+ -ms-transition: all 0.4s ease-in-out 0s;
194
+ transition: all 0.4s ease-in-out 0s;
195
+ color: #333; }
196
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .entry-title a:hover {
197
+ color: #888; }
198
+ .lsow-dark-bg .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .entry-title a {
199
+ color: #e0e0e0; }
200
+ .lsow-dark-bg .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .entry-title a:hover {
201
+ color: #fff; }
202
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .entry-summary {
203
+ margin: 10px auto 0;
204
+ padding: 0; }
205
+ .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .entry-summary:before {
206
+ width: 35px;
207
+ height: 1px;
208
+ background: #aaa;
209
+ display: block;
210
+ content: "";
211
+ text-align: center;
212
+ margin: 0 auto 15px; }
213
+ .lsow-dark-bg .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .entry-summary {
214
+ color: #999; }
215
+ .lsow-dark-bg .lsow-portfolio-wrap .lsow-portfolio .lsow-portfolio-item .entry-summary:before {
216
+ background: #505050; }
217
+
218
+ /*# sourceMappingURL=style.css.map */
includes/widgets/lsow-portfolio-widget/css/style.css.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "mappings": "AAGE,IAAK;EACH,UAAU,EAAE,UAAU;;AAItB,sBAEU;EACR,UAAU,EAAE,OAAO;;ACRvB,2CAAuB;EACrB,SAAS,EAAE,MAAM;EACjB,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,IAAI;AAEpB,kCAAc;ECkGd,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,GAAG;EACnB,WAAW,EAAE,IAAI;EACjB,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,SAAS;EACzB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,CAAC;EACb,aAAa,EAAE,IAAI;EDxGjB,UAAU,EAAE,IAAI;EAChB,OAAO,EAAE,YAAY;EACrB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,IAAI;EACjB,aAAa,EAAE,IAAI;EACnB,gDAAgB;IACZ,KAAK,EAAE,OAAO;AAGpB,0CAAsB;EACpB,OAAO,EAAE,YAAY;EACrB,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;EACV,aAAa,EAAE,cAAc;EAC7B,wDAAgB;IACZ,YAAY,EAAE,IAAI;ECoCxB,yCAA8C;ID5C9C,0CAAsB;MAWhB,OAAO,EAAE,KAAK;MACd,KAAK,EAAE,IAAI;MACX,aAAa,EAAE,IAAI;EAEvB,4DAAkB;IAChB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,CAAC;IACV,UAAU,EAAE,MAAM;ICyBtB,yCAA8C;MD7B5C,4DAAkB;QAMd,YAAY,EAAE,GAAG;IAEnB,8DAAE;MACA,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MACjB,OAAO,EAAE,UAAU;MChBzB,kBAAoB,EAwEU,uBAA+B;MAvE7D,eAAiB,EAuEa,uBAA+B;MAtE7D,cAAgB,EAsEc,uBAA+B;MArE7D,UAAY,EAqEkB,uBAA+B;MDtDvD,OAAO,EAAE,KAAK;MCgBpB,yCAA8C;QDrB1C,8DAAE;UAOE,OAAO,EAAE,UAAU;IAGvB,wEAAc;MACZ,aAAa,EAAE,cAAc;MAC7B,sFAAgB;QACZ,YAAY,EAAE,IAAI;IAGxB,uEAAa;MACX,YAAY,EAAE,CAAC;AAKnB,yDAAqB;EACjB,aAAa,EAAE,IAAI;ECFzB,0CAA8C;IDC5C,yDAAqB;MAGb,aAAa,EAAE,IAAI;EAEvB,0EAAmB;IACf,MAAM,EAAE,CAAC;EAEf,iEAAQ;IACL,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;EAEnB,6EAAoB;IAClB,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,MAAM;IAChB,iFAAI;MACF,OAAO,EAAE,KAAK;MCtDtB,kBAAoB,EAwEU,uBAA+B;MAvE7D,eAAiB,EAuEa,uBAA+B;MAtE7D,cAAgB,EAsEc,uBAA+B;MArE7D,UAAY,EAqEkB,uBAA+B;MDhBrD,uFAAQ;QCxDhB,cAAoB,EAAE,eAAM;QAC5B,WAAiB,EAAE,eAAM;QACzB,UAAgB,EAAE,eAAM;QACxB,MAAY,EAAE,eAAM;ID0DhB,iGAAoB;MAClB,QAAQ,EAAE,QAAQ;MAClB,IAAI,EAAE,CAAC;MACP,GAAG,EAAE,CAAC;MACN,QAAQ,EAAE,MAAM;MAChB,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,gBAAkB;MAC1B,YAAY,EAAE,CAAC;MACf,OAAO,EAAE,CAAC;MCvEhB,kBAAoB,EAwEU,2BAA+B;MAvE7D,eAAiB,EAuEa,2BAA+B;MAtE7D,cAAgB,EAsEc,2BAA+B;MArE7D,UAAY,EAqEkB,2BAA+B;IDEvD,8FAAiB;MACf,OAAO,EAAE,KAAK;MACd,OAAO,EAAE,GAAG;MACZ,QAAQ,EAAE,QAAQ;MAClB,GAAG,EAAC,CAAC;MACL,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,MAAM;MAClB,OAAO,EAAE,CAAC;MACV,MAAM,EAAE,gBAAkB;MCnFlC,kBAAoB,EAwEU,2BAA+B;MAvE7D,eAAiB,EAuEa,2BAA+B;MAtE7D,cAAgB,EAsEc,2BAA+B;MArE7D,UAAY,EAqEkB,2BAA+B;MDarD,+GAAiB;QACf,UAAU,EAAE,MAAM;QAClB,OAAO,EAAC,KAAK;QACb,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,IAAI;QACZ,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,CAAC;QACT,IAAI,EAAC,CAAC;QACN,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;MAEb,iGAAG;QACD,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,CAAC;QACT,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,GAAG;QAChB,KAAK,EAAE,IAAI;QCrErB,0CAA8C;UD+DtC,iGAAG;YAQC,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,IAAI;QAEnB,mGAAE;UACA,OAAO,EAAE,MAAM;UACf,KAAK,EAAE,IAAI;UC9GvB,kBAAoB,EAwEU,uBAA+B;UAvE7D,eAAiB,EAuEa,uBAA+B;UAtE7D,cAAgB,EAsEc,uBAA+B;UArE7D,UAAY,EAqEkB,uBAA+B;UDwCjD,aAAa,EAAE,qBAAqB;UACrC,yGAAQ;YACP,aAAa,EAAE,cAAc;MAIjC,0GAAY;QACV,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,OAAO;QACd,4GAAE;UACA,KAAK,EAAE,IAAI;UACX,QAAQ,EAAE,QAAQ;UAClB,OAAO,EAAE,MAAM;UACf,IAAI,EAAE,CAAC;UACP,SAAS,EAAE,IAAI;UACf,WAAW,EAAE,IAAI;UACjB,UAAU,EAAE,MAAM;UChI9B,kBAAoB,EAwEU,yBAA+B;UAvE7D,eAAiB,EAuEa,yBAA+B;UAtE7D,cAAgB,EAsEc,yBAA+B;UArE7D,UAAY,EAqEkB,yBAA+B;UD0DjD,kHAAQ;YACN,KAAK,EAAE,IAAI;IAKlB,mFAAQ;MACL,UAAU,EAAE,kBAAe;MAE5B,oGAAiB;QACf,OAAO,EAAE,CAAC;MAEZ,uGAAoB;QAClB,OAAO,EAAE,GAAG;EAKnB,+EAAsB;IACpB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,WAAW;EAEpB,sEAAa;IACR,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,MAAM;IACnB,aAAa,EAAE,IAAI;IACnB,2JAAkB;MAChB,OAAO,EAAE,IAAI;IAEf,wEAAE;MCjKZ,kBAAoB,EAwEU,uBAA+B;MAvE7D,eAAiB,EAuEa,uBAA+B;MAtE7D,cAAgB,EAsEc,uBAA+B;MArE7D,UAAY,EAqEkB,uBAA+B;MD2F/C,KAAK,EAAE,IAAI;MACX,8EAAQ;QACJ,KAAK,EAAE,IAAI;IAIf,sFAAE;MACE,KAAK,EAAE,OAAO;MACd,4FAAQ;QACJ,KAAK,EAAE,IAAI;EAK5B,wEAAe;IACX,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,CAAC;IACV,+EAAS;MACT,KAAK,EAAE,IAAI;MACV,MAAM,EAAE,GAAG;MACX,UAAU,EAAE,IAAI;MAChB,OAAO,EAAE,KAAK;MACd,OAAO,EAAE,EAAE;MACX,UAAU,EAAE,MAAM;MAClB,MAAM,EAAE,WAAW;IAGnB,sFAAgB;MACZ,KAAK,EAAE,IAAI;MACX,6FAAS;QACL,UAAU,EAAE,OAAO",
4
+ "sources": ["../../../../../../bower_components/neat/app/assets/stylesheets/grid/_box-sizing.scss","style.scss","../../../../assets/css/_lsow-lib.scss"],
5
+ "names": [],
6
+ "file": "style.css"
7
+ }
includes/widgets/lsow-portfolio-widget/css/style.scss ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../../../../assets/css/lsow-lib";
2
+
3
+ .lsow-portfolio-wrap {
4
+ .lsow-portfolio-header {
5
+ max-width: 1140px;
6
+ margin-left: auto;
7
+ margin-right: auto;
8
+ }
9
+ .lsow-heading {
10
+ @include lsow-heading-style();
11
+ text-align: left;
12
+ display: inline-block;
13
+ font-size: 32px;
14
+ line-height: 44px;
15
+ margin-bottom: 30px;
16
+ .lsow-dark-bg & {
17
+ color: #e5e5e5;
18
+ }
19
+ }
20
+ .lsow-taxonomy-filter {
21
+ display: inline-block;
22
+ position: relative;
23
+ float: right;
24
+ margin: 0;
25
+ padding: 0;
26
+ border-bottom: 1px solid #ddd;
27
+ .lsow-dark-bg & {
28
+ border-color: #666;
29
+ }
30
+ @include respond-to-max(800) {
31
+ display: block;
32
+ float: none;
33
+ margin-bottom: 30px;
34
+ }
35
+ .lsow-filter-item {
36
+ display: inline-block;
37
+ margin: 0 12px 0 0;
38
+ padding: 0;
39
+ font-style: italic;
40
+ @include respond-to-max(479) {
41
+ margin-right: 8px;
42
+ }
43
+ a {
44
+ font-size: 15px;
45
+ line-height: 24px;
46
+ padding: 0 15px 8px;
47
+ @include lsow-transition();
48
+ display: block;
49
+ @include respond-to-max(479) {
50
+ padding: 0 10px 8px;
51
+ }
52
+ }
53
+ &.lsow-active {
54
+ border-bottom: 2px solid #888;
55
+ .lsow-dark-bg & {
56
+ border-color: #aaa;
57
+ }
58
+ }
59
+ &:last-child {
60
+ margin-right: 0;
61
+ }
62
+ }
63
+ }
64
+ .lsow-portfolio {
65
+ .lsow-portfolio-item {
66
+ margin-bottom: 30px;
67
+ @include respond-to-max(1024) {
68
+ margin-bottom: 20px;
69
+ }
70
+ &.lsow-zero-margin {
71
+ margin: 0;
72
+ }
73
+ .hentry {
74
+ margin: 0;
75
+ padding: 0;
76
+ border: none;
77
+ background: none;
78
+ box-shadow: none;
79
+ }
80
+ .lsow-project-image {
81
+ position: relative;
82
+ overflow: hidden;
83
+ img {
84
+ display: block;
85
+ @include lsow-transition();
86
+ &:hover {
87
+ @include vendorize(filter, brightness(80%));
88
+ }
89
+ }
90
+
91
+ .lsow-image-overlay {
92
+ position: absolute;
93
+ left: 0;
94
+ top: 0;
95
+ overflow: hidden;
96
+ width: 100%;
97
+ height: 100%;
98
+ background: #000;
99
+ filter: alpha(opacity = 0);
100
+ -moz-opacity: 0;
101
+ opacity: 0;
102
+ @include lsow-transition(opacity);
103
+ }
104
+ .lsow-image-info {
105
+ display: block;
106
+ z-index: 120;
107
+ position: absolute;
108
+ top:0;
109
+ width: 100%;
110
+ height: 100%;
111
+ text-align: center;
112
+ opacity: 0;
113
+ filter: alpha(opacity = 0);
114
+ @include lsow-transition(opacity);
115
+ .lsow-entry-info {
116
+ text-align: center;
117
+ display:block;
118
+ position: absolute;
119
+ height: 82px;
120
+ top: 0;
121
+ bottom: 0;
122
+ left:0;
123
+ right: 0;
124
+ margin: auto;
125
+ width: 100%;
126
+ }
127
+ h3 {
128
+ padding: 10px;
129
+ margin: 0;
130
+ font-size: 24px;
131
+ line-height: 36px;
132
+ font-weight: 400;
133
+ color: #fff;
134
+ @include respond-to-max(1024) {
135
+ font-size: 18px;
136
+ line-height: 26px;
137
+ }
138
+ a {
139
+ display: inline;
140
+ color: #fff;
141
+ @include lsow-transition(all, 0.3s);
142
+ border-bottom: 1px solid transparent;
143
+ &:hover {
144
+ border-bottom: 2px solid #ccc;
145
+ }
146
+ }
147
+ }
148
+ .lsow-terms {
149
+ display: block;
150
+ color: #f9f9f9;
151
+ a {
152
+ color: #ddd;
153
+ position: relative;
154
+ display: inline;
155
+ zoom: 1;
156
+ font-size: 14px;
157
+ line-height: 26px;
158
+ font-style: italic;
159
+ @include lsow-transition(color, 0.3s);
160
+ &:hover {
161
+ color: #fff;
162
+ }
163
+ }
164
+ }
165
+ }
166
+ &:hover {
167
+ background: rgba(0,0,0,0.3);
168
+
169
+ .lsow-image-info {
170
+ opacity: 1;
171
+ }
172
+ .lsow-image-overlay {
173
+ opacity: 0.5;
174
+ }
175
+
176
+ }
177
+ }
178
+ .lsow-entry-text-wrap {
179
+ text-align: center;
180
+ max-width: 650px;
181
+ margin: 20px auto 0;
182
+ }
183
+ .entry-title {
184
+ font-size: 18px;
185
+ line-height: 26px;
186
+ font-weight: normal;
187
+ margin-bottom: 10px;
188
+ &:after, &:before {
189
+ display: none;
190
+ }
191
+ a {
192
+ @include lsow-transition();
193
+ color: #333;
194
+ &:hover {
195
+ color: #888;
196
+ }
197
+ }
198
+ .lsow-dark-bg & {
199
+ a {
200
+ color: #e0e0e0;
201
+ &:hover {
202
+ color: #fff;
203
+ }
204
+ }
205
+ }
206
+ }
207
+ .entry-summary {
208
+ margin: 10px auto 0;
209
+ padding: 0;
210
+ &:before {
211
+ width: 35px;
212
+ height: 1px;
213
+ background: #aaa;
214
+ display: block;
215
+ content: "";
216
+ text-align: center;
217
+ margin: 0 auto 15px;
218
+ }
219
+
220
+ .lsow-dark-bg & {
221
+ color: #999;
222
+ &:before {
223
+ background: #505050;
224
+ }
225
+ }
226
+ }
227
+ }
228
+ }
229
+ }
includes/widgets/lsow-portfolio-widget/js/portfolio.js ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function ($) {
2
+
3
+ if ($().isotope === undefined) {
4
+ return;
5
+ }
6
+
7
+ $('.lsow-portfolio-wrap').each(function () {
8
+
9
+ var html_content = $(this).find('.js-isotope');
10
+ // layout Isotope again after all images have loaded
11
+ html_content.imagesLoaded(function () {
12
+ html_content.isotope('layout');
13
+ });
14
+
15
+ var container = $(this).find('.lsow-portfolio');
16
+ if (container.length === 0) {
17
+ return;
18
+ }
19
+
20
+ $(this).find('.lsow-taxonomy-filter .lsow-filter-item a').on('click', function (e) {
21
+ e.preventDefault();
22
+
23
+ var selector = $(this).attr('data-value');
24
+ container.isotope({ filter: selector });
25
+ $(this).closest('.lsow-taxonomy-filter').children().removeClass('lsow-active');
26
+ $(this).closest('.lsow-filter-item').addClass('lsow-active');
27
+ return false;
28
+ });
29
+ });
30
+
31
+ });
includes/widgets/lsow-portfolio-widget/js/portfolio.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(function(o){void 0!==o().isotope&&o(".lsow-portfolio-wrap").each(function(){var t=o(this).find(".js-isotope");t.imagesLoaded(function(){t.isotope("layout")});var i=o(this).find(".lsow-portfolio");0!==i.length&&o(this).find(".lsow-taxonomy-filter .lsow-filter-item a").on("click",function(t){t.preventDefault();var e=o(this).attr("data-value");return i.isotope({filter:e}),o(this).closest(".lsow-taxonomy-filter").children().removeClass("lsow-active"),o(this).closest(".lsow-filter-item").addClass("lsow-active"),!1})})});
includes/widgets/lsow-portfolio-widget/lsow-portfolio-widget.php ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Widget Name: Livemesh Portfolio
5
+ Description: Display portfolio items from Jetpack custom post types in multi-column grid.
6
+ Author: LiveMesh
7
+ Author URI: http://portfoliotheme.org
8
+ */
9
+
10
+ class LSOW_Portfolio_Widget extends SiteOrigin_Widget {
11
+
12
+ function __construct() {
13
+ parent::__construct(
14
+ 'lsow-portfolio',
15
+ __('Livemesh Portfolio', 'livemesh-so-widgets'),
16
+ array(
17
+ 'description' => __('Showcase your work or products with a filterable portfolio layout. Make sure that Custom Post Types module in active in Jetpack plugin', 'livemesh-so-widgets'),
18
+ 'panels_icon' => 'dashicons dashicons-minus',
19
+ 'help' => 'http://portfoliotheme.org/widgets-bundle/portfolio-widget-documentation/'
20
+ ),
21
+ array(),
22
+ array(
23
+ 'title' => array(
24
+ 'type' => 'text',
25
+ 'label' => __('Title', 'livemesh-so-widgets'),
26
+ ),
27
+
28
+ 'heading' => array(
29
+ 'type' => 'text',
30
+ 'label' => __('Heading for the portfolio', 'livemesh-so-widgets'),
31
+ ),
32
+
33
+ 'terms' => array(
34
+ 'type' => 'select',
35
+ 'label' => __('Optionally choose one or more categories/project types for display of portfolio items. If none chosen, items from all of the categories are displayed.', 'livemesh-so-widgets'),
36
+ 'multiple' => true,
37
+ 'options' => lsow_get_terms('jetpack-portfolio-type')
38
+ ),
39
+
40
+ 'post_count' => array(
41
+ 'type' => 'number',
42
+ 'label' => __('Enter the total number of projects to display. If blank or zero, all projects are displayed.', 'livemesh-so-widgets'),
43
+ ),
44
+
45
+ 'settings' => array(
46
+ 'type' => 'section',
47
+ 'label' => __('Settings', 'livemesh-so-widgets'),
48
+ 'fields' => array(
49
+
50
+ 'filterable' => array(
51
+ 'type' => 'checkbox',
52
+ 'label' => __('Filterable?', 'livemesh-so-widgets'),
53
+ 'default' => true
54
+ ),
55
+
56
+ 'layout_mode' => array(
57
+ 'type' => 'select',
58
+ 'label' => __('Choose a layout for the portfolio', 'livemesh-so-widgets'),
59
+ 'state_emitter' => array(
60
+ 'callback' => 'select',
61
+ 'args' => array('layout_mode')
62
+ ),
63
+ 'default' => 'fitRows',
64
+ 'options' => array(
65
+ 'fitRows' => __('Fit Rows', 'livemesh-so-widgets'),
66
+ 'masonry' => __('Masonry', 'livemesh-so-widgets'),
67
+ )
68
+ ),
69
+
70
+ 'packed' => array(
71
+ 'type' => 'checkbox',
72
+ 'label' => __('Packed Layout?', 'livemesh-so-widgets'),
73
+ 'state_handler' => array(
74
+ 'layout_mode[fitRows]' => array('show'),
75
+ 'layout_mode[masonry]' => array('hide'),
76
+ ),
77
+ 'default' => false
78
+ ),
79
+
80
+ 'image_linkable' => array(
81
+ 'type' => 'checkbox',
82
+ 'label' => __('Link the image to the portfolio?', 'livemesh-so-widgets'),
83
+ 'default' => true
84
+ ),
85
+
86
+ 'display_title' => array(
87
+ 'type' => 'checkbox',
88
+ 'label' => __('Display project title below the portfolio item?', 'livemesh-so-widgets'),
89
+ 'default' => true
90
+ ),
91
+
92
+ 'display_summary' => array(
93
+ 'type' => 'checkbox',
94
+ 'label' => __('Display project excerpt/summary below the portfolio item?', 'livemesh-so-widgets'),
95
+ 'default' => true
96
+ ),
97
+
98
+ 'per_line' => array(
99
+ 'type' => 'slider',
100
+ 'label' => __('Columns per row', 'livemesh-so-widgets'),
101
+ 'min' => 1,
102
+ 'max' => 5,
103
+ 'integer' => true,
104
+ 'default' => 4
105
+ ),
106
+
107
+ 'gutter' => array(
108
+ 'type' => 'number',
109
+ 'label' => __('Masonry Gutter', 'livemesh-so-widgets'),
110
+ 'state_handler' => array(
111
+ 'layout_mode[masonry]' => array('show'),
112
+ 'layout_mode[fitRows]' => array('hide'),
113
+ ),
114
+ 'description' => __('Space between columns in masonry grid.', 'livemesh-so-widgets'),
115
+ 'default' => 20
116
+ ),
117
+
118
+ 'responsive' => array(
119
+ 'type' => 'section',
120
+ 'label' => __('Responsive', 'livemesh-so-widgets'),
121
+ 'hide' => true,
122
+ 'state_handler' => array(
123
+ 'layout_mode[masonry]' => array('show'),
124
+ 'layout_mode[fitRows]' => array('hide'),
125
+ ),
126
+ 'fields' => array(
127
+ 'tablet' => array(
128
+ 'type' => 'section',
129
+ 'label' => __('Tablet', 'livemesh-so-widgets'),
130
+ 'fields' => array(
131
+
132
+ 'gutter' => array(
133
+ 'type' => 'number',
134
+ 'label' => __('Gutter', 'livemesh-so-widgets'),
135
+ 'description' => __('Space between columns in masonry layout.', 'livemesh-so-widgets'),
136
+ 'default' => 10
137
+ ),
138
+
139
+ 'width' => array(
140
+ 'type' => 'text',
141
+ 'label' => __('Resolution', 'livemesh-so-widgets'),
142
+ 'description' => __('The resolution to treat as a tablet resolution.', 'livemesh-so-widgets'),
143
+ 'default' => 800,
144
+ 'sanitize' => 'intval',
145
+ )
146
+ )
147
+ ),
148
+ 'mobile' => array(
149
+ 'type' => 'section',
150
+ 'label' => __('Mobile Phone', 'livemesh-so-widgets'),
151
+ 'fields' => array(
152
+
153
+ 'gutter' => array(
154
+ 'type' => 'number',
155
+ 'label' => __('Gutter', 'livemesh-so-widgets'),
156
+ 'description' => __('Space between columns in masonry layout.', 'livemesh-so-widgets'),
157
+ 'default' => 10
158
+ ),
159
+
160
+ 'width' => array(
161
+ 'type' => 'text',
162
+ 'label' => __('Resolution', 'livemesh-so-widgets'),
163
+ 'description' => __('The resolution to treat as a mobile resolution.', 'livemesh-so-widgets'),
164
+ 'default' => 480,
165
+ 'sanitize' => 'intval',
166
+ )
167
+ )
168
+ )
169
+
170
+ )
171
+ ),
172
+ )
173
+ ),
174
+ )
175
+ );
176
+ }
177
+
178
+ function initialize() {
179
+
180
+ $this->register_frontend_scripts(
181
+ array(
182
+ array(
183
+ 'lsow-isotope',
184
+ LSOW_PLUGIN_URL . 'assets/js/isotope.pkgd' . SOW_BUNDLE_JS_SUFFIX . '.js',
185
+ array('jquery'),
186
+ LSOW_VERSION
187
+ ),
188
+ array(
189
+ 'lsow-imagesloaded',
190
+ LSOW_PLUGIN_URL . 'assets/js/imagesloaded.pkgd' . SOW_BUNDLE_JS_SUFFIX . '.js',
191
+ array('jquery'),
192
+ LSOW_VERSION
193
+ ),
194
+ )
195
+ );
196
+
197
+
198
+ $this->register_frontend_scripts(array(
199
+ array(
200
+ 'lsow-portfolio',
201
+ plugin_dir_url(__FILE__) . 'js/portfolio' . SOW_BUNDLE_JS_SUFFIX . '.js',
202
+ array('jquery')
203
+ )
204
+ )
205
+ );
206
+
207
+ $this->register_frontend_styles(array(
208
+ array(
209
+ 'lsow-portfolio',
210
+ plugin_dir_url(__FILE__) . 'css/style.css'
211
+ )
212
+ )
213
+ );
214
+ }
215
+
216
+
217
+ function get_less_variables($instance) {
218
+ return array(
219
+
220
+ 'gutter' => intval($instance['settings']['gutter']) . 'px',
221
+
222
+ // All the responsive sizes
223
+ 'tablet_width' => intval($instance['settings']['responsive']['tablet']['width']) . 'px',
224
+ 'tablet_gutter' => intval($instance['settings']['responsive']['tablet']['gutter']) . 'px',
225
+ 'mobile_width' => intval($instance['settings']['responsive']['mobile']['width']) . 'px',
226
+ 'mobile_gutter' => intval($instance['settings']['responsive']['mobile']['gutter']) . 'px',
227
+ );
228
+ }
229
+
230
+ function get_template_variables($instance, $args) {
231
+ return array(
232
+ 'post_count' => $instance['post_count'],
233
+ 'heading' => $instance['heading'],
234
+ 'terms' => is_string($instance['terms']) ? array($instance['terms']) : $instance['terms'],
235
+ 'settings' => $instance['settings']
236
+ );
237
+ }
238
+
239
+ }
240
+
241
+ siteorigin_widget_register('lsow-portfolio', __FILE__, 'LSOW_Portfolio_Widget');
includes/widgets/lsow-portfolio-widget/styles/default.less ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../../../../../so-widgets-bundle/base/less/mixins";
2
+
3
+ @gutter: 20px;
4
+ @tablet_width: 800px;
5
+ @tablet_gutter: 10px;
6
+ @mobile_width: 480px;
7
+ @mobile_gutter: 10px;
8
+
9
+ .lsow-portfolio.lsow-masonry {
10
+ margin-left: -@gutter;
11
+ margin-right: -@gutter;
12
+
13
+ @media screen and (max-width: @tablet_width) {
14
+ margin-left: -@tablet_gutter;
15
+ margin-right: -@tablet_gutter;
16
+ }
17
+
18
+ @media screen and (max-width: @mobile_width) {
19
+ margin-left: -@mobile_gutter;
20
+ margin-right: -@mobile_gutter;
21
+ }
22
+
23
+ .lsow-portfolio-item {
24
+ padding: @gutter;
25
+
26
+ @media screen and (max-width: @tablet_width) {
27
+ padding: @tablet_gutter;
28
+ }
29
+
30
+ @media screen and (max-width: @mobile_width) {
31
+ padding: @mobile_gutter;
32
+ }
33
+ }
34
+ }
includes/widgets/lsow-portfolio-widget/tpl/default.php ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var $settings
4
+ * @var $terms
5
+ * @var $post_count
6
+ */
7
+
8
+
9
+ $taxonomy = 'jetpack-portfolio-type';
10
+
11
+ $query_args = array();
12
+ $query_args ['post_type'] = 'jetpack-portfolio';
13
+
14
+ if (intval($post_count) !== 0)
15
+ $query_args['posts_per_page'] = $post_count;
16
+ else
17
+ $query_args['posts_per_page'] = -1;
18
+
19
+ if (!empty($terms)) {
20
+ $query_args['tax_query'] = array(array('taxonomy' => $taxonomy,
21
+ 'field' => 'term_id',
22
+ 'terms' => $terms));
23
+ }
24
+
25
+ // Use the processed post selector query to find posts.
26
+ $loop = new WP_Query($query_args);
27
+
28
+ // Loop through the posts and do something with them.
29
+ if ($loop->have_posts()) : ?>
30
+
31
+ <div class="lsow-portfolio-wrap lsow-container">
32
+
33
+ <?php $column_style = lsow_get_column_class(intval($settings['per_line'])); ?>
34
+
35
+ <?php if ($settings['packed'] || $settings['layout_mode'] == 'masonry'): ?>
36
+
37
+ <?php $column_style = $column_style . ' lsow-zero-margin'; ?>
38
+
39
+ <?php endif; ?>
40
+
41
+ <div class="lsow-portfolio-header">
42
+
43
+ <?php if (!empty($settings['heading'])) ?>
44
+
45
+ <h3 class="lsow-heading"><?php echo wp_kses_post($heading); ?></h3>
46
+
47
+ <?php
48
+
49
+ if ($settings['filterable'])
50
+ echo lsow_get_taxonomy_terms_filter($taxonomy, $terms);
51
+
52
+ ?>
53
+
54
+ </div>
55
+
56
+ <div class="lsow-portfolio js-isotope lsow-<?php echo $settings['layout_mode']; ?>"
57
+ data-isotope-options='{ "itemSelector": ".lsow-portfolio-item", "layoutMode": "<?php echo esc_attr($settings['layout_mode']); ?>" }'>
58
+
59
+ <?php while ($loop->have_posts()) : $loop->the_post(); ?>
60
+
61
+ <?php
62
+ $style = '';
63
+ $terms = get_the_terms(get_the_ID(), $taxonomy);
64
+ if (!empty($terms)) {
65
+ foreach ($terms as $term) {
66
+ $style = ' term-' . $term->term_id;
67
+ }
68
+ }
69
+ ?>
70
+
71
+ <div data-id="id-<?php the_ID(); ?>"
72
+ class="lsow-portfolio-item <?php echo $style; ?> <?php echo $column_style; ?>">
73
+
74
+ <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
75
+
76
+ <?php if ($thumbnail_exists = has_post_thumbnail()): ?>
77
+
78
+ <div class="lsow-project-image">
79
+
80
+ <?php if ($settings['image_linkable']): ?>
81
+
82
+ <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('large'); ?> </a>
83
+
84
+ <?php else: ?>
85
+
86
+ <?php the_post_thumbnail('large'); ?>
87
+
88
+ <?php endif; ?>
89
+
90
+ <div class="lsow-image-info">
91
+
92
+ <div class="lsow-entry-info">
93
+
94
+ <?php the_title('<h3 class="lsow-post-title"><a href="' . get_permalink() . '" title="' . get_the_title() . '"
95
+ rel="bookmark">', '</a></h3>'); ?>
96
+
97
+ <?php echo lsow_get_taxonomy_info($taxonomy); ?>
98
+
99
+ </div>
100
+
101
+ </div>
102
+
103
+ <div class="lsow-image-overlay"></div>
104
+
105
+ </div>
106
+
107
+ <?php endif; ?>
108
+
109
+ <?php if ($settings['display_title'] || $settings['display_summary']) : ?>
110
+
111
+ <div class="lsow-entry-text-wrap <?php echo($thumbnail_exists ? '' : ' nothumbnail'); ?>">
112
+
113
+ <?php if ($settings['display_title']) : ?>
114
+
115
+ <?php the_title('<h3 class="entry-title"><a href="' . get_permalink() . '" title="' . get_the_title() . '"
116
+ rel="bookmark">', '</a></h3>'); ?>
117
+
118
+ <?php endif; ?>
119
+
120
+ <?php if ($settings['display_summary']) : ?>
121
+
122
+ <div class="entry-summary">
123
+
124
+ <?php echo get_the_excerpt(); ?>
125
+
126
+ </div>
127
+
128
+ <?php endif; ?>
129
+
130
+ </div>
131
+
132
+ <?php endif; ?>
133
+
134
+ </article>
135
+ <!-- .hentry -->
136
+
137
+ </div><!--Isotope element -->
138
+
139
+ <?php endwhile; ?>
140
+
141
+ <?php wp_reset_postdata(); ?>
142
+
143
+ </div>
144
+ <!-- Isotope items -->
145
+
146
+ </div>
147
+
148
+ <?php endif; ?>
includes/widgets/lsow-posts-carousel-widget/assets/banner.svg ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="news" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="128px" height="128px" viewBox="0 0 128 128" style="enable-background:new 0 0 128 128;" xml:space="preserve">
6
+ <g>
7
+ <circle style="fill:#2D4452;" cx="64" cy="64" r="64"/>
8
+ <g>
9
+ <g>
10
+ <defs>
11
+ <path id="SVGID_1_" d="M128,64c0,35.375-28.654,64-64,64C28.654,128,0,99.375,0,64S28.654,0,64,0C99.346,0,128,28.625,128,64z"
12
+ />
13
+ </defs>
14
+ <clipPath id="SVGID_2_">
15
+ <use xlink:href="#SVGID_1_" style="overflow:visible;"/>
16
+ </clipPath>
17
+ <g style="clip-path:url(#SVGID_2_);">
18
+ <path style="fill:#FFEEBF;" d="M41,132.2V50H21.4c-4.105,0-5.4,1.215-5.4,5.2V133.6c0,6.642,5.556,11.4,12.4,11.4H41V132.2z"/>
19
+ <path style="fill:#FFF1CC;" d="M123.6,34h-77c-4.104,0-5.6,1.816-5.6,5.8v92.4V145h81.2c4.104,0,6.8-3.214,6.8-7.2v-98
20
+ C129,35.816,127.705,34,123.6,34z"/>
21
+ <rect x="90" y="61" style="fill:#E6D9B8;" width="31" height="28"/>
22
+ <rect x="38" y="50" style="fill:#F2E2B5;" width="3" height="95"/>
23
+ <rect x="49" y="44" style="fill:#E6D9B8;" width="72" height="10"/>
24
+ <rect x="49" y="64" style="fill:#E6D9B8;" width="37" height="2"/>
25
+ <rect x="49" y="69" style="fill:#E6D9B8;" width="37" height="3"/>
26
+ <rect x="49" y="75" style="fill:#E6D9B8;" width="37" height="3"/>
27
+ <rect x="49" y="80" style="fill:#E6D9B8;" width="37" height="3"/>
28
+ <rect x="49" y="86" style="fill:#E6D9B8;" width="37" height="3"/>
29
+ <rect x="49" y="94" style="fill:#E6D9B8;" width="72" height="3"/>
30
+ <rect x="49" y="100" style="fill:#E6D9B8;" width="72" height="3"/>
31
+ <rect x="49" y="106" style="fill:#E6D9B8;" width="72" height="2"/>
32
+ <rect x="49" y="111" style="fill:#E6D9B8;" width="72" height="3"/>
33
+ <rect x="49" y="117" style="fill:#E6D9B8;" width="72" height="3"/>
34
+ <rect x="49" y="122" style="fill:#E6D9B8;" width="72" height="3"/>
35
+ <rect x="49" y="128" style="fill:#E6D9B8;" width="72" height="3"/>
36
+ </g>
37
+ </g>
38
+ </g>
39
+ </g>
40
+ </svg>
includes/widgets/lsow-posts-carousel-widget/css/style.css ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ box-sizing: border-box; }
3
+
4
+ *, *::after, *::before {
5
+ box-sizing: inherit; }
6
+
7
+ .lsow-posts-carousel {
8
+ max-width: 960px !important; }
9
+ .lsow-posts-carousel .lsow-posts-carousel-item .type-post {
10
+ background: #fff;
11
+ border-radius: 6px;
12
+ border: none;
13
+ padding: 0;
14
+ margin: 0;
15
+ -webkit-transition: box-shadow 0.25s ease;
16
+ -moz-transition: box-shadow 0.25s ease;
17
+ -ms-transition: box-shadow 0.25s ease;
18
+ transition: box-shadow 0.25s ease;
19
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
20
+ -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
21
+ -ms-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
22
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
23
+ overflow: hidden; }
24
+ .lsow-posts-carousel .lsow-posts-carousel-item .type-post:hover {
25
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
26
+ -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
27
+ -ms-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
28
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
29
+ .lsow-posts-carousel .lsow-posts-carousel-item .lsow-project-image img {
30
+ -webkit-transition: all 0.25s ease-in-out 0s;
31
+ -moz-transition: all 0.25s ease-in-out 0s;
32
+ -ms-transition: all 0.25s ease-in-out 0s;
33
+ transition: all 0.25s ease-in-out 0s;
34
+ max-width: 100%; }
35
+ .lsow-posts-carousel .lsow-posts-carousel-item .lsow-entry-text-wrap {
36
+ text-align: center;
37
+ max-width: 650px;
38
+ margin: 0 auto;
39
+ padding: 25px 15px; }
40
+ .lsow-posts-carousel .lsow-posts-carousel-item .lsow-entry-text-wrap .entry-title {
41
+ font-size: 18px;
42
+ line-height: 26px;
43
+ letter-spacing: 1px;
44
+ font-weight: bold;
45
+ color: #333;
46
+ text-transform: uppercase;
47
+ clear: none;
48
+ margin-top: 0;
49
+ margin-bottom: 10px;
50
+ font-size: 16px;
51
+ line-height: 24px;
52
+ margin-bottom: 5px; }
53
+ .lsow-posts-carousel .lsow-posts-carousel-item .lsow-entry-text-wrap .entry-title:after, .lsow-posts-carousel .lsow-posts-carousel-item .lsow-entry-text-wrap .entry-title:before {
54
+ display: none; }
55
+ .lsow-posts-carousel .lsow-posts-carousel-item .lsow-entry-text-wrap .entry-title a {
56
+ color: #333333;
57
+ -webkit-transition: all 0.4s ease-in-out 0s;
58
+ -moz-transition: all 0.4s ease-in-out 0s;
59
+ -ms-transition: all 0.4s ease-in-out 0s;
60
+ transition: all 0.4s ease-in-out 0s; }
61
+ .lsow-posts-carousel .lsow-posts-carousel-item .lsow-entry-text-wrap .entry-title a:hover {
62
+ color: #888; }
63
+ .lsow-posts-carousel .lsow-posts-carousel-item .lsow-entry-text-wrap .entry-summary {
64
+ padding: 0;
65
+ margin: 0 auto; }
66
+ .lsow-posts-carousel .lsow-posts-carousel-item .lsow-entry-text-wrap .lsow-category-list {
67
+ -webkit-transition: all 0.4s ease-in-out 0s;
68
+ -moz-transition: all 0.4s ease-in-out 0s;
69
+ -ms-transition: all 0.4s ease-in-out 0s;
70
+ transition: all 0.4s ease-in-out 0s; }
71
+ .lsow-posts-carousel .lsow-posts-carousel-item .lsow-entry-text-wrap .lsow-category-list:after {
72
+ width: 35px;
73
+ height: 1px;
74
+ background: #aaa;
75
+ display: block;
76
+ content: ""; }
77
+ .lsow-posts-carousel .lsow-posts-carousel-item .lsow-entry-text-wrap .lsow-category-list:after {
78
+ text-align: center;
79
+ margin: 10px auto 10px; }
80
+ .lsow-posts-carousel .lsow-posts-carousel-item .lsow-entry-text-wrap .lsow-category-list a {
81
+ font-style: italic;
82
+ -webkit-transition: all 0.4s ease-in-out 0s;
83
+ -moz-transition: all 0.4s ease-in-out 0s;
84
+ -ms-transition: all 0.4s ease-in-out 0s;
85
+ transition: all 0.4s ease-in-out 0s; }
86
+
87
+ /*# sourceMappingURL=style.css.map */
includes/widgets/lsow-posts-carousel-widget/css/style.css.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "mappings": "AAGE,IAAK;EACH,UAAU,EAAE,UAAU;;AAItB,sBAEU;EACR,UAAU,EAAE,OAAO;;ACTzB,oBAAqB;EACnB,SAAS,EAAE,gBAAgB;EAEzB,yDAAW;IACT,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,GAAG;IAClB,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;ICmBb,kBAAoB,EDlBc,qBAAsB;ICmBxD,eAAiB,EDnBiB,qBAAsB;ICoBxD,cAAgB,EDpBkB,qBAAsB;ICqBxD,UAAY,EDrBsB,qBAAsB;ICkBxD,kBAAoB,EDjBc,4BAA6B;ICkB/D,eAAiB,EDlBiB,4BAA6B;ICmB/D,cAAgB,EDnBkB,4BAA6B;ICoB/D,UAAY,EDpBsB,4BAA6B;IAC3D,QAAQ,EAAE,MAAM;IAChB,+DAAQ;MCeZ,kBAAoB,EDdgB,4BAA6B;MCejE,eAAiB,EDfmB,4BAA6B;MCgBjE,cAAgB,EDhBoB,4BAA6B;MCiBjE,UAAY,EDjBwB,4BAA6B;EAG/D,sEAAwB;ICW1B,kBAAoB,EAwEU,wBAA+B;IAvE7D,eAAiB,EAuEa,wBAA+B;IAtE7D,cAAgB,EAsEc,wBAA+B;IArE7D,UAAY,EAqEkB,wBAA+B;IDjFzD,SAAS,EAAE,IAAI;EAEjB,oEAAsB;IACpB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,SAAS;IAClB,iFAAa;MC+EjB,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MACjB,cAAc,EAAE,GAAG;MACnB,WAAW,EAAE,IAAI;MACjB,KAAK,EAAE,IAAI;MACX,cAAc,EAAE,SAAS;MACzB,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,CAAC;MACb,aAAa,EAAE,IAAI;MDrFb,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MACjB,aAAa,EAAE,GAAG;MAClB,iLAAkB;QAChB,OAAO,EAAE,IAAI;MAEf,mFAAE;QACA,KAAK,EAAE,OAAO;QCPtB,kBAAoB,EAwEU,uBAA+B;QAvE7D,eAAiB,EAuEa,uBAA+B;QAtE7D,cAAgB,EAsEc,uBAA+B;QArE7D,UAAY,EAqEkB,uBAA+B;QD/DrD,yFAAQ;UACN,KAAK,EAAE,IAAI;IAIjB,mFAAe;MACb,OAAO,EAAE,CAAC;MACV,MAAM,EAAE,MAAM;IAEhB,wFAAoB;MClBxB,kBAAoB,EAwEU,uBAA+B;MAvE7D,eAAiB,EAuEa,uBAA+B;MAtE7D,cAAgB,EAsEc,uBAA+B;MArE7D,UAAY,EAqEkB,uBAA+B;MAvB7D,8FAAQ;QACN,KAAK,EAAE,IAAW;QAClB,MAAM,EAAE,GAAY;QACpB,UAAU,EDhCsB,IAAI;QCiCpC,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,EAAE;MDhCP,8FAAQ;QACN,UAAU,EAAE,MAAM;QAClB,MAAM,EAAE,cAAc;IAG1B,0FAAsB;MACpB,UAAU,EAAE,MAAM;MC5BxB,kBAAoB,EAwEU,uBAA+B;MAvE7D,eAAiB,EAuEa,uBAA+B;MAtE7D,cAAgB,EAsEc,uBAA+B;MArE7D,UAAY,EAqEkB,uBAA+B",
4
+ "sources": ["../../../../../../bower_components/neat/app/assets/stylesheets/grid/_box-sizing.scss","style.scss","../../../../assets/css/_lsow-lib.scss"],
5
+ "names": [],
6
+ "file": "style.css"
7
+ }
includes/widgets/lsow-posts-carousel-widget/css/style.scss ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../../../../assets/css/lsow-lib";
2
+
3
+ .lsow-posts-carousel {
4
+ max-width: 960px !important;
5
+ .lsow-posts-carousel-item {
6
+ .type-post {
7
+ background: #fff;
8
+ border-radius: 6px;
9
+ border: none;
10
+ padding: 0;
11
+ margin: 0;
12
+ @include vendorize(transition, box-shadow 0.25s ease);
13
+ @include vendorize(box-shadow, 0 1px 3px rgba(0, 0, 0, 0.1));
14
+ overflow: hidden;
15
+ &:hover {
16
+ @include vendorize(box-shadow, 0 1px 3px rgba(0, 0, 0, 0.2));
17
+ }
18
+ }
19
+ .lsow-project-image img {
20
+ @include lsow-transition(all, 0.25s);
21
+ max-width: 100%;
22
+ }
23
+ .lsow-entry-text-wrap {
24
+ text-align: center;
25
+ max-width: 650px;
26
+ margin: 0 auto;
27
+ padding: 25px 15px;
28
+ .entry-title {
29
+ @include lsow-heading-style();
30
+ font-size: 16px;
31
+ line-height: 24px;
32
+ margin-bottom: 5px;
33
+ &:after, &:before {
34
+ display: none;
35
+ }
36
+ a {
37
+ color: #333333;
38
+ @include lsow-transition();
39
+ &:hover {
40
+ color: #888;
41
+ }
42
+ }
43
+ }
44
+ .entry-summary {
45
+ padding: 0;
46
+ margin: 0 auto;
47
+ }
48
+ .lsow-category-list {
49
+
50
+ @include bottom-line(35, 1, #aaa);
51
+ @include lsow-transition();
52
+ &:after {
53
+ text-align: center;
54
+ margin: 10px auto 10px;
55
+ }
56
+ }
57
+ .lsow-category-list a {
58
+ font-style: italic;
59
+ @include lsow-transition();
60
+ }
61
+ }
62
+ }
63
+ }
includes/widgets/lsow-posts-carousel-widget/lsow-posts-carousel-widget.php ADDED
@@ -0,0 +1,279 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Widget Name: Livemesh Posts Carousel
5
+ Description: Display blog posts or custom post types as a carousel.
6
+ Author: LiveMesh
7
+ Author URI: http://portfoliotheme.org
8
+ */
9
+
10
+ class LSOW_Posts_Carousel_Widget extends SiteOrigin_Widget {
11
+
12
+ function __construct() {
13
+ parent::__construct(
14
+ 'lsow-posts-carousel',
15
+ __('Livemesh Posts Carousel', 'livemesh-so-widgets'),
16
+ array(
17
+ 'description' => __('Display blog posts or custom post types as a carousel', 'livemesh-so-widgets'),
18
+ 'panels_icon' => 'dashicons dashicons-minus',
19
+ 'help' => 'http://portfoliotheme.org/widgets-bundle/posts-carousel-widget-documentation/'
20
+ ),
21
+ array(),
22
+ array(
23
+ 'title' => array(
24
+ 'type' => 'text',
25
+ 'label' => __('Title', 'livemesh-so-widgets'),
26
+ ),
27
+
28
+ 'posts' => array(
29
+ 'type' => 'posts',
30
+ 'label' => __('Posts query', 'livemesh-so-widgets'),
31
+ ),
32
+
33
+ 'settings' => array(
34
+ 'type' => 'section',
35
+ 'label' => __('General Settings', 'livemesh-so-widgets'),
36
+ 'fields' => array(
37
+
38
+ 'display_title' => array(
39
+ 'type' => 'checkbox',
40
+ 'label' => __('Display posts title below the post item?', 'livemesh-so-widgets'),
41
+ 'default' => true
42
+ ),
43
+
44
+ 'display_summary' => array(
45
+ 'type' => 'checkbox',
46
+ 'label' => __('Display post excerpt/summary below the post item?', 'livemesh-so-widgets'),
47
+ 'default' => true
48
+ ),
49
+
50
+ 'image_linkable' => array(
51
+ 'type' => 'checkbox',
52
+ 'label' => __('Link Images to Posts?', 'livemesh-so-widgets'),
53
+ 'default' => true
54
+ ),
55
+ )
56
+ ),
57
+
58
+ 'carousel_settings' => array(
59
+ 'type' => 'section',
60
+ 'label' => __('Carousel Settings', 'livemesh-so-widgets'),
61
+ 'fields' => array(
62
+
63
+ 'arrows' => array(
64
+ 'type' => 'checkbox',
65
+ 'label' => __('Prev/Next Arrows?', 'livemesh-so-widgets'),
66
+ 'default' => true
67
+ ),
68
+
69
+ 'dots' => array(
70
+ 'type' => 'checkbox',
71
+ 'label' => __('Show dot indicators for navigation?', 'livemesh-so-widgets'),
72
+ ),
73
+
74
+ 'autoplay' => array(
75
+ 'type' => 'checkbox',
76
+ 'label' => __('Autoplay?', 'livemesh-so-widgets'),
77
+ 'description' => __('Should the carousel autoplay as in a slideshow.', 'livemesh-so-widgets'),
78
+ 'default' => false
79
+ ),
80
+
81
+
82
+ 'autoplay_speed' => array(
83
+ 'type' => 'number',
84
+ 'label' => __('Autoplay speed in ms', 'livemesh-so-widgets'),
85
+ 'default' => 3000
86
+ ),
87
+
88
+
89
+ 'animation_speed' => array(
90
+ 'type' => 'number',
91
+ 'label' => __('Autoplay animation speed in ms', 'livemesh-so-widgets'),
92
+ 'default' => 300
93
+ ),
94
+
95
+ 'pause_on_hover' => array(
96
+ 'type' => 'checkbox',
97
+ 'label' => __('Pause on mouse hover?', 'livemesh-so-widgets'),
98
+ 'default' => true
99
+ ),
100
+
101
+ 'display_columns' => array(
102
+ 'type' => 'slider',
103
+ 'label' => __('Columns per row', 'livemesh-so-widgets'),
104
+ 'min' => 1,
105
+ 'max' => 5,
106
+ 'integer' => true,
107
+ 'default' => 3
108
+ ),
109
+
110
+ 'scroll_columns' => array(
111
+ 'type' => 'slider',
112
+ 'label' => __('Columns to scroll', 'livemesh-so-widgets'),
113
+ 'min' => 1,
114
+ 'max' => 5,
115
+ 'integer' => true,
116
+ 'default' => 3
117
+ ),
118
+
119
+ 'gutter' => array(
120
+ 'type' => 'number',
121
+ 'label' => __('Gutter', 'livemesh-so-widgets'),
122
+ 'description' => __('Space between columns.', 'livemesh-so-widgets'),
123
+ 'default' => 10
124
+ ),
125
+
126
+ 'responsive' => array(
127
+ 'type' => 'section',
128
+ 'label' => __('Responsive', 'livemesh-so-widgets'),
129
+ 'hide' => true,
130
+ 'fields' => array(
131
+ 'tablet' => array(
132
+ 'type' => 'section',
133
+ 'label' => __('Tablet', 'livemesh-so-widgets'),
134
+ 'fields' => array(
135
+ 'display_columns' => array(
136
+ 'type' => 'slider',
137
+ 'label' => __('Columns per row', 'livemesh-so-widgets'),
138
+ 'min' => 1,
139
+ 'max' => 5,
140
+ 'integer' => true,
141
+ 'default' => 2
142
+ ),
143
+ 'scroll_columns' => array(
144
+ 'type' => 'slider',
145
+ 'label' => __('Columns to scroll', 'livemesh-so-widgets'),
146
+ 'min' => 1,
147
+ 'max' => 5,
148
+ 'integer' => true,
149
+ 'default' => 2
150
+ ),
151
+ 'gutter' => array(
152
+ 'type' => 'number',
153
+ 'label' => __('Gutter', 'livemesh-so-widgets'),
154
+ 'description' => __('Space between columns.', 'livemesh-so-widgets'),
155
+ 'default' => 10
156
+ ),
157
+ 'width' => array(
158
+ 'type' => 'text',
159
+ 'label' => __('Resolution', 'livemesh-so-widgets'),
160
+ 'description' => __('The resolution to treat as a tablet resolution.', 'livemesh-so-widgets'),
161
+ 'default' => 800,
162
+ 'sanitize' => 'intval',
163
+ )
164
+ )
165
+ ),
166
+ 'mobile' => array(
167
+ 'type' => 'section',
168
+ 'label' => __('Mobile Phone', 'livemesh-so-widgets'),
169
+ 'fields' => array(
170
+ 'display_columns' => array(
171
+ 'type' => 'slider',
172
+ 'label' => __('Columns per row', 'livemesh-so-widgets'),
173
+ 'min' => 1,
174
+ 'max' => 5,
175
+ 'integer' => true,
176
+ 'default' => 1
177
+ ),
178
+ 'scroll_columns' => array(
179
+ 'type' => 'slider',
180
+ 'label' => __('Columns to scroll', 'livemesh-so-widgets'),
181
+ 'min' => 1,
182
+ 'max' => 5,
183
+ 'integer' => true,
184
+ 'default' => 1
185
+ ),
186
+ 'gutter' => array(
187
+ 'type' => 'number',
188
+ 'label' => __('Gutter', 'livemesh-so-widgets'),
189
+ 'description' => __('Space between columns.', 'livemesh-so-widgets'),
190
+ 'default' => 10
191
+ ),
192
+ 'width' => array(
193
+ 'type' => 'text',
194
+ 'label' => __('Resolution', 'livemesh-so-widgets'),
195
+ 'description' => __('The resolution to treat as a mobile resolution.', 'livemesh-so-widgets'),
196
+ 'default' => 480,
197
+ 'sanitize' => 'intval',
198
+ )
199
+ )
200
+ )
201
+
202
+ )
203
+ ),
204
+ )
205
+ ),
206
+ )
207
+ );
208
+ }
209
+
210
+ function initialize() {
211
+
212
+ $this->register_frontend_scripts(
213
+ array(
214
+ array(
215
+ 'lsow-slick-carousel',
216
+ LSOW_PLUGIN_URL . 'assets/js/slick' . SOW_BUNDLE_JS_SUFFIX . '.js',
217
+ array('jquery'),
218
+ LSOW_VERSION
219
+ ),
220
+ )
221
+ );
222
+
223
+ $this->register_frontend_styles(
224
+ array(
225
+ array(
226
+ 'lsow-slick',
227
+ LSOW_PLUGIN_URL . 'assets/css/slick.css',
228
+ array(),
229
+ LSOW_VERSION
230
+ ),
231
+ )
232
+ );
233
+
234
+ $this->register_frontend_styles(array(
235
+ array(
236
+ 'lsow-posts-carousel',
237
+ plugin_dir_url(__FILE__) . 'css/style.css'
238
+ )
239
+ )
240
+ );
241
+
242
+ }
243
+
244
+ function get_less_variables($instance) {
245
+ return array(
246
+
247
+ 'gutter' => intval($instance['carousel_settings']['gutter']) . 'px',
248
+
249
+ // All the responsive sizes
250
+ 'tablet_width' => intval($instance['carousel_settings']['responsive']['tablet']['width']) . 'px',
251
+ 'tablet_gutter' => intval($instance['carousel_settings']['responsive']['tablet']['gutter']) . 'px',
252
+ 'mobile_width' => intval($instance['carousel_settings']['responsive']['mobile']['width']) . 'px',
253
+ 'mobile_gutter' => intval($instance['carousel_settings']['responsive']['mobile']['gutter']) . 'px',
254
+ );
255
+ }
256
+
257
+ function get_template_variables($instance, $args) {
258
+
259
+ $return = array(
260
+ 'posts' => $instance['posts'],
261
+ 'settings' => $instance['settings'],
262
+ 'carousel_settings' => $instance['carousel_settings']
263
+ );
264
+
265
+ unset($return['carousel_settings']['responsive']);
266
+
267
+ $return['carousel_settings']['tablet_width'] = $instance['carousel_settings']['responsive']['tablet']['width'];
268
+ $return['carousel_settings']['tablet_display_columns'] = $instance['carousel_settings']['responsive']['tablet']['display_columns'];
269
+ $return['carousel_settings']['tablet_scroll_columns'] = $instance['carousel_settings']['responsive']['tablet']['scroll_columns'];
270
+ $return['carousel_settings']['mobile_width'] = $instance['carousel_settings']['responsive']['mobile']['width'];
271
+ $return['carousel_settings']['mobile_display_columns'] = intval($instance['carousel_settings']['responsive']['mobile']['display_columns']);
272
+ $return['carousel_settings']['mobile_scroll_columns'] = $instance['carousel_settings']['responsive']['mobile']['scroll_columns'];
273
+
274
+ return $return;
275
+ }
276
+
277
+ }
278
+
279
+ siteorigin_widget_register('lsow-posts-carousel', __FILE__, 'LSOW_Posts_Carousel_Widget');
includes/widgets/lsow-posts-carousel-widget/styles/default.less ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../../../../../so-widgets-bundle/base/less/mixins";
2
+
3
+ @gutter: 20px;
4
+ @tablet_width: 800px;
5
+ @tablet_gutter: 10px;
6
+ @mobile_width: 480px;
7
+ @mobile_gutter: 10px;
8
+
9
+
10
+ .lsow-posts-carousel {
11
+
12
+ .lsow-posts-carousel-item {
13
+ padding: @gutter;
14
+
15
+ @media screen and (max-width: @tablet_width) {
16
+ padding: @tablet_gutter;
17
+ }
18
+
19
+ @media screen and (max-width: @mobile_width) {
20
+ padding: @mobile_gutter;
21
+ }
22
+ }
23
+ }
includes/widgets/lsow-posts-carousel-widget/tpl/default.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var $carousel_settings
4
+ * @var $settings
5
+ * @var $posts
6
+ */
7
+
8
+ $query_args = siteorigin_widget_post_selector_process_query($posts);
9
+
10
+ // Use the processed post selector query to find posts.
11
+ $loop = new WP_Query($query_args);
12
+
13
+ // Loop through the posts and do something with them.
14
+ if ($loop->have_posts()) : ?>
15
+
16
+ <div class="lsow-posts-carousel lsow-container" <?php foreach ($carousel_settings as $key => $val) : ?>
17
+ <?php if (!empty($val)) : ?>
18
+ data-<?php echo $key . '="' . esc_attr($val) . '"' ?>
19
+ <?php endif ?>
20
+ <?php endforeach; ?>>
21
+
22
+ <?php while ($loop->have_posts()) : $loop->the_post(); ?>
23
+
24
+ <div data-id="id-<?php the_ID(); ?>" class="lsow-posts-carousel-item">
25
+
26
+ <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
27
+
28
+ <?php if ($thumbnail_exists = has_post_thumbnail()): ?>
29
+
30
+ <div class="lsow-project-image">
31
+
32
+ <?php if ($settings['image_linkable']): ?>
33
+
34
+ <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('large'); ?> </a>
35
+
36
+ <?php else: ?>
37
+
38
+ <?php the_post_thumbnail('large'); ?>
39
+
40
+ <?php endif; ?>
41
+
42
+ </div>
43
+
44
+ <?php endif; ?>
45
+
46
+ <?php if ($settings['display_title'] || $settings['display_summary']) : ?>
47
+
48
+ <div class="lsow-entry-text-wrap <?php echo($thumbnail_exists ? '' : ' nothumbnail'); ?>">
49
+
50
+ <?php if ($settings['display_title']) : ?>
51
+
52
+ <?php the_title('<h3 class="entry-title"><a href="' . get_permalink() . '" title="' . get_the_title() . '"
53
+ rel="bookmark">', '</a></h3>'); ?>
54
+
55
+ <?php endif; ?>
56
+
57
+ <?php if (get_post_type() == 'post')
58
+ echo lsow_entry_terms_list('category');
59
+ ?>
60
+
61
+ <?php if ($settings['display_summary']) : ?>
62
+
63
+ <div class="entry-summary">
64
+
65
+ <?php echo get_the_excerpt(); ?>
66
+
67
+ </div>
68
+
69
+ <?php endif; ?>
70
+
71
+ </div>
72
+
73
+ <?php endif; ?>
74
+
75
+ </article>
76
+ <!-- .hentry -->
77
+
78
+ </div><!--.lsow-posts-carousel-item -->
79
+
80
+ <?php endwhile; ?>
81
+
82
+ <?php wp_reset_postdata(); ?>
83
+
84
+ </div> <!-- .lsow-posts-carousel -->
85
+
86
+ <?php endif; ?>
includes/widgets/lsow-pricing-table-widget/assets/banner.svg ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="128px" height="128px" viewBox="0 0 128 128" style="enable-background:new 0 0 128 128;" xml:space="preserve">
6
+ <g>
7
+ <circle style="fill:#C2D5D8;" cx="64" cy="64" r="64"/>
8
+ <path style="fill:#B7C9CC;" d="M124.789,84.02c-0.037-0.095-0.071-0.188-0.113-0.279c-0.067-0.172-0.131-0.346-0.207-0.512
9
+ c-0.067-0.172-0.131-0.347-0.207-0.513c-0.067-0.171-0.131-0.346-0.207-0.512c-0.067-0.171-0.131-0.347-0.207-0.513
10
+ c-0.067-0.17-0.131-0.346-0.206-0.512c-0.068-0.171-0.132-0.346-0.207-0.512c-0.068-0.171-0.132-0.346-0.207-0.512
11
+ c-0.068-0.172-0.131-0.346-0.207-0.512c-0.066-0.168-0.127-0.34-0.202-0.504c-0.069-0.174-0.133-0.352-0.211-0.521
12
+ c-0.067-0.171-0.131-0.347-0.207-0.513c-0.067-0.17-0.131-0.346-0.207-0.512c-0.067-0.171-0.131-0.346-0.207-0.512
13
+ c-0.067-0.171-0.131-0.346-0.207-0.512c-0.067-0.172-0.131-0.346-0.207-0.512c-0.066-0.172-0.131-0.347-0.207-0.513
14
+ c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.131-0.347-0.207-0.513c-0.066-0.17-0.13-0.344-0.206-0.51
15
+ c-0.067-0.173-0.131-0.348-0.208-0.515c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.131-0.347-0.207-0.513
16
+ c-0.066-0.17-0.131-0.346-0.206-0.512c-0.067-0.169-0.128-0.341-0.203-0.505c-0.069-0.174-0.132-0.351-0.21-0.521
17
+ c-0.068-0.17-0.131-0.346-0.207-0.512c-0.068-0.171-0.131-0.346-0.207-0.512c-0.068-0.171-0.131-0.346-0.207-0.512
18
+ c-0.067-0.172-0.13-0.346-0.206-0.512c-0.068-0.172-0.131-0.347-0.208-0.514c-0.068-0.171-0.131-0.346-0.207-0.512
19
+ c-0.068-0.171-0.131-0.346-0.207-0.512c-0.068-0.172-0.131-0.346-0.207-0.512c-0.068-0.172-0.131-0.347-0.207-0.513
20
+ c-0.068-0.171-0.131-0.346-0.207-0.512c-0.068-0.171-0.131-0.347-0.207-0.513c-0.068-0.17-0.131-0.346-0.207-0.512
21
+ c-0.068-0.171-0.131-0.346-0.207-0.512c-0.066-0.168-0.127-0.34-0.202-0.503c-0.068-0.174-0.133-0.352-0.211-0.521
22
+ c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.131-0.346-0.207-0.512
23
+ c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.131-0.346-0.207-0.512
24
+ c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.13-0.345-0.206-0.511c-0.067-0.172-0.131-0.347-0.208-0.514
25
+ c-0.066-0.171-0.131-0.346-0.206-0.512c-0.067-0.171-0.132-0.346-0.207-0.512c-0.067-0.171-0.132-0.346-0.207-0.512
26
+ c-0.067-0.171-0.132-0.346-0.207-0.512c-0.067-0.171-0.132-0.346-0.207-0.512c-0.067-0.169-0.128-0.341-0.203-0.505
27
+ c-0.069-0.174-0.132-0.351-0.21-0.52c-0.068-0.171-0.131-0.346-0.207-0.512c-0.067-0.171-0.13-0.345-0.206-0.511
28
+ c-0.068-0.172-0.131-0.347-0.208-0.514c-0.068-0.171-0.131-0.346-0.207-0.512c-0.068-0.171-0.131-0.346-0.207-0.512
29
+ c-0.068-0.171-0.131-0.346-0.207-0.512c-0.068-0.171-0.131-0.346-0.207-0.512c-0.068-0.171-0.131-0.346-0.207-0.512
30
+ c-0.068-0.171-0.131-0.346-0.207-0.512c-0.068-0.171-0.131-0.346-0.207-0.512c-0.068-0.171-0.131-0.346-0.207-0.512
31
+ c-0.067-0.171-0.13-0.345-0.206-0.511c-0.068-0.172-0.131-0.347-0.208-0.514c-0.065-0.168-0.128-0.341-0.203-0.505
32
+ c-0.067-0.174-0.133-0.351-0.21-0.52c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.131-0.346-0.207-0.512
33
+ c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.131-0.346-0.207-0.512
34
+ c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.13-0.345-0.206-0.511c-0.067-0.172-0.131-0.347-0.208-0.514
35
+ c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.131-0.346-0.206-0.512c-0.067-0.171-0.132-0.346-0.207-0.512
36
+ c-0.067-0.171-0.132-0.346-0.207-0.512c-0.067-0.171-0.132-0.346-0.207-0.512c-0.067-0.168-0.128-0.341-0.203-0.505
37
+ c-0.069-0.174-0.132-0.351-0.21-0.52c-0.068-0.171-0.131-0.346-0.207-0.512c-0.068-0.171-0.131-0.346-0.207-0.512
38
+ c-0.067-0.171-0.13-0.345-0.206-0.511c-0.068-0.172-0.131-0.347-0.208-0.514c-0.068-0.171-0.131-0.346-0.207-0.512
39
+ c-0.068-0.171-0.131-0.346-0.207-0.512c-0.068-0.171-0.131-0.346-0.207-0.512c-0.068-0.171-0.131-0.346-0.207-0.512
40
+ c-0.068-0.171-0.131-0.346-0.207-0.512c-0.068-0.171-0.131-0.346-0.207-0.512c-0.068-0.171-0.131-0.346-0.207-0.512
41
+ c-0.068-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.13-0.345-0.206-0.511c-0.066-0.169-0.129-0.342-0.204-0.507
42
+ c-0.067-0.174-0.133-0.351-0.21-0.52c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.131-0.346-0.207-0.512
43
+ c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.131-0.346-0.207-0.512c-0.066-0.171-0.131-0.346-0.207-0.512
44
+ c-0.478-1.199-1.138-2.285-2.051-3.198c-2.121-2.121-5.141-2.945-8.469-3.038L62.503,22c0,0-38.892,38.892-50.911,50.912
45
+ c-1.502,1.502-1.919,2.652-1.294,3.947c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.512
46
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.513c0.046,0.168,0.124,0.34,0.207,0.512
47
+ c0.045,0.167,0.123,0.337,0.206,0.509c0.045,0.17,0.123,0.342,0.207,0.516c0.045,0.168,0.124,0.341,0.207,0.513
48
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.341,0.207,0.513c0.046,0.168,0.124,0.34,0.207,0.512
49
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.512
50
+ c0.046,0.168,0.124,0.341,0.207,0.513c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.341,0.207,0.513
51
+ c0.045,0.168,0.124,0.34,0.207,0.513c0.046,0.168,0.123,0.34,0.207,0.512c0.046,0.168,0.123,0.34,0.206,0.513
52
+ c0.046,0.166,0.123,0.338,0.205,0.508c0.046,0.17,0.124,0.343,0.208,0.517c0.046,0.168,0.124,0.34,0.207,0.512
53
+ c0.046,0.168,0.124,0.341,0.207,0.513c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.512
54
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.342,0.207,0.514
55
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.513
56
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.513c0.046,0.168,0.124,0.34,0.207,0.512
57
+ c0.045,0.166,0.123,0.338,0.206,0.509c0.045,0.169,0.123,0.342,0.207,0.516c0.046,0.168,0.124,0.341,0.207,0.513
58
+ c0.045,0.168,0.124,0.34,0.207,0.513c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.513
59
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.512
60
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.341,0.207,0.513c0.046,0.168,0.124,0.34,0.207,0.512
61
+ c0.046,0.168,0.124,0.341,0.207,0.513c0.045,0.168,0.124,0.34,0.206,0.513c0.047,0.168,0.124,0.34,0.207,0.512
62
+ c0.046,0.167,0.123,0.337,0.205,0.509c0.046,0.17,0.124,0.342,0.208,0.516c0.046,0.168,0.124,0.341,0.207,0.513
63
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.341,0.207,0.513c0.046,0.168,0.124,0.34,0.207,0.512
64
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.342,0.207,0.514
65
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.512
66
+ c0.046,0.168,0.124,0.34,0.207,0.513c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.513
67
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.045,0.166,0.123,0.337,0.206,0.508c0.045,0.169,0.123,0.343,0.207,0.518
68
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.512
69
+ c0.046,0.168,0.124,0.34,0.207,0.512c0.046,0.168,0.124,0.34,0.207,0.513c0.046,0.168,0.124,0.34,0.207,0.512
70
+ c0.046,0.168,0.124,0.34,0.207,0.513c0.011,0.039,0.034,0.082,0.049,0.121C36.52,123.314,49.712,128,64,128
71
+ C92.352,128,116.383,109.557,124.789,84.02z"/>
72
+ <path style="fill:#E6E6E6;" d="M103.725,34.712c-0.093-3.328-0.916-6.348-3.037-8.47c-2.121-2.121-5.142-2.945-8.47-3.038
73
+ L62.503,22c0,0-38.892,38.892-50.911,50.912c-2.122,2.122-2.122,3.535,0,5.656c4.242,4.244,18.385,18.386,18.385,18.386
74
+ s13.436,13.435,18.386,18.385c2.121,2.121,3.535,2.121,5.656,0c12.021-12.021,50.911-50.911,50.911-50.911L103.725,34.712z
75
+ M81.595,45.334c-2.346-2.346-2.342-6.144,0.002-8.487c2.348-2.346,6.139-2.344,8.483,0.002c2.345,2.345,2.349,6.137,0.002,8.483
76
+ C87.738,47.676,83.94,47.68,81.595,45.334z"/>
77
+ <path style="fill:#E16B5A;" d="M51.189,113.874c-0.203-0.153-0.546-0.495-0.707-0.657l-36.771-36.77
78
+ c-0.162-0.162-0.504-0.504-0.657-0.707c0.153-0.203,0.495-0.545,0.657-0.707l49.982-49.982l28.4,1.151
79
+ c2.986,0.084,5.099,0.791,6.47,2.162c1.369,1.371,2.076,3.475,2.159,6.432l1.153,28.438l-49.982,49.982
80
+ C51.734,113.379,51.393,113.721,51.189,113.874z M85.837,32.095c-2.405,0-4.665,0.936-6.361,2.631
81
+ c-1.697,1.698-2.633,3.958-2.634,6.365c0,2.407,0.936,4.667,2.632,6.365c1.697,1.698,3.957,2.632,6.363,2.632
82
+ c2.407,0,4.668-0.936,6.366-2.634c3.508-3.508,3.507-9.217-0.002-12.726C90.504,33.03,88.243,32.095,85.837,32.095z"/>
83
+ <path style="fill:#D15C50;" d="M81.371,83.743c-0.006-0.011-0.007-0.021-0.013-0.031c-0.044-0.18-0.114-0.353-0.208-0.517
84
+ c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.179-0.113-0.35-0.207-0.513c-0.044-0.178-0.113-0.351-0.207-0.513
85
+ c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.179-0.114-0.351-0.207-0.513c-0.044-0.178-0.114-0.349-0.207-0.512
86
+ c-0.044-0.179-0.114-0.351-0.207-0.513c-0.044-0.178-0.114-0.348-0.207-0.512c-0.044-0.178-0.114-0.35-0.207-0.512
87
+ c-0.044-0.178-0.114-0.349-0.207-0.512c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.179-0.113-0.35-0.207-0.512
88
+ c-0.044-0.179-0.113-0.351-0.207-0.514c-0.044-0.176-0.113-0.346-0.205-0.508c-0.044-0.18-0.114-0.354-0.208-0.518
89
+ c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.178-0.114-0.35-0.207-0.512
90
+ c-0.044-0.179-0.114-0.35-0.207-0.513c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.179-0.114-0.349-0.207-0.513
91
+ c-0.044-0.178-0.112-0.349-0.207-0.512c-0.044-0.178-0.112-0.35-0.207-0.513c-0.044-0.178-0.113-0.349-0.207-0.512
92
+ c-0.044-0.179-0.113-0.351-0.207-0.513c-0.044-0.178-0.113-0.349-0.207-0.512c-0.044-0.178-0.113-0.35-0.207-0.512
93
+ c-0.044-0.178-0.113-0.35-0.206-0.512c-0.045-0.176-0.112-0.346-0.205-0.508c-0.044-0.181-0.114-0.354-0.208-0.518
94
+ c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.179-0.113-0.35-0.207-0.513
95
+ c-0.044-0.178-0.113-0.35-0.207-0.513c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.178-0.114-0.351-0.207-0.512
96
+ c-0.044-0.179-0.114-0.35-0.207-0.513c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.178-0.114-0.349-0.207-0.512
97
+ c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.178-0.114-0.349-0.207-0.512c-0.044-0.178-0.114-0.35-0.207-0.512
98
+ c-0.044-0.178-0.113-0.349-0.207-0.511c-0.044-0.177-0.112-0.348-0.205-0.509c-0.044-0.18-0.114-0.353-0.208-0.517
99
+ c-0.044-0.178-0.114-0.349-0.207-0.512c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.178-0.114-0.349-0.207-0.512
100
+ c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.178-0.114-0.349-0.207-0.512c-0.085-0.341-0.254-0.667-0.521-0.934
101
+ c-0.781-0.781-2.048-0.781-2.828,0l-2.286,2.285c-3.475-2.185-8.127-1.772-11.149,1.25c-3.318,3.319-3.057,6.693-1.867,9.494
102
+ c0.063,0.173,0.136,0.343,0.207,0.512c0.063,0.173,0.136,0.343,0.207,0.512c0.063,0.174,0.136,0.344,0.206,0.512
103
+ c0.064,0.174,0.137,0.344,0.207,0.513c0.064,0.173,0.137,0.343,0.207,0.512c0.063,0.169,0.133,0.334,0.202,0.5
104
+ c0.065,0.177,0.138,0.351,0.21,0.522c0.065,0.175,0.137,0.346,0.208,0.516c0.064,0.173,0.137,0.343,0.207,0.512
105
+ c0.064,0.174,0.137,0.344,0.207,0.512c0.064,0.174,0.136,0.344,0.207,0.513c0.064,0.173,0.136,0.343,0.207,0.512
106
+ c0.064,0.173,0.136,0.343,0.207,0.513c0.064,0.172,0.136,0.342,0.207,0.512c0.064,0.173,0.136,0.343,0.207,0.512
107
+ c0.051,0.136,0.106,0.27,0.161,0.402c-0.2,0.822-0.7,1.521-1.397,2.22c-0.682,0.682-1.517,1.11-2.393,1.315
108
+ c-0.007-0.013-0.012-0.024-0.019-0.037c-0.045-0.178-0.114-0.349-0.207-0.512c-0.045-0.178-0.114-0.35-0.207-0.512
109
+ c-0.044-0.178-0.113-0.35-0.207-0.511c-0.044-0.179-0.113-0.351-0.207-0.515c-0.044-0.178-0.114-0.35-0.207-0.512
110
+ c-0.044-0.178-0.114-0.349-0.207-0.512c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.179-0.114-0.35-0.207-0.513
111
+ c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.179-0.114-0.349-0.207-0.513c-0.044-0.178-0.114-0.35-0.207-0.512
112
+ c-0.044-0.178-0.114-0.349-0.207-0.512c-0.044-0.178-0.113-0.349-0.207-0.512c-0.044-0.178-0.112-0.348-0.205-0.51
113
+ c-0.044-0.18-0.114-0.353-0.208-0.517c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.179-0.114-0.349-0.207-0.513
114
+ c-0.044-0.178-0.114-0.35-0.207-0.512c-0.044-0.178-0.114-0.349-0.207-0.512c-0.044-0.178-0.114-0.35-0.207-0.512
115
+ c-0.085-0.342-0.254-0.667-0.521-0.934c-0.78-0.781-2.047-0.781-2.828,0c-2.702,2.701-3.313,6.705-1.852,10.006
116
+ c0.064,0.172,0.134,0.343,0.207,0.512c0.064,0.172,0.134,0.343,0.207,0.512c0.027,0.074,0.053,0.15,0.082,0.225l-2.181,2.181
117
+ c-0.653,0.653-0.753,1.643-0.313,2.407c0.045,0.178,0.114,0.349,0.207,0.512c0.044,0.178,0.114,0.35,0.207,0.512
118
+ c0.044,0.178,0.114,0.35,0.207,0.512c0.044,0.178,0.114,0.351,0.207,0.512c0.044,0.179,0.114,0.35,0.207,0.513
119
+ c0.044,0.176,0.113,0.346,0.205,0.508c0.044,0.179,0.114,0.353,0.208,0.517c0.044,0.179,0.113,0.351,0.207,0.514
120
+ c0.044,0.178,0.114,0.35,0.207,0.512c0.044,0.178,0.114,0.35,0.207,0.512c0.044,0.179,0.114,0.351,0.207,0.513
121
+ c0.044,0.178,0.114,0.349,0.207,0.512c0.044,0.179,0.114,0.351,0.207,0.513c0.044,0.178,0.114,0.348,0.207,0.512
122
+ c0.044,0.178,0.114,0.35,0.207,0.512c0.044,0.178,0.114,0.349,0.207,0.512c0.044,0.178,0.113,0.35,0.207,0.512
123
+ c0.044,0.178,0.113,0.351,0.207,0.514c0.044,0.178,0.114,0.349,0.207,0.512c0.044,0.178,0.114,0.35,0.207,0.512
124
+ c0.044,0.176,0.111,0.346,0.205,0.508c0.044,0.181,0.113,0.354,0.208,0.518c0.044,0.178,0.113,0.35,0.207,0.512
125
+ c0.044,0.178,0.113,0.35,0.207,0.512c0.044,0.179,0.113,0.35,0.207,0.513c0.044,0.178,0.113,0.35,0.207,0.512
126
+ c0.044,0.179,0.113,0.349,0.207,0.513c0.044,0.178,0.112,0.349,0.207,0.512c0.044,0.178,0.112,0.35,0.206,0.513
127
+ c0.045,0.178,0.114,0.349,0.207,0.512c0.044,0.179,0.114,0.351,0.207,0.513c0.044,0.178,0.114,0.349,0.207,0.512
128
+ c0.044,0.178,0.114,0.35,0.207,0.512c0.044,0.178,0.114,0.35,0.207,0.512c0.044,0.178,0.114,0.351,0.207,0.512
129
+ c0.044,0.177,0.113,0.347,0.205,0.509c0.044,0.18,0.114,0.353,0.208,0.517c0.044,0.178,0.113,0.35,0.207,0.512
130
+ c0.044,0.179,0.113,0.351,0.207,0.514c0.044,0.178,0.114,0.35,0.207,0.512c0.044,0.178,0.114,0.35,0.207,0.512
131
+ c0.044,0.179,0.114,0.351,0.207,0.513c0.044,0.178,0.114,0.349,0.207,0.512c0.044,0.179,0.114,0.351,0.207,0.513
132
+ c0.044,0.178,0.114,0.349,0.207,0.512c0.044,0.178,0.114,0.35,0.207,0.512c0.044,0.178,0.114,0.35,0.207,0.512
133
+ c0.044,0.178,0.113,0.35,0.207,0.512c0.044,0.179,0.113,0.351,0.207,0.514c0.044,0.178,0.114,0.349,0.207,0.512
134
+ c0.044,0.176,0.111,0.346,0.205,0.508c0.044,0.18,0.113,0.354,0.208,0.518c0.044,0.178,0.113,0.35,0.207,0.512
135
+ c0.044,0.178,0.113,0.35,0.207,0.512c0.004,0.018,0.015,0.032,0.02,0.049c0.163-0.151,0.331-0.318,0.432-0.418L81.371,83.743z"/>
136
+ <path style="fill:#E6E6E6;" d="M57.096,70.389c-2.551-3.826-2.022-5.603-0.25-7.375c1.95-1.949,5.122-1.949,7.071,0
137
+ c1.949,1.95,1.949,5.122,0,7.071c-0.78,0.781-0.78,2.047,0,2.829c0.781,0.78,2.048,0.78,2.829,0
138
+ c3.021-3.022,3.435-7.675,1.25-11.15l2.285-2.285c0.781-0.781,0.781-2.048,0-2.829c-0.781-0.781-2.048-0.781-2.828,0l-2.286,2.285
139
+ c-3.475-2.185-8.127-1.772-11.149,1.25c-4.589,4.587-2.341,9.287-0.25,12.421c2.552,3.828,2.023,5.604,0.25,7.377
140
+ c-1.948,1.949-5.12,1.949-7.07,0c-1.949-1.949-1.949-5.123,0-7.071c0.781-0.781,0.781-2.048,0-2.829
141
+ c-0.78-0.781-2.047-0.781-2.828,0c-3.022,3.021-3.436,7.674-1.25,11.148l-2.285,2.287c-0.781,0.78-0.781,2.047,0,2.828
142
+ c0.78,0.78,2.047,0.78,2.828,0l2.285-2.285c3.476,2.185,8.127,1.771,11.148-1.25C61.435,78.223,59.188,73.523,57.096,70.389z"/>
143
+ </g>
144
+ </svg>
includes/widgets/lsow-pricing-table-widget/css/style.css ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ box-sizing: border-box; }
3
+
4
+ *, *::after, *::before {
5
+ box-sizing: inherit; }
6
+
7
+ /* ---------- Pricing table --------- */
8
+ .lsow-pricing-table .lsow-pricing-plan {
9
+ float: left;
10
+ padding: 10px; }
11
+
12
+ .lsow-center {
13
+ text-align: center; }
14
+
15
+ .lsow-pricing-table {
16
+ padding: 0;
17
+ margin: 0; }
18
+ .lsow-pricing-table .lsow-top-header {
19
+ padding: 15px 0;
20
+ background-color: #494949;
21
+ border-bottom: 1px solid #2c2b2b; }
22
+ .lsow-pricing-table .lsow-top-header h3 {
23
+ font-size: 18px;
24
+ line-height: 26px;
25
+ letter-spacing: 1px;
26
+ font-weight: bold;
27
+ color: #333;
28
+ text-transform: uppercase;
29
+ clear: none;
30
+ margin-top: 0;
31
+ margin-bottom: 10px;
32
+ font-size: 20px;
33
+ line-height: 32px;
34
+ color: #fefefe;
35
+ margin: 0; }
36
+ .lsow-pricing-table .lsow-top-header img {
37
+ margin-top: 15px; }
38
+ .lsow-pricing-table .lsow-top-header .lsow-tagline {
39
+ display: block;
40
+ font-size: 15px;
41
+ line-height: 24px;
42
+ color: #EDEDED;
43
+ text-transform: none;
44
+ text-align: center;
45
+ margin-bottom: 5px; }
46
+ .lsow-pricing-table .lsow-pricing-plan {
47
+ background: #fff;
48
+ padding: 0;
49
+ -webkit-box-sizing: border-box;
50
+ -moz-box-sizing: border-box;
51
+ -ms-box-sizing: border-box;
52
+ box-sizing: border-box;
53
+ -webkit-transition: all 0.1s ease-in-out 0s;
54
+ -moz-transition: all 0.1s ease-in-out 0s;
55
+ -ms-transition: all 0.1s ease-in-out 0s;
56
+ transition: all 0.1s ease-in-out 0s;
57
+ margin-bottom: 30px; }
58
+ .lsow-pricing-table .lsow-pricing-plan:hover .lsow-purchase {
59
+ background: #e5e5e5; }
60
+ .lsow-pricing-table .lsow-pricing-plan .lsow-plan-price {
61
+ color: #fff;
62
+ font-size: 22px;
63
+ line-height: 28px;
64
+ font-weight: 700;
65
+ margin: 0; }
66
+ .lsow-pricing-table .lsow-pricing-plan .lsow-plan-price span {
67
+ font-size: 22px;
68
+ line-height: 32px; }
69
+ .lsow-pricing-table .lsow-plan-header {
70
+ padding: 30px 0 30px;
71
+ background-color: #494949; }
72
+ .lsow-pricing-table .lsow-plan-price .lsow-text {
73
+ display: inline-block;
74
+ padding: 6px 25px;
75
+ border-radius: 25px;
76
+ background: #2C2B2B; }
77
+ .lsow-pricing-table .lsow-plan-price sup {
78
+ font-size: 18px;
79
+ line-height: 32px;
80
+ vertical-align: top;
81
+ margin-right: 2px;
82
+ position: static; }
83
+ .lsow-pricing-table .lsow-plan-details {
84
+ padding: 15px 0;
85
+ margin: 0;
86
+ border: 1px solid #eee; }
87
+ .lsow-pricing-table .lsow-plan-details .lsow-pricing-item {
88
+ list-style: none;
89
+ display: block;
90
+ padding: 6px;
91
+ margin: 0;
92
+ -webkit-box-sizing: border-box;
93
+ -moz-box-sizing: border-box;
94
+ -ms-box-sizing: border-box;
95
+ box-sizing: border-box;
96
+ text-align: center; }
97
+ .lsow-pricing-table .lsow-plan-details .lsow-pricing-item i {
98
+ color: #777;
99
+ font-size: 18px;
100
+ display: inline;
101
+ margin-right: 8px; }
102
+ .lsow-pricing-table .lsow-plan-details .lsow-pricing-item .lsow-title {
103
+ color: #838383;
104
+ margin-bottom: 10px; }
105
+ .lsow-pricing-table .lsow-plan-details .lsow-pricing-item .lsow-value-wrap {
106
+ display: block; }
107
+ .lsow-pricing-table .lsow-plan-details .lsow-pricing-item .lsow-value-wrap:after {
108
+ position: relative;
109
+ content: "";
110
+ background: #ddd;
111
+ width: 120px;
112
+ height: 1px;
113
+ display: block;
114
+ margin: 12px auto 0; }
115
+ .lsow-pricing-table .lsow-plan-details .lsow-pricing-item .lsow-value {
116
+ color: #444;
117
+ font-size: 24px;
118
+ line-height: 32px;
119
+ display: inline; }
120
+ .lsow-pricing-table .lsow-plan-details .lsow-pricing-item s {
121
+ color: #b4c9d3; }
122
+ .lsow-pricing-table .lsow-plan-details .lsow-pricing-item:last-child .lsow-value-wrap:after {
123
+ display: none; }
124
+ .lsow-pricing-table .lsow-purchase {
125
+ text-align: center;
126
+ text-transform: uppercase;
127
+ padding: 15px 0;
128
+ margin: 0 auto;
129
+ background: #f1f1f1;
130
+ -webkit-transition: all 0.1s ease-in-out 0s;
131
+ -moz-transition: all 0.1s ease-in-out 0s;
132
+ -ms-transition: all 0.1s ease-in-out 0s;
133
+ transition: all 0.1s ease-in-out 0s;
134
+ border-left: 1px solid #eee;
135
+ border-right: 1px solid #eee;
136
+ border-bottom: 1px solid #eee; }
137
+ .lsow-pricing-table .lsow-purchase a {
138
+ padding: 12px 25px;
139
+ border-radius: 5px;
140
+ letter-spacing: 0;
141
+ font-size: 16px;
142
+ line-height: 24px;
143
+ letter-spacing: 6px;
144
+ font-weight: bold; }
145
+ .lsow-pricing-table .lsow-pricing-plan.lsow-highlight {
146
+ background: #f5f5f5;
147
+ margin-top: -10px; }
148
+ .lsow-pricing-table .lsow-pricing-plan.lsow-highlight .lsow-plan-details {
149
+ border-color: #e5e5e5; }
150
+ .lsow-pricing-table .lsow-pricing-plan.lsow-highlight .lsow-top-header {
151
+ padding: 20px 0; }
152
+ .lsow-pricing-table .lsow-pricing-plan.lsow-highlight .lsow-pricing-table .lsow-top-header h3 {
153
+ color: #28c2ba !important; }
154
+ .lsow-pricing-table .lsow-pricing-plan.lsow-highlight .lsow-purchase {
155
+ padding: 20px 0;
156
+ background-color: #e5e5e5;
157
+ border-color: #ddd; }
158
+
159
+ /*# sourceMappingURL=style.css.map */
includes/widgets/lsow-pricing-table-widget/css/style.css.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "mappings": "AAGE,IAAK;EACH,UAAU,EAAE,UAAU;;AAItB,sBAEU;EACR,UAAU,EAAE,OAAO;;;ACNzB,sCAAuC;EACrC,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,IAAI;;AAGf,YAAa;EACX,UAAU,EAAE,MAAM;;AAGpB,mBAAoB;EAClB,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;EACT,oCAAiB;IACf,OAAO,EAAE,MAAM;IACf,gBAAgB,EAAE,OAAO;IACzB,aAAa,EAAE,iBAAiB;IAChC,uCAAG;MCqFL,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MACjB,cAAc,EAAE,GAAG;MACnB,WAAW,EAAE,IAAI;MACjB,KAAK,EAAE,IAAI;MACX,cAAc,EAAE,SAAS;MACzB,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,CAAC;MACb,aAAa,EAAE,IAAI;MD3Ff,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MACjB,KAAK,EAAE,OAAO;MACd,MAAM,EAAE,CAAC;IAEX,wCAAI;MACF,UAAU,EAAE,IAAI;IAElB,kDAAc;MACZ,OAAO,EAAE,KAAK;MACd,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MACjB,KAAK,EAAE,OAAO;MACd,cAAc,EAAE,IAAI;MACpB,UAAU,EAAE,MAAM;MAClB,aAAa,EAAE,GAAG;EAGtB,sCAAmB;IACjB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,CAAC;IACV,kBAAkB,EAAE,UAAU;IAC9B,eAAe,EAAE,UAAU;IAC3B,cAAc,EAAE,UAAU;IAC1B,UAAU,EAAE,UAAU;IACtB,kBAAkB,EAAE,uBAAuB;IAC3C,eAAe,EAAE,uBAAuB;IACxC,cAAc,EAAE,uBAAuB;IACvC,UAAU,EAAE,uBAAuB;IACnC,aAAa,EAAE,IAAI;IAEjB,2DAAe;MACb,UAAU,EAAE,OAAO;IAGvB,uDAAiB;MACf,KAAK,EAAE,IAAI;MACX,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MACjB,WAAW,EAAE,GAAG;MAChB,MAAM,EAAE,CAAC;MACT,4DAAK;QACH,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,IAAI;EAIvB,qCAAkB;IAChB,OAAO,EAAE,WAAW;IACpB,gBAAgB,EAAE,OAAO;EAGzB,+CAAW;IACT,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,QAAQ;IACjB,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,OAAO;EAErB,wCAAI;IACF,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,cAAc,EAAE,GAAG;IACnB,YAAY,EAAE,GAAG;IACjB,QAAQ,EAAE,MAAM;EAGpB,sCAAmB;IACjB,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,cAAc;IACtB,yDAAmB;MACjB,UAAU,EAAE,IAAI;MAChB,OAAO,EAAE,KAAK;MACd,OAAO,EAAE,GAAG;MACZ,MAAM,EAAE,CAAC;MACT,kBAAkB,EAAE,UAAU;MAC9B,eAAe,EAAE,UAAU;MAC3B,cAAc,EAAE,UAAU;MAC1B,UAAU,EAAE,UAAU;MACtB,UAAU,EAAE,MAAM;MAClB,2DAAE;QACA,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,MAAM;QACf,YAAY,EAAE,GAAG;MAEnB,qEAAY;QACV,KAAK,EAAE,OAAO;QACd,aAAa,EAAE,IAAI;MAErB,0EAAiB;QACf,OAAO,EAAE,KAAK;QACd,gFAAQ;UACN,QAAQ,EAAE,QAAQ;UAClB,OAAO,EAAE,EAAE;UACX,UAAU,EAAE,IAAI;UAChB,KAAK,EAAE,KAAK;UACZ,MAAM,EAAE,GAAG;UACX,OAAO,EAAE,KAAK;UACd,MAAM,EAAE,WAAW;MAGvB,qEAAY;QACV,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,MAAM;MAEjB,2DAAE;QACA,KAAK,EAAE,OAAO;MAEhB,2FAAoC;QAClC,OAAO,EAAE,IAAI;EAInB,kCAAe;IACb,UAAU,EAAE,MAAM;IAClB,cAAc,EAAE,SAAS;IACzB,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,OAAO;IACnB,kBAAkB,EAAE,uBAAuB;IAC3C,eAAe,EAAE,uBAAuB;IACxC,cAAc,EAAE,uBAAuB;IACvC,UAAU,EAAE,uBAAuB;IACnC,WAAW,EAAE,cAAc;IAC3B,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,cAAc;IAC7B,oCAAE;MACA,OAAO,EAAE,SAAS;MAClB,aAAa,EAAE,GAAG;MAClB,cAAc,EAAE,CAAC;MACjB,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;MACjB,cAAc,EAAE,GAAG;MACnB,WAAW,EAAE,IAAI;EAGrB,qDAAkC;IAChC,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,KAAK;IACjB,wEAAmB;MACjB,YAAY,EAAE,OAAO;IAEvB,sEAAiB;MACf,OAAO,EAAE,MAAM;IAEjB,6FAAwC;MACtC,KAAK,EAAE,kBAAkB;IAE3B,oEAAe;MACb,OAAO,EAAE,MAAM;MACf,gBAAgB,EAAE,OAAO;MACzB,YAAY,EAAE,IAAI",
4
+ "sources": ["../../../../../../bower_components/neat/app/assets/stylesheets/grid/_box-sizing.scss","style.scss","../../../../assets/css/_lsow-lib.scss"],
5
+ "names": [],
6
+ "file": "style.css"
7
+ }
includes/widgets/lsow-pricing-table-widget/css/style.scss ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../../../../assets/css/lsow-lib";
2
+
3
+
4
+ /* ---------- Pricing table --------- */
5
+
6
+ .lsow-pricing-table .lsow-pricing-plan {
7
+ float: left;
8
+ padding: 10px;
9
+ }
10
+
11
+ .lsow-center {
12
+ text-align: center;
13
+ }
14
+
15
+ .lsow-pricing-table {
16
+ padding: 0;
17
+ margin: 0;
18
+ .lsow-top-header {
19
+ padding: 15px 0;
20
+ background-color: #494949;
21
+ border-bottom: 1px solid #2c2b2b;
22
+ h3 {
23
+ @include lsow-heading-style();
24
+ font-size: 20px;
25
+ line-height: 32px;
26
+ color: #fefefe;
27
+ margin: 0;
28
+ }
29
+ img {
30
+ margin-top: 15px;
31
+ }
32
+ .lsow-tagline {
33
+ display: block;
34
+ font-size: 15px;
35
+ line-height: 24px;
36
+ color: #EDEDED;
37
+ text-transform: none;
38
+ text-align: center;
39
+ margin-bottom: 5px;
40
+ }
41
+ }
42
+ .lsow-pricing-plan {
43
+ background: #fff;
44
+ padding: 0;
45
+ -webkit-box-sizing: border-box;
46
+ -moz-box-sizing: border-box;
47
+ -ms-box-sizing: border-box;
48
+ box-sizing: border-box;
49
+ -webkit-transition: all 0.1s ease-in-out 0s;
50
+ -moz-transition: all 0.1s ease-in-out 0s;
51
+ -ms-transition: all 0.1s ease-in-out 0s;
52
+ transition: all 0.1s ease-in-out 0s;
53
+ margin-bottom: 30px;
54
+ &:hover {
55
+ .lsow-purchase {
56
+ background: #e5e5e5;
57
+ }
58
+ }
59
+ .lsow-plan-price {
60
+ color: #fff;
61
+ font-size: 22px;
62
+ line-height: 28px;
63
+ font-weight: 700;
64
+ margin: 0;
65
+ span {
66
+ font-size: 22px;
67
+ line-height: 32px;
68
+ }
69
+ }
70
+ }
71
+ .lsow-plan-header {
72
+ padding: 30px 0 30px;
73
+ background-color: #494949;
74
+ }
75
+ .lsow-plan-price {
76
+ .lsow-text {
77
+ display: inline-block;
78
+ padding: 6px 25px;
79
+ border-radius: 25px;
80
+ background: #2C2B2B;
81
+ }
82
+ sup {
83
+ font-size: 18px;
84
+ line-height: 32px;
85
+ vertical-align: top;
86
+ margin-right: 2px;
87
+ position: static;
88
+ }
89
+ }
90
+ .lsow-plan-details {
91
+ padding: 15px 0;
92
+ margin: 0;
93
+ border: 1px solid #eee;
94
+ .lsow-pricing-item {
95
+ list-style: none;
96
+ display: block;
97
+ padding: 6px;
98
+ margin: 0;
99
+ -webkit-box-sizing: border-box;
100
+ -moz-box-sizing: border-box;
101
+ -ms-box-sizing: border-box;
102
+ box-sizing: border-box;
103
+ text-align: center;
104
+ i {
105
+ color: #777;
106
+ font-size: 18px;
107
+ display: inline;
108
+ margin-right: 8px;
109
+ }
110
+ .lsow-title {
111
+ color: #838383;
112
+ margin-bottom: 10px;
113
+ }
114
+ .lsow-value-wrap {
115
+ display: block;
116
+ &:after {
117
+ position: relative;
118
+ content: "";
119
+ background: #ddd;
120
+ width: 120px;
121
+ height: 1px;
122
+ display: block;
123
+ margin: 12px auto 0;
124
+ }
125
+ }
126
+ .lsow-value {
127
+ color: #444;
128
+ font-size: 24px;
129
+ line-height: 32px;
130
+ display: inline;
131
+ }
132
+ s {
133
+ color: #b4c9d3;
134
+ }
135
+ &:last-child .lsow-value-wrap:after {
136
+ display: none;
137
+ }
138
+ }
139
+ }
140
+ .lsow-purchase {
141
+ text-align: center;
142
+ text-transform: uppercase;
143
+ padding: 15px 0;
144
+ margin: 0 auto;
145
+ background: #f1f1f1;
146
+ -webkit-transition: all 0.1s ease-in-out 0s;
147
+ -moz-transition: all 0.1s ease-in-out 0s;
148
+ -ms-transition: all 0.1s ease-in-out 0s;
149
+ transition: all 0.1s ease-in-out 0s;
150
+ border-left: 1px solid #eee;
151
+ border-right: 1px solid #eee;
152
+ border-bottom: 1px solid #eee;
153
+ a {
154
+ padding: 12px 25px;
155
+ border-radius: 5px;
156
+ letter-spacing: 0;
157
+ font-size: 16px;
158
+ line-height: 24px;
159
+ letter-spacing: 6px;
160
+ font-weight: bold;
161
+ }
162
+ }
163
+ .lsow-pricing-plan.lsow-highlight {
164
+ background: #f5f5f5;
165
+ margin-top: -10px;
166
+ .lsow-plan-details {
167
+ border-color: #e5e5e5;
168
+ }
169
+ .lsow-top-header {
170
+ padding: 20px 0;
171
+ }
172
+ .lsow-pricing-table .lsow-top-header h3 {
173
+ color: #28c2ba !important;
174
+ }
175
+ .lsow-purchase {
176
+ padding: 20px 0;
177
+ background-color: #e5e5e5;
178
+ border-color: #ddd;
179
+ }
180
+ }
181
+ }
includes/widgets/lsow-pricing-table-widget/lsow-pricing-table-widget.php ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Widget Name: Livemesh Pricing Table
5
+ Description: Display pricing plans in a multi-column grid.
6
+ Author: LiveMesh
7
+ Author URI: http://portfoliotheme.org
8
+ */
9
+
10
+ class LSOW_Pricing_Table_Widget extends SiteOrigin_Widget {
11
+
12
+ function __construct() {
13
+ parent::__construct(
14
+ 'lsow-pricing-plans',
15
+ __('Livemesh Pricing Table', 'livemesh-so-widgets'),
16
+ array(
17
+ 'description' => __('Display pricing table in a multi-column grid.', 'livemesh-so-widgets'),
18
+ 'panels_icon' => 'dashicons dashicons-minus',
19
+ 'help' => 'http://portfoliotheme.org/widgets-bundle/pricing-widget-documentation/'
20
+ ),
21
+ array(),
22
+ array(
23
+ 'title' => array(
24
+ 'type' => 'text',
25
+ 'label' => __('Title', 'livemesh-so-widgets'),
26
+ ),
27
+
28
+ 'pricing-plans' => array(
29
+ 'type' => 'repeater',
30
+ 'label' => __('Pricing Table', 'livemesh-so-widgets'),
31
+ 'item_name' => __('Pricing Plan', 'livemesh-so-widgets'),
32
+ 'item_label' => array(
33
+ 'selector' => "[id*='pricing-plans-title']",
34
+ 'update_event' => 'change',
35
+ 'value_method' => 'val'
36
+ ),
37
+ 'fields' => array(
38
+ 'pricing_title' => array(
39
+ 'type' => 'text',
40
+ 'label' => __('Pricing Plan Title', 'livemesh-so-widgets'),
41
+ 'description' => __('The title for the pricing plan', 'livemesh-so-widgets'),
42
+ ),
43
+
44
+ 'tagline' => array(
45
+ 'type' => 'text',
46
+ 'label' => __('Tagline Text', 'livemesh-so-widgets'),
47
+ 'description' => __('Provide any subtitle or taglines like "Most Popular", "Best Value", "Best Selling", "Most Flexible" etc. that you would like to use for this pricing plan.', 'livemesh-so-widgets'),
48
+ ),
49
+
50
+ 'image' => array(
51
+ 'type' => 'media',
52
+ 'label' => __('Image', 'livemesh-so-widgets'),
53
+ ),
54
+
55
+ 'price_tag' => array(
56
+ 'type' => 'text',
57
+ 'label' => __('Price Tag', 'livemesh-so-widgets'),
58
+ 'description' => __('Enter the price tag for the pricing plan. HTML is accepted.', 'livemesh-so-widgets'),
59
+ ),
60
+
61
+ 'button_text' => array(
62
+ 'type' => 'text',
63
+ 'label' => __('Text for Pricing Link/Button', 'livemesh-so-widgets'),
64
+ 'description' => __('Provide the text for the link or the button shown for this pricing plan.', 'livemesh-so-widgets'),
65
+ ),
66
+
67
+ 'url' => array(
68
+ 'type' => 'link',
69
+ 'label' => __('URL for the Pricing link/button', 'livemesh-so-widgets'),
70
+ 'description' => __('Provide the target URL for the link or the button shown for this pricing plan.', 'livemesh-so-widgets'),
71
+ ),
72
+
73
+ 'button_new_window' => array(
74
+ 'type' => 'checkbox',
75
+ 'label' => __('Open Button URL in a new window', 'livemesh-so-widgets'),
76
+ ),
77
+
78
+ 'highlight' => array(
79
+ 'type' => 'checkbox',
80
+ 'label' => __('Highlight Pricing Plan', 'livemesh-so-widgets'),
81
+ 'description' => __('Specify if you want to highlight the pricing plan.', 'livemesh-so-widgets'),
82
+ ),
83
+
84
+ 'items' => array(
85
+ 'type' => 'repeater',
86
+ 'label' => __('Pricing Plan Details', 'livemesh-so-widgets'),
87
+ 'item_name' => __('Pricing Item', 'livemesh-so-widgets'),
88
+ 'item_label' => array(
89
+ 'selector' => "[id*='pricing-plans-items-text']",
90
+ 'update_event' => 'change',
91
+ 'value_method' => 'val'
92
+ ),
93
+ 'fields' => array(
94
+ 'title' => array(
95
+ 'type' => 'text',
96
+ 'label' => __('Title', 'livemesh-so-widgets'),
97
+ ),
98
+ 'value' => array(
99
+ 'type' => 'text',
100
+ 'label' => __('Value', 'livemesh-so-widgets'),
101
+ ),
102
+ 'icon_new' => array(
103
+ 'type' => 'icon',
104
+ 'label' => __('Icon', 'livemesh-so-widgets'),
105
+ ),
106
+ ),
107
+ ),
108
+
109
+
110
+ )
111
+ ),
112
+
113
+ 'settings' => array(
114
+ 'type' => 'section',
115
+ 'label' => __('Settings', 'livemesh-so-widgets'),
116
+ 'fields' => array(
117
+
118
+ 'per_line' => array(
119
+ 'type' => 'slider',
120
+ 'label' => __('Pricing Columns per row', 'livemesh-so-widgets'),
121
+ 'min' => 1,
122
+ 'max' => 5,
123
+ 'integer' => true,
124
+ 'default' => 4
125
+ ),
126
+ )
127
+ ),
128
+
129
+ )
130
+ );
131
+ }
132
+
133
+ function initialize() {
134
+
135
+ $this->register_frontend_styles(array(
136
+ array(
137
+ 'lsow-pricing-plans',
138
+ plugin_dir_url(__FILE__) . 'css/style.css'
139
+ )
140
+ ));
141
+ }
142
+
143
+ function get_template_variables($instance, $args) {
144
+ return array(
145
+ 'pricing_plans' => !empty($instance['pricing-plans']) ? $instance['pricing-plans'] : array(),
146
+ 'settings' => $instance['settings']
147
+ );
148
+ }
149
+
150
+ }
151
+
152
+ siteorigin_widget_register('lsow-pricing-plans', __FILE__, 'LSOW_Pricing_Table_Widget');
includes/widgets/lsow-pricing-table-widget/tpl/default.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var $pricing_plans
4
+ */
5
+
6
+ ?>
7
+
8
+ <?php $column_style = lsow_get_column_class(intval($settings['per_line'])); ?>
9
+
10
+ <div class="lsow-pricing-table lsow-container">
11
+
12
+ <?php
13
+
14
+ foreach ($pricing_plans as $pricing_plan) :
15
+
16
+ $pricing_title = esc_html($pricing_plan['pricing_title']);
17
+ $tagline = esc_html($pricing_plan['tagline']);
18
+ $price_tag = htmlspecialchars_decode(wp_kses_post($pricing_plan['price_tag']));
19
+ $pricing_img = $pricing_plan['image'];
20
+ $pricing_url = esc_url($pricing_plan['url']);
21
+ $pricing_button_text = esc_html($pricing_plan['button_text']);
22
+ $button_new_window = esc_html($pricing_plan['button_new_window']);
23
+ $highlight = esc_html($pricing_plan['highlight']);
24
+
25
+
26
+ $price_tag = (empty($price_tag)) ? '' : $price_tag;
27
+ $pricing_url = (empty($pricing_url)) ? '#' : esc_url($pricing_url);
28
+
29
+ ?>
30
+
31
+ <div
32
+ class="lsow-pricing-plan <?php echo(!empty($highlight) ? ' lsow-highlight' : ''); ?> <?php echo $column_style; ?>">
33
+
34
+ <div class="lsow-top-header">
35
+
36
+ <?php if (!empty($tagline))
37
+ echo '<p class="lsow-tagline center">' . $tagline . '</p>'; ?>
38
+
39
+ <h3 class="lsow-center"><?php echo $pricing_title; ?></h3>
40
+
41
+ <?php
42
+
43
+ if (!empty($pricing_img)) :
44
+ echo wp_get_attachment_image($pricing_img, 'full', false, array('class' => 'lsow-image full', 'alt' => $pricing_title));
45
+ endif;
46
+
47
+ ?>
48
+
49
+ </div>
50
+
51
+ <h4 class="lsow-plan-price lsow-plan-header lsow-center">
52
+
53
+ <span class="lsow-text">
54
+
55
+ <?php echo wp_kses_post($price_tag); ?>
56
+
57
+ </span>
58
+
59
+ </h4>
60
+
61
+ <div class="lsow-plan-details">
62
+
63
+ <?php
64
+
65
+ foreach ($pricing_plan['items'] as $pricing_item) : ?>
66
+
67
+ <div class="lsow-pricing-item">
68
+
69
+ <div class="lsow-title">
70
+
71
+ <?php echo htmlspecialchars_decode(wp_kses_post($pricing_item['title'])); ?>
72
+
73
+ </div>
74
+
75
+ <div class="lsow-value-wrap">
76
+
77
+ <?php
78
+
79
+ if (!empty($pricing_item['icon_new'])) {
80
+ echo siteorigin_widget_get_icon($pricing_item['icon_new']);
81
+ }
82
+
83
+ ?>
84
+
85
+ <div class="lsow-value">
86
+
87
+ <?php echo htmlspecialchars_decode(wp_kses_post($pricing_item['value'])); ?>
88
+
89
+ </div>
90
+
91
+ </div>
92
+
93
+ </div>
94
+
95
+ <?php endforeach; ?>
96
+
97
+ </div>
98
+ <!-- .lsow-plan-details -->
99
+
100
+ <div class="lsow-purchase">
101
+
102
+ <a class="lsow-button default" href="<?php echo esc_url($pricing_url); ?>"
103
+ <?php if (!empty($button_new_window))
104
+ echo 'target="_blank"'; ?>><?php echo esc_html($pricing_button_text); ?></a>
105
+
106
+ </div>
107
+
108
+ </div>
109
+ <!-- .lsow-pricing-plan -->
110
+
111
+ <?php
112
+
113
+ endforeach;
114
+
115
+ ?>
116
+
117
+ </div><!-- .lsow-pricing-table -->
118
+
119
+ <div class="lsow-clear"></div>
includes/widgets/lsow-services-widget/assets/banner.svg ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="128px" height="128px" viewBox="0 0 128 128" style="enable-background:new 0 0 128 128;" xml:space="preserve">
6
+ <g>
7
+ <circle style="fill:#2D4452;" cx="64" cy="64" r="64"/>
8
+ <path style="fill:#233540;" d="M124.52,84.813V84.81c-0.063-0.176-0.133-0.347-0.209-0.516c-0.062-0.172-0.131-0.339-0.203-0.504
9
+ c-0.063-0.178-0.135-0.351-0.211-0.521c-0.062-0.174-0.131-0.342-0.205-0.509c-0.063-0.176-0.133-0.347-0.209-0.516
10
+ c-0.062-0.174-0.131-0.342-0.205-0.509c-0.063-0.177-0.133-0.348-0.209-0.517c-0.062-0.174-0.131-0.342-0.205-0.509
11
+ c-0.063-0.173-0.131-0.342-0.204-0.508c-0.063-0.178-0.136-0.352-0.21-0.521c-0.063-0.174-0.133-0.342-0.206-0.509
12
+ c-0.063-0.176-0.134-0.347-0.208-0.516c-0.063-0.174-0.133-0.342-0.206-0.509c-0.063-0.177-0.134-0.348-0.208-0.517
13
+ c-0.063-0.174-0.133-0.342-0.206-0.509c-0.063-0.176-0.133-0.347-0.208-0.516c-0.063-0.173-0.131-0.34-0.204-0.505
14
+ c-0.063-0.178-0.134-0.351-0.21-0.521c-0.063-0.174-0.132-0.342-0.206-0.509c-0.062-0.175-0.132-0.346-0.207-0.514
15
+ c-0.063-0.176-0.133-0.347-0.208-0.516c-0.063-0.174-0.132-0.342-0.206-0.509c-0.063-0.176-0.133-0.347-0.208-0.517
16
+ c-0.063-0.172-0.13-0.339-0.203-0.504c-0.063-0.178-0.134-0.351-0.209-0.521c-0.063-0.174-0.133-0.342-0.207-0.509
17
+ c-0.063-0.177-0.133-0.348-0.207-0.517c-0.063-0.174-0.133-0.342-0.207-0.509c-0.062-0.175-0.132-0.345-0.207-0.513
18
+ c-0.063-0.176-0.133-0.348-0.207-0.517c-0.063-0.172-0.131-0.339-0.205-0.504c-0.063-0.178-0.133-0.351-0.209-0.521
19
+ c-0.063-0.174-0.131-0.342-0.205-0.509c-0.063-0.177-0.133-0.348-0.209-0.517c-0.063-0.174-0.131-0.342-0.205-0.509
20
+ c-0.063-0.176-0.133-0.347-0.209-0.516c-0.063-0.175-0.131-0.343-0.205-0.51c-0.063-0.173-0.131-0.342-0.205-0.508
21
+ c-0.063-0.178-0.135-0.351-0.211-0.521c-0.062-0.174-0.131-0.343-0.205-0.509c-0.063-0.177-0.133-0.348-0.208-0.517
22
+ c-0.062-0.174-0.132-0.342-0.206-0.509c-0.063-0.176-0.133-0.347-0.208-0.516c-0.062-0.175-0.132-0.343-0.206-0.51
23
+ c-0.063-0.176-0.133-0.347-0.208-0.516c-0.062-0.172-0.131-0.339-0.204-0.504c-0.063-0.177-0.133-0.35-0.209-0.519
24
+ c-0.063-0.176-0.133-0.347-0.208-0.516c-0.062-0.174-0.132-0.342-0.206-0.509c-0.063-0.176-0.133-0.348-0.208-0.517
25
+ c-0.062-0.174-0.132-0.342-0.206-0.509c-0.063-0.176-0.133-0.347-0.208-0.516c-0.062-0.172-0.13-0.339-0.204-0.504
26
+ c-0.063-0.179-0.133-0.352-0.209-0.521c-0.063-0.174-0.132-0.342-0.205-0.509c-0.063-0.175-0.133-0.345-0.207-0.513
27
+ c-0.063-0.176-0.134-0.348-0.209-0.517c-0.063-0.174-0.132-0.342-0.205-0.509c-0.063-0.176-0.134-0.347-0.209-0.516
28
+ c-0.062-0.172-0.131-0.339-0.203-0.504c-0.063-0.179-0.135-0.352-0.211-0.521c-0.062-0.174-0.131-0.342-0.205-0.509
29
+ c-0.063-0.176-0.133-0.347-0.209-0.516c-0.062-0.175-0.131-0.343-0.205-0.51c-0.063-0.176-0.133-0.347-0.209-0.516
30
+ c-0.062-0.174-0.131-0.342-0.205-0.509c-0.063-0.175-0.133-0.346-0.207-0.514c-0.063-0.174-0.133-0.344-0.207-0.511
31
+ c-0.063-0.175-0.131-0.346-0.206-0.514c-0.063-0.176-0.134-0.347-0.208-0.517c-0.063-0.174-0.133-0.342-0.206-0.509
32
+ c-0.063-0.176-0.134-0.347-0.208-0.516c-0.063-0.174-0.133-0.342-0.206-0.509c-0.063-0.177-0.134-0.348-0.208-0.517
33
+ c-0.063-0.172-0.131-0.339-0.204-0.504c-0.063-0.177-0.133-0.349-0.209-0.518c-0.063-0.176-0.133-0.348-0.208-0.517
34
+ c-0.063-0.174-0.132-0.342-0.206-0.509c-0.063-0.176-0.133-0.347-0.208-0.516c-0.063-0.174-0.132-0.342-0.206-0.509
35
+ c-0.063-0.177-0.133-0.348-0.208-0.517c-0.063-0.172-0.13-0.339-0.204-0.504c-0.063-0.178-0.133-0.351-0.209-0.521
36
+ c-0.063-0.175-0.132-0.343-0.206-0.51c-0.062-0.175-0.132-0.345-0.207-0.513c-0.063-0.176-0.133-0.347-0.207-0.516
37
+ c-0.063-0.175-0.133-0.343-0.207-0.51c-0.063-0.176-0.133-0.347-0.207-0.516c-0.063-0.172-0.132-0.339-0.205-0.504
38
+ c-0.063-0.178-0.133-0.351-0.209-0.521c-0.063-0.175-0.131-0.343-0.205-0.51c-0.063-0.176-0.133-0.347-0.209-0.516
39
+ c-0.063-0.174-0.131-0.342-0.205-0.509c-0.063-0.175-0.133-0.346-0.207-0.514c-0.063-0.176-0.133-0.347-0.209-0.516
40
+ c-0.062-0.172-0.131-0.339-0.203-0.504c-0.063-0.178-0.135-0.352-0.211-0.521c-0.062-0.174-0.131-0.342-0.205-0.509
41
+ c-0.063-0.176-0.133-0.347-0.208-0.516c-0.062-0.174-0.132-0.342-0.206-0.509c-0.063-0.177-0.133-0.348-0.208-0.517
42
+ c-0.062-0.174-0.132-0.342-0.206-0.509c-0.063-0.176-0.133-0.347-0.208-0.516c-0.062-0.173-0.132-0.339-0.204-0.504
43
+ c-0.063-0.178-0.133-0.35-0.209-0.519c-0.063-0.176-0.133-0.347-0.208-0.516c-0.843-2.377-2.892-4.069-5.522-4.43
44
+ c-0.002,0-0.002,0-0.004,0C96.711,26.032,96.361,26,96,26H79H46c-4.784,0-8,3.358-8,8v56h-7.071C27.106,90,24,93.287,24,97
45
+ c0,0.993,0.229,1.953,0.627,2.831c0.063,0.172,0.13,0.342,0.205,0.508c0.063,0.173,0.13,0.343,0.205,0.509
46
+ c0.064,0.177,0.133,0.351,0.211,0.521c0.063,0.172,0.129,0.342,0.205,0.508c0.063,0.175,0.132,0.348,0.209,0.517
47
+ c0.063,0.173,0.129,0.343,0.205,0.509c0.063,0.175,0.132,0.348,0.209,0.517c0.063,0.172,0.129,0.342,0.205,0.508
48
+ c0.063,0.175,0.132,0.349,0.209,0.518c0.062,0.17,0.128,0.339,0.203,0.504c0.063,0.176,0.133,0.35,0.21,0.521
49
+ c0.063,0.172,0.13,0.342,0.206,0.508c0.063,0.175,0.131,0.347,0.207,0.514c0.063,0.175,0.131,0.348,0.208,0.517
50
+ c0.063,0.172,0.13,0.342,0.206,0.508c0.063,0.176,0.131,0.349,0.208,0.518c0.062,0.17,0.128,0.339,0.203,0.504
51
+ c0.063,0.176,0.133,0.35,0.21,0.521c0.063,0.173,0.131,0.343,0.206,0.509c0.063,0.175,0.132,0.348,0.208,0.517
52
+ c0.063,0.172,0.131,0.342,0.206,0.508c0.063,0.174,0.131,0.347,0.207,0.514c0.063,0.175,0.132,0.348,0.208,0.517
53
+ c0.063,0.17,0.129,0.339,0.203,0.504c0.064,0.176,0.133,0.351,0.211,0.521c0.063,0.172,0.13,0.342,0.205,0.508
54
+ c0.063,0.175,0.132,0.348,0.209,0.517c0.063,0.172,0.13,0.342,0.205,0.508c0.063,0.176,0.132,0.349,0.209,0.518
55
+ c0.063,0.172,0.13,0.342,0.205,0.508c0.063,0.173,0.13,0.343,0.205,0.509c0.064,0.177,0.133,0.351,0.211,0.521
56
+ c0.063,0.172,0.129,0.342,0.205,0.508c0.063,0.175,0.132,0.348,0.209,0.517c0.063,0.172,0.129,0.343,0.205,0.509
57
+ c0.063,0.175,0.132,0.348,0.209,0.517c0.063,0.172,0.129,0.342,0.205,0.508c0.063,0.174,0.131,0.345,0.206,0.512
58
+ c0.063,0.175,0.131,0.346,0.208,0.514c0.002,0.006,0.004,0.011,0.006,0.017C41.958,125.021,52.629,128,64,128
59
+ C92.057,128,115.88,109.938,124.52,84.813z"/>
60
+ <path style="fill:#CCCCCC;" d="M96,40c4.033,0,7-3,7-7s-2.967-7-7-7H79v14H96z"/>
61
+ <path style="fill:#B3B3B3;" d="M92,40v-7c0-3.394,1.824-6.424,5.057-6.921C96.713,26.032,96.361,26,96,26H79v14H92z"/>
62
+ <path style="fill:#E6E6E6;" d="M82,104c4.784,0,8-4.358,8-9V33c0-3.713,2.178-7,6-7H46c-4.784,0-8,3.358-8,8v70H82z"/>
63
+ <path style="fill:#CCCCCC;" d="M75,97c0-3,2.177-7,6-7H38v14h43C77.177,104,75,100,75,97z"/>
64
+ <g>
65
+ <path style="fill:#CCCCCC;" d="M61,42H47c-1.104,0-2-0.896-2-2s0.896-2,2-2h14c1.104,0,2,0.896,2,2S62.104,42,61,42z"/>
66
+ <path style="fill:#CCCCCC;" d="M82,52H47c-1.104,0-2-0.896-2-2s0.896-2,2-2h35c1.104,0,2,0.896,2,2S83.104,52,82,52z"/>
67
+ <path style="fill:#CCCCCC;" d="M82,62H47c-1.104,0-2-0.896-2-2s0.896-2,2-2h35c1.104,0,2,0.896,2,2S83.104,62,82,62z"/>
68
+ <path style="fill:#CCCCCC;" d="M82,72H47c-1.104,0-2-0.896-2-2s0.896-2,2-2h35c1.104,0,2,0.896,2,2S83.104,72,82,72z"/>
69
+ <path style="fill:#CCCCCC;" d="M82,82H47c-1.104,0-2-0.896-2-2s0.896-2,2-2h35c1.104,0,2,0.896,2,2S83.104,82,82,82z"/>
70
+ </g>
71
+ <path style="fill:#F5F5F5;" d="M79,104c-3.823,0-6-4-6-7s2.177-7,6-7H30.929C27.106,90,24,93.287,24,97s3.105,7,6.929,7H79z"/>
72
+ </g>
73
+ </svg>
includes/widgets/lsow-services-widget/css/style.css ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ box-sizing: border-box; }
3
+
4
+ *, *::after, *::before {
5
+ box-sizing: inherit; }
6
+
7
+ .lsow-services.lsow-style1 .lsow-service .lsow-icon-wrapper span {
8
+ display: block;
9
+ text-align: center;
10
+ font-size: 34px;
11
+ margin-bottom: 20px; }
12
+ .lsow-services.lsow-style1 .lsow-service .lsow-image-wrapper img {
13
+ display: block;
14
+ max-width: 100%;
15
+ text-align: center;
16
+ margin: 0 auto 25px;
17
+ -webkit-transition: all 0.4s ease-in-out 0s;
18
+ -moz-transition: all 0.4s ease-in-out 0s;
19
+ -ms-transition: all 0.4s ease-in-out 0s;
20
+ transition: all 0.4s ease-in-out 0s; }
21
+ .lsow-services.lsow-style1 .lsow-service .lsow-service-text {
22
+ text-align: center;
23
+ max-width: 300px;
24
+ margin: 0 auto; }
25
+ .lsow-services.lsow-style1 .lsow-service .lsow-service-text .lsow-title {
26
+ font-size: 18px;
27
+ line-height: 26px;
28
+ letter-spacing: 1px;
29
+ font-weight: bold;
30
+ color: #333;
31
+ text-transform: uppercase;
32
+ clear: none;
33
+ margin-top: 0;
34
+ margin-bottom: 10px;
35
+ margin-bottom: 20px; }
36
+ .lsow-services.lsow-style1 .lsow-service:hover .lsow-image-wrapper img {
37
+ /*@include vendorize(filter, brightness(80%));*/
38
+ -webkit-transform: scale(0.9, 0.9);
39
+ -moz-transform: scale(0.9, 0.9);
40
+ -ms-transform: scale(0.9, 0.9);
41
+ transform: scale(0.9, 0.9); }
42
+
43
+ /* Style 2 */
44
+ .lsow-services.lsow-style2 .lsow-service .lsow-image-wrapper img, .lsow-services.lsow-style2 .lsow-service .lsow-icon-wrapper span {
45
+ float: left;
46
+ margin-right: 18px; }
47
+ .lsow-services.lsow-style2 .lsow-service .lsow-icon-wrapper span {
48
+ font-size: 24px;
49
+ line-height: 32px; }
50
+ .lsow-services.lsow-style2 .lsow-service .lsow-service-text .lsow-title {
51
+ font-size: 18px;
52
+ line-height: 26px;
53
+ letter-spacing: 1px;
54
+ font-weight: bold;
55
+ color: #333;
56
+ text-transform: uppercase;
57
+ clear: none;
58
+ margin-top: 0;
59
+ margin-bottom: 10px;
60
+ margin-bottom: 20px; }
61
+
62
+ .lsow-services .lsow-service {
63
+ margin-bottom: 50px; }
64
+ .lsow-services .lsow-service .lsow-service-text {
65
+ font-size: 15px;
66
+ line-height: 24px; }
67
+ .lsow-dark-bg .lsow-services .lsow-service .lsow-service-text {
68
+ color: #909090; }
69
+ .lsow-dark-bg .lsow-services .lsow-service .lsow-service-text .lsow-title {
70
+ color: #e5e5e5; }
71
+
72
+ /*# sourceMappingURL=style.css.map */
includes/widgets/lsow-services-widget/css/style.css.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "mappings": "AAGE,IAAK;EACH,UAAU,EAAE,UAAU;;AAItB,sBAEU;EACR,UAAU,EAAE,OAAO;;ACNrB,gEAAwB;EACtB,OAAO,EAAE,KAAK;EACd,UAAU,EAAE,MAAM;EAClB,SAAS,EAAE,IAAI;EACf,aAAa,EAAE,IAAI;AAErB,gEAAwB;EACtB,OAAO,EAAE,KAAK;EACd,SAAS,EAAE,IAAI;EACf,UAAU,EAAE,MAAM;EAClB,MAAM,EAAE,WAAW;ECcvB,kBAAoB,EAwEU,uBAA+B;EAvE7D,eAAiB,EAuEa,uBAA+B;EAtE7D,cAAgB,EAsEc,uBAA+B;EArE7D,UAAY,EAqEkB,uBAA+B;ADnF3D,2DAAmB;EACjB,UAAU,EAAE,MAAM;EAClB,SAAS,EAAE,KAAK;EAChB,MAAM,EAAE,MAAM;EACd,uEAAY;ICoFhB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,cAAc,EAAE,GAAG;IACnB,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE,IAAI;IACX,cAAc,EAAE,SAAS;IACzB,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,CAAC;IACb,aAAa,EAAE,IAAI;ID1Fb,aAAa,EAAE,IAAI;AAIrB,sEAAwB;;ECC5B,iBAAoB,EAAE,eAAM;EAC5B,cAAiB,EAAE,eAAM;EACzB,aAAgB,EAAE,eAAM;EACxB,SAAY,EAAE,eAAM;;;ADQlB,kIAAiD;EAC/C,KAAK,EAAE,IAAI;EACX,YAAY,EAAE,IAAI;AAEpB,gEAAwB;EACtB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,IAAI;AAEnB,uEAA+B;EC0DjC,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,GAAG;EACnB,WAAW,EAAE,IAAI;EACjB,KAAK,EAAE,IAAI;EACX,cAAc,EAAE,SAAS;EACzB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,CAAC;EACb,aAAa,EAAE,IAAI;EDhEf,aAAa,EAAE,IAAI;;AAMvB,4BAAc;EACZ,aAAa,EAAE,IAAI;EACrB,+CAAmB;IACf,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,6DAAgB;MACd,KAAK,EAAE,OAAO;MACd,yEAAY;QACV,KAAK,EAAE,OAAO",
4
+ "sources": ["../../../../../../bower_components/neat/app/assets/stylesheets/grid/_box-sizing.scss","style.scss","../../../../assets/css/_lsow-lib.scss"],
5
+ "names": [],
6
+ "file": "style.css"
7
+ }
includes/widgets/lsow-services-widget/css/style.scss ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../../../../assets/css/lsow-lib";
2
+
3
+
4
+ .lsow-services.lsow-style1 {
5
+ .lsow-service {
6
+ .lsow-icon-wrapper span {
7
+ display: block;
8
+ text-align: center;
9
+ font-size: 34px;
10
+ margin-bottom: 20px;
11
+ }
12
+ .lsow-image-wrapper img {
13
+ display: block;
14
+ max-width: 100%;
15
+ text-align: center;
16
+ margin: 0 auto 25px;
17
+ @include lsow-transition();
18
+ }
19
+ .lsow-service-text {
20
+ text-align: center;
21
+ max-width: 300px;
22
+ margin: 0 auto;
23
+ .lsow-title {
24
+ @include lsow-heading-style();
25
+ margin-bottom: 20px;
26
+ }
27
+ }
28
+ &:hover {
29
+ .lsow-image-wrapper img {
30
+ /*@include vendorize(filter, brightness(80%));*/
31
+ @include vendorize(transform, scale(0.9, 0.9));
32
+ }
33
+ }
34
+ }
35
+ }
36
+
37
+ /* Style 2 */
38
+
39
+ .lsow-services.lsow-style2 {
40
+ .lsow-service {
41
+ .lsow-image-wrapper img, .lsow-icon-wrapper span {
42
+ float: left;
43
+ margin-right: 18px;
44
+ }
45
+ .lsow-icon-wrapper span {
46
+ font-size: 24px;
47
+ line-height: 32px;
48
+ }
49
+ .lsow-service-text .lsow-title {
50
+ @include lsow-heading-style();
51
+ margin-bottom: 20px;
52
+ }
53
+ }
54
+ }
55
+
56
+ .lsow-services {
57
+ .lsow-service {
58
+ margin-bottom: 50px;
59
+ .lsow-service-text {
60
+ font-size: 15px;
61
+ line-height: 24px;
62
+ .lsow-dark-bg & {
63
+ color: #909090;
64
+ .lsow-title {
65
+ color: #e5e5e5;
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
includes/widgets/lsow-services-widget/lsow-services-widget.php ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Widget Name: Livemesh Services
5
+ Description: Capture services in a multi-column grid.
6
+ Author: LiveMesh
7
+ Author URI: http://portfoliotheme.org
8
+ */
9
+
10
+ class LSOW_Services_Widget extends SiteOrigin_Widget {
11
+
12
+ function __construct() {
13
+ parent::__construct(
14
+ 'lsow-services',
15
+ __('Livemesh Services', 'livemesh-so-widgets'),
16
+ array(
17
+ 'description' => __('Create services to display in a column grid.', 'livemesh-so-widgets'),
18
+ 'panels_icon' => 'dashicons dashicons-minus',
19
+ 'help' => 'http://portfoliotheme.org/widgets-bundle/services-widget-documentation/'
20
+ ),
21
+ array(),
22
+ array(
23
+ 'title' => array(
24
+ 'type' => 'text',
25
+ 'label' => __('Title', 'livemesh-so-widgets'),
26
+ ),
27
+
28
+
29
+ 'style' => array(
30
+ 'type' => 'select',
31
+ 'label' => __('Choose Style', 'livemesh-so-widgets'),
32
+ 'state_emitter' => array(
33
+ 'callback' => 'select',
34
+ 'args' => array('style')
35
+ ),
36
+ 'default' => 'style1',
37
+ 'options' => array(
38
+ 'style1' => __('Style 1', 'livemesh-so-widgets'),
39
+ 'style2' => __('Style 2', 'livemesh-so-widgets'),
40
+ )
41
+ ),
42
+
43
+ 'services' => array(
44
+ 'type' => 'repeater',
45
+ 'label' => __('Services', 'livemesh-so-widgets'),
46
+ 'item_name' => __('Service', 'livemesh-so-widgets'),
47
+ 'item_label' => array(
48
+ 'selector' => "[id*='services-title']",
49
+ 'update_event' => 'change',
50
+ 'value_method' => 'val'
51
+ ),
52
+ 'fields' => array(
53
+
54
+ 'title' => array(
55
+ 'type' => 'text',
56
+ 'label' => __('Title', 'livemesh-so-widgets'),
57
+ 'description' => __('Title of the service.', 'livemesh-so-widgets'),
58
+ ),
59
+
60
+ 'icon_type' => array(
61
+ 'type' => 'select',
62
+ 'label' => __('Choose Icon Type', 'livemesh-so-widgets'),
63
+ 'default' => 'icon',
64
+ 'state_emitter' => array(
65
+ 'callback' => 'select',
66
+ 'args' => array('icon_type')
67
+ ),
68
+ 'options' => array(
69
+ 'icon' => __('Icon', 'livemesh-so-widgets'),
70
+ 'icon_image' => __('Icon Image', 'livemesh-so-widgets'),
71
+ )
72
+ ),
73
+
74
+ 'icon_image' => array(
75
+ 'type' => 'media',
76
+ 'label' => __('Service Image.', 'livemesh-so-widgets'),
77
+ 'state_handler' => array(
78
+ 'icon_type[icon_image]' => array('show'),
79
+ 'icon_type[icon]' => array('hide'),
80
+ ),
81
+ ),
82
+
83
+ 'icon' => array(
84
+ 'type' => 'icon',
85
+ 'label' => __('Service Icon.', 'livemesh-so-widgets'),
86
+ 'state_handler' => array(
87
+ 'icon_type[icon]' => array('show'),
88
+ 'icon_type[icon_image]' => array('hide'),
89
+ ),
90
+ ),
91
+
92
+ 'excerpt' => array(
93
+ 'type' => 'textarea',
94
+ 'label' => __('Short description', 'livemesh-so-widgets'),
95
+ 'description' => __('Provide a short description for the service', 'livemesh-so-widgets'),
96
+ ),
97
+
98
+ )
99
+ ),
100
+
101
+ 'settings' => array(
102
+ 'type' => 'section',
103
+ 'label' => __('Settings', 'livemesh-so-widgets'),
104
+ 'fields' => array(
105
+
106
+ 'per_line' => array(
107
+ 'type' => 'slider',
108
+ 'label' => __('Columns per row', 'livemesh-so-widgets'),
109
+ 'min' => 1,
110
+ 'max' => 5,
111
+ 'integer' => true,
112
+ 'default' => 3
113
+ ),
114
+ )
115
+ ),
116
+ )
117
+ );
118
+ }
119
+
120
+ function initialize() {
121
+
122
+
123
+ $this->register_frontend_styles(array(
124
+ array(
125
+ 'lsow-services',
126
+ plugin_dir_url(__FILE__) . 'css/style.css'
127
+ )
128
+ ));
129
+ }
130
+
131
+ function get_template_variables($instance, $args) {
132
+ return array(
133
+ 'style' => $instance['style'],
134
+ 'services' => !empty($instance['services']) ? $instance['services'] : array(),
135
+ 'settings' =