Galleries by Angie Makes - Version 1.43

Version Description

Download this release

Release Info

Developer cbaldelomar
Plugin Icon wp plugin Galleries by Angie Makes
Version 1.43
Comparing to
See all releases

Code changes from version 1.42 to 1.43

Files changed (38) hide show
  1. README.md +13 -0
  2. includes/css/style.css +3 -2
  3. includes/js/flexslider/README.mdown +0 -144
  4. includes/js/flexslider/changelog.txt +0 -4
  5. includes/js/flexslider/flexslider.css +0 -288
  6. includes/js/flexslider/fonts/flexslider-icon.eot +0 -0
  7. includes/js/flexslider/fonts/flexslider-icon.svg +0 -19
  8. includes/js/flexslider/fonts/flexslider-icon.ttf +0 -0
  9. includes/js/flexslider/fonts/flexslider-icon.woff +0 -0
  10. includes/js/flexslider/images/bg_play_pause.png +0 -0
  11. includes/js/flexslider/images/slide-arrows.png +0 -0
  12. includes/js/flexslider/jquery.flexslider-min.js +0 -5
  13. includes/js/flexslider/jquery.flexslider.js +0 -1183
  14. includes/js/gallery.js +40 -22
  15. includes/js/masonry.pkgd.min.js +0 -9
  16. includes/js/owlcarousel/README.md +0 -57
  17. includes/js/owlcarousel/assets/ajax-loader.gif +0 -0
  18. includes/js/owlcarousel/assets/owl.carousel.min.css +0 -1
  19. includes/js/owlcarousel/assets/owl.theme.default.css +0 -75
  20. includes/js/owlcarousel/assets/owl.theme.default.min.css +0 -1
  21. includes/js/owlcarousel/assets/owl.theme.green.css +0 -53
  22. includes/js/owlcarousel/assets/owl.theme.green.min.css +0 -1
  23. includes/js/owlcarousel/assets/slide-arrow-left.png +0 -0
  24. includes/js/owlcarousel/assets/slide-arrow-right.png +0 -0
  25. includes/js/owlcarousel/owl.carousel.min.js +0 -2
  26. includes/scripts.php +5 -5
  27. includes/{js/owlcarousel/LICENSE-MIT → vendors/owlcarousel/LICENSE} +0 -0
  28. includes/vendors/owlcarousel/README.md +158 -0
  29. includes/{js → vendors}/owlcarousel/assets/owl.carousel.css +82 -119
  30. includes/vendors/owlcarousel/assets/owl.carousel.min.css +1 -0
  31. includes/vendors/owlcarousel/assets/owl.theme.default.css +28 -0
  32. includes/{js → vendors}/owlcarousel/assets/owl.video.play.png +0 -0
  33. includes/{js/flexslider/images → vendors/owlcarousel/assets}/slide-arrow-left.png +0 -0
  34. includes/{js/flexslider/images → vendors/owlcarousel/assets}/slide-arrow-right.png +0 -0
  35. includes/{js → vendors}/owlcarousel/owl.carousel.js +1068 -989
  36. includes/vendors/owlcarousel/owl.carousel.min.js +2 -0
  37. readme.txt +13 -0
  38. wc-gallery.php +2 -2
README.md CHANGED
@@ -46,6 +46,19 @@ Insert a gallery through your dashboard. You will see extra dropdown settings wh
46
 
47
  ## Changelog ##
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  ### Version 1.40
50
 
51
  * Updated images loaded library to 3.1.8
46
 
47
  ## Changelog ##
48
 
49
+ ### Version 1.43
50
+
51
+ * Masonry gallery items now loads in series when each image is loaded
52
+ * Removed text from nav buttons in owl carousel.
53
+ * Moved flexslider and owl carousel to vendors folder
54
+ * Wait for images to load before calling flexslider.
55
+
56
+ ### Version 1.41
57
+
58
+ * Updated Owl Carousel
59
+ * Updated Flexslider
60
+ * Fixed bug with bottom image links not responding correctly on mobile devices
61
+
62
  ### Version 1.40
63
 
64
  * Updated images loaded library to 3.1.8
includes/css/style.css CHANGED
@@ -17,11 +17,9 @@
17
  overflow: hidden;
18
  }
19
  .wc-gallery .gallery.gallery-masonry {
20
- visibility: hidden;
21
  }
22
  .wc-gallery .gallery.gallery-masonry,
23
  .wc-gallery .gallery.gallery-default {
24
- /* margin-right: -5px; */
25
  }
26
 
27
  .wc-gallery .wc-gallery-bottomspace-default {
@@ -155,6 +153,9 @@
155
  body .wc-gallery .wc-image-links .gallery-caption {
156
  display: block;
157
  }
 
 
 
158
  }
159
  /**
160
  * Image Links
17
  overflow: hidden;
18
  }
19
  .wc-gallery .gallery.gallery-masonry {
 
20
  }
21
  .wc-gallery .gallery.gallery-masonry,
22
  .wc-gallery .gallery.gallery-default {
 
23
  }
24
 
25
  .wc-gallery .wc-gallery-bottomspace-default {
153
  body .wc-gallery .wc-image-links .gallery-caption {
154
  display: block;
155
  }
156
+ body .wc-gallery .wc-image-links-bottomlinks {
157
+ margin: 0;
158
+ }
159
  }
160
  /**
161
  * Image Links
includes/js/flexslider/README.mdown DELETED
@@ -1,144 +0,0 @@
1
- # FlexSlider 2
2
- http://www.woothemes.com/flexslider/ - Copyright (c) 2012 WooThemes
3
-
4
- ## Updates
5
-
6
- ** Version 2.2.0**
7
-
8
- - Fixed event handler conflicts with devices that are both click and touch enabled. e.g., Windows 8.
9
- - Made all slider variables public, stored in `slider.vars`. This allows manipulation of `slider.vars.minItems` and `slider.vars.maxItems` on the fly to create different fluid grids at certain breakpoints. [Check out this example demonstrating a basic technique](http://flexslider.woothemes.com/dynamic-carousel-min-max.html)
10
- - Fixed calculations that were causing strange issues with paging and certain FlexSliders to move out of alignment.
11
-
12
- *Be sure to test v2.2.0 with your current slider, before pushing live, to ensure everything is playing nicely.*
13
-
14
- -----
15
-
16
- ## General Notes
17
- FlexSlider is no longer licensed under the MIT license. FlexSlider now shares the common licensed used for all WooThemes themes, GPLv2.
18
-
19
- In an effort to move the plugin forward, support for jQuery 1.3.2 has been dropped. The plugin now requires jQuery 1.4.2+. If you don't have access to the later versions of jQuery, [FlexSlider 1.8](https://github.com/woothemes/FlexSlider/tree/flexslider1) should be a perfectly suitable substitute for your needs!
20
-
21
- Your old styles and properties *might not work out of the box*. Some property names have been changed, noted below, as well as namespacing prefixes being applied to all elements. This means that `.flex-direction-nav .next` is now `.flex-direction-nav .flex-next` by default. The namespacing property is exposed, free for you to change.
22
-
23
- No more overflow hidden woes! The plugin now generates a viewport element to handle the tedious task of working around overflow hidden. Yay!
24
-
25
- The slider element is now accessible outside of the callback API via the jQuery .data() method. Example use: `$('#slider').data('flexslider')`
26
-
27
- Helper strings have been added for performing actions quickly on FlexSlider elements. Example uses:
28
-
29
- - `$('#slider').flexslider("play") //Play slideshow`
30
- - `$('#slider').flexslider("pause") //Pause slideshow`
31
- - `$('#slider').flexslider("stop") //Stop slideshow`
32
- - `$('#slider').flexslider("next") //Go to next slide`
33
- - `$('#slider').flexslider("prev") //Go to previous slide`
34
- - `$('#slider').flexslider(3) //Go fourth slide`
35
-
36
- Two new methods are available for adding/removing slides, `slider.addSlide()` and `slider.removeSlide()`. More details about this coming soon.
37
-
38
- - `slider.addSlide(obj, pos)` accepts two parameters, a string/jQuery object and an index.
39
- - `slider.removeSlide(obj)` accepts one parameter, either an object to be removed, or an index.
40
-
41
- ## Examples
42
-
43
- - [Basic Slider](http://flexslider.woothemes.com/)
44
- - [Slider w/thumbnail controlNav pattern](http://flexslider.woothemes.com/thumbnail-controlnav.html)
45
- - [Slider w/thumbnail slider](http://flexslider.woothemes.com/thumbnail-slider.html)
46
- - [Basic Carousel](http://flexslider.woothemes.com/basic-carousel.html)
47
- - [Carousel with min and max ranges](http://flexslider.woothemes.com/carousel-min-max.html)
48
- - [Video with Vimeo API](http://flexslider.woothemes.com/video.html)
49
- - [Video with Wistia API](http://flexslider.woothemes.com/video-wistia.html)
50
-
51
-
52
- ## Properties
53
-
54
- ### namespace: *{new}*
55
- `namespace` controls the prefixes attached to elements created by the plugin. In previous releases, only certain elements were tagged with a prefix class, which was causing class generalization issues for some users. FlexSlider now prefixes all generated elements with the appropriate namespace.
56
-
57
- *Hint: `namespace` can be an empty string.*
58
-
59
- ### selector: *{new}*
60
- The markup structure for FlexSlider has been limited to a "ul.slide li" pattern in previous versions of FlexSlider; no longer. You can now take full control of the markup structure used for your FlexSlider. The `selector` pattern "{container} > {slide}" is mandatory, allowing the plugin to predictably interpret the selector property. Omitting the ">" from the selector is not suggested, but is possible if your markup doesn't follow the immediate descendant pattern.
61
-
62
- *Examples: "section > article", ".slides > .slide", "#hero .slide"*
63
-
64
- ### easing: *{new}*
65
- `easing` allows support for jQuery easing! Default options provided by jQuery are "swing" and "linear," but more can be used by included the jQuery Easing plugin. *If you chose a non-existent easing method, the slider will break.*
66
-
67
- *Note: You need to set `useCSS: false` to force transitions in browsers that support translate3d.*
68
- *Optional: [jQuery Easing Plugin](http://gsgd.co.uk/sandbox/jquery/easing/)*
69
-
70
- ### direction: *{changed}*
71
- Previously called "slideDirection" in v1.8 and below.
72
-
73
- ### reverse: *{new}*
74
- `reverse` will reverse the animation direction of the slider. Meaning, horizontal sliders can move from right to left, and vertical sliders can move bottom to top.
75
-
76
- ### smoothHeight: *{new}*
77
- `smoothHeight` allows for smooth height transitions between slides. This property currently works for the fade and horizontal slide animation. The property has no effect on horizontal sliding carousels, however.
78
-
79
- ### startAt: *{changed}*
80
- Previously called "slideToStart" in v1.8 and below.
81
-
82
- ### animationSpeed: *{changed}*
83
- Previously called "animationDuration" in v1.8 and below.
84
-
85
- ### initDelay: *{new}*
86
- `initDelay` will delay the initial slideshow of a slider, given in milliseconds. The slider will still initialize, generating controls and displaying the first image, but the slideshow will wait until the `initDelay` time has completed before starting the slideshow.
87
-
88
- ### useCSS: *{new}*
89
- `useCSS` allow users to override using CSS3 for animation. Translate3d still has numerous bugs that can crop up and wreak havoc, so this is a great property to play with if you are experiencing unexplainable issues in Webkit browsers.
90
-
91
- *Hint: Use conditionals to enable/disable the use of CSS3 on desktops and mobile devices. Mobile devices, in my experience, do not share many of the translate3d bugs seen on desktop browsers.*
92
-
93
- ### touch: *{new}*
94
- `touch` allows users to exclude touch swipe functionality from their sliders.
95
-
96
- ### keyboard: *{changed}*
97
- Previously called "keyboardNav" in v1.8 and below.
98
-
99
- ### multipleKeyboard *{new}*
100
- `multipleKeyboard` allows users to override the default plugin keyboard behavior, enabling keyboard control of more than one slider on the page. This means that all visible sliders will animate, at the same time, via keyboard input.
101
-
102
- *Hint: You can use `multipleKeyboard` to allow keyboard navigation on pages where multiple sliders are present, but only one is visible.*
103
-
104
- ### mousewheel: *{updated}*
105
- `mousewheel` now requires the jQuery Mousewheel plugin. There are a few reasons for this, but primarily because there is no need for FlexSlider itself to reinvent the awkward complexity of mousewheel interactivity that is handled perfectly by the Mousewheel plugin.
106
-
107
- *Required: [jQuery Mousewheel Plugin](https://github.com/brandonaaron/jquery-mousewheel)*
108
-
109
- ### controlsContainer: *{updated}*
110
- `controlsContainer` is one of the more painstaking, potentially confusing properties within FlexSlider. First, the property is no longer required to workaround `overflow: hidden` on slide animation. Second, the property now accepts a **jQuery object**, giving you precise control over the object you want. The plugin no longer attempts to guess what element you are selecting.
111
-
112
- ### sync: *{new}*
113
- `sync` is a new property that will allow other slider(s) to hook into the current slider via a given selector. The selector should describe an object that has already been initialized as a FlexSlider. Right now, `sync` will synchronize animation, play, and pause behaviors. More behaviors can be added in the future as the property matures.
114
-
115
- *[Example of sync being used](http://flex.madebymufffin.com/examples/basic-carousel.html)*
116
-
117
- ### asNavFor: *{new}*
118
- Description to be added.
119
-
120
- ### itemWidth: *{new}*
121
- `itemWidth` is the primary property for the new carousel options. Without this property, your slider is not considered a carousel. To use `itemWidth`, give an integer value of the width of your individual slides. This should include borders and paddings applied to your slides; a total width measurement.
122
-
123
- ### itemMargin: *{new}*
124
- `itemMargin` describes the gutter between the slide elements. If each slide has a margin-left of 10px, your itemMargin value would be 10. If elements have margin: 0 10px, your itemMargin would be 20.
125
-
126
- ### minItems: *{new}*
127
- `minItems` describes the minimum number of slide elements that should be visible in the carousel. When the slider reaches the minimum item count, the slides will resize fluidly with the slider.
128
-
129
- ### maxItems: *{new}*
130
- `maxItems` describes the maximum number of slide elements that should be visible in the carousel. When the slider reaches the maximum item count, the slides will resize fluidly with the sider.
131
-
132
- ### move: *{new}*
133
- `move` determines how many slides should be animated within the carousel. When left at 0, the slider will animate the number of visible slides. If any value greater than 0 is given, the slider will animate that number of slides in the carousel on each animation interval.
134
-
135
- *Hint: The move property will be ignored if the value is higher than the number of visible slides, which can be utilized in responsive design.*
136
-
137
- ### added: *{new}*
138
- `added()` is a new callback event fired in the new slider.addSlide() function.
139
-
140
- ### removed: *{new}*
141
- `removed()` is a new callback event fired in the new slider.removeSlide() function.
142
-
143
- ### allowOneSlide: *{new}*
144
- Boolean. Whether or not you'd like FlexSlider to initialize as usual if only one slide is present.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/js/flexslider/changelog.txt DELETED
@@ -1,4 +0,0 @@
1
- FLEXSLIDER CHANGELOG
2
-
3
- 2013.02.15 - Version 2.0
4
- * Added changelog.txt
 
 
 
 
includes/js/flexslider/flexslider.css DELETED
@@ -1,288 +0,0 @@
1
- /*
2
- * jQuery FlexSlider v2.4.0
3
- * http://www.woothemes.com/wcflexslider/
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
- * FONT-FACE
14
- * ====================================================================================================================*/
15
- /* @font-face {
16
- font-family: 'wcflexslider-icon';
17
- src: url('fonts/wcflexslider-icon.eot');
18
- src: url('fonts/wcflexslider-icon.eot?#iefix') format('embedded-opentype'), url('fonts/wcflexslider-icon.woff') format('woff'), url('fonts/wcflexslider-icon.ttf') format('truetype'), url('fonts/wcflexslider-icon.svg#wcflexslider-icon') format('svg');
19
- font-weight: normal;
20
- font-style: normal;
21
- } */
22
- /* ====================================================================================================================
23
- * RESETS
24
- * ====================================================================================================================*/
25
- .wcflex-container a:hover,
26
- .wcflex-slider a:hover,
27
- .wcflex-container a:focus,
28
- .wcflex-slider a:focus {
29
- outline: none;
30
- }
31
- .slides,
32
- .slides > li,
33
- .wcflex-control-nav,
34
- .wcflex-direction-nav {
35
- margin: 0;
36
- padding: 0;
37
- list-style: none;
38
- }
39
- .wcflex-pauseplay span {
40
- text-transform: capitalize;
41
- }
42
- /* ====================================================================================================================
43
- * BASE STYLES
44
- * ====================================================================================================================*/
45
- .wcflexslider {
46
- margin: 0;
47
- padding: 0;
48
- }
49
- .wcflexslider .slides > li {
50
- display: none;
51
- -webkit-backface-visibility: hidden;
52
- -moz-backface-visibility: hidden;
53
- backface-visibility: hidden;
54
- }
55
- .wcflexslider .slides > li.wcflex-slide-item.clone,
56
- .wcflexslider .slides > li.wcflex-active-slide {
57
- -webkit-backface-visibility: visible;
58
- -moz-backface-visibility: visible;
59
- backface-visibility: visible;
60
- }
61
- .wcflexslider .slides img {
62
- /* width: 100%; */
63
- display: block;
64
- margin-left: auto;
65
- margin-right: auto;
66
- }
67
- .wcflexslider .slides:after {
68
- /* content: "\0020"; [> not loading fonts <] */
69
- display: block;
70
- clear: both;
71
- visibility: hidden;
72
- line-height: 0;
73
- height: 0;
74
- }
75
- html[xmlns] .wcflexslider .slides {
76
- display: block;
77
- }
78
- * html .wcflexslider .slides {
79
- height: 1%;
80
- }
81
- .no-js .wcflexslider .slides > li:first-child {
82
- display: block;
83
- }
84
- /* ====================================================================================================================
85
- * DEFAULT THEME
86
- * ====================================================================================================================*/
87
- .wcflexslider {
88
- margin: 0 0 60px;
89
- background: #ffffff;
90
- border: 4px solid #ffffff;
91
- position: relative;
92
- zoom: 1;
93
- /* -webkit-border-radius: 4px; */
94
- /* -moz-border-radius: 4px; */
95
- /* border-radius: 4px; */
96
- /* -webkit-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); */
97
- /* -moz-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); */
98
- /* -o-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); */
99
- /* box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); */
100
- }
101
- .wcflexslider .slides {
102
- zoom: 1;
103
- }
104
- .wcflexslider .slides img {
105
- height: auto;
106
- }
107
- /* comment below except for max height if problems occur */
108
- .wcflex-viewport {
109
- height: 0;
110
- max-height: 2000px;
111
- -webkit-transition: all 0.6s ease;
112
- -moz-transition: all 0.6s ease;
113
- -ms-transition: all 0.6s ease;
114
- -o-transition: all 0.6s ease;
115
- transition: all 0.6s ease;
116
- }
117
- .loading .wcflex-viewport {
118
- max-height: 300px;
119
- }
120
- .carousel li {
121
- margin-right: 5px;
122
- }
123
- .wcflex-direction-nav {
124
- *height: 0;
125
- }
126
- .wcflex-direction-nav a {
127
- text-decoration: none;
128
- display: block;
129
- width: 50px;
130
- height: 50px;
131
- margin: -25px 0 0;
132
- position: absolute;
133
- top: 50%;
134
- z-index: 10;
135
- overflow: hidden;
136
- opacity: 0;
137
- cursor: pointer;
138
- color: rgba(0, 0, 0, 0.8); /* disable possibly */
139
- /* text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); */
140
- -webkit-transition: all 0.3s ease-in-out;
141
- -moz-transition: all 0.3s ease-in-out;
142
- -ms-transition: all 0.3s ease-in-out;
143
- -o-transition: all 0.3s ease-in-out;
144
- transition: all 0.3s ease-in-out;
145
- }
146
- /* .wcflex-direction-nav a:before {
147
- font-family: "wcflexslider-icon";
148
- font-size: 40px;
149
- display: inline-block;
150
- content: '\f001';
151
- color: rgba(0, 0, 0, 0.8);
152
- text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
153
- }
154
- .wcflex-direction-nav a.wcflex-next:before {
155
- content: '\f002';
156
- } */
157
- .wcflex-direction-nav .wcflex-prev {
158
- background: url("images/slide-arrow-left.png") no-repeat center center !important;
159
- left: 0;
160
- }
161
- .wcflex-direction-nav .wcflex-next {
162
- background: url("images/slide-arrow-right.png") no-repeat center center !important;
163
- right: 0;
164
- text-align: right;
165
- }
166
- .wcflexslider:hover .wcflex-direction-nav .wcflex-prev {
167
- opacity: 1;
168
- /* left: 10px; */
169
- }
170
- .wcflexslider:hover .wcflex-direction-nav .wcflex-prev:hover {
171
- /* opacity: 1; */
172
- }
173
- .wcflexslider:hover .wcflex-direction-nav .wcflex-next {
174
- opacity: 1;
175
- /* right: 10px; */
176
- }
177
- .wcflexslider:hover .wcflex-direction-nav .wcflex-next:hover {
178
- opacity: 1;
179
- }
180
- /* .wcflex-direction-nav .wcflex-disabled {
181
- opacity: 0!important;
182
- filter: alpha(opacity=0);
183
- cursor: default;
184
- } */
185
- /* .wcflex-pauseplay a {
186
- display: block;
187
- width: 20px;
188
- height: 20px;
189
- position: absolute;
190
- bottom: 5px;
191
- left: 10px;
192
- opacity: 0.8;
193
- z-index: 10;
194
- overflow: hidden;
195
- cursor: pointer;
196
- color: #000;
197
- }
198
- .wcflex-pauseplay a:before {
199
- font-family: "wcflexslider-icon";
200
- font-size: 20px;
201
- display: inline-block;
202
- content: '\f004';
203
- }
204
- .wcflex-pauseplay a:hover {
205
- opacity: 1;
206
- }
207
- .wcflex-pauseplay a .wcflex-play:before {
208
- content: '\f003';
209
- } */
210
- .wcflex-control-nav {
211
- width: 100%;
212
- position: absolute;
213
- bottom: -40px;
214
- text-align: center;
215
- }
216
- .wcflex-control-nav li {
217
- margin: 0 6px;
218
- display: inline-block;
219
- zoom: 1;
220
- *display: inline;
221
- }
222
- .wcflex-control-paging li a {
223
- width: 11px;
224
- height: 11px;
225
- display: block;
226
- background: #666;
227
- background: rgba(0, 0, 0, 0.5);
228
- cursor: pointer;
229
- text-indent: -9999px;
230
- /* -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); */
231
- /* -moz-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); */
232
- /* -o-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); */
233
- /* box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); */
234
- /* -webkit-border-radius: 20px; */
235
- /* -moz-border-radius: 20px; */
236
- /* border-radius: 20px; */
237
- }
238
- .wcflex-control-paging li a:hover {
239
- background: #333;
240
- background: rgba(0, 0, 0, 0.7);
241
- }
242
- .wcflex-control-paging li a.wcflex-active {
243
- background: #000;
244
- background: rgba(0, 0, 0, 0.9);
245
- cursor: default;
246
- }
247
- .wcflex-control-thumbs {
248
- margin: 5px 0 0;
249
- position: static;
250
- overflow: hidden;
251
- }
252
- .wcflex-control-thumbs li {
253
- width: 25%;
254
- float: left;
255
- margin: 0;
256
- }
257
- .wcflex-control-thumbs img {
258
- width: 100%;
259
- height: auto;
260
- display: block;
261
- opacity: .7;
262
- cursor: pointer;
263
- -webkit-transition: all 0.6s ease;
264
- -moz-transition: all 0.6s ease;
265
- -ms-transition: all 0.6s ease;
266
- -o-transition: all 0.6s ease;
267
- transition: all 0.6s ease;
268
- }
269
- .wcflex-control-thumbs img:hover {
270
- opacity: 1;
271
- }
272
- .wcflex-control-thumbs .wcflex-active {
273
- opacity: 1;
274
- cursor: default;
275
- }
276
- /* ====================================================================================================================
277
- * RESPONSIVE
278
- * ====================================================================================================================*/
279
- /* @media screen and (max-width: 860px) {
280
- .wcflex-direction-nav .wcflex-prev {
281
- opacity: 1;
282
- left: 10px;
283
- }
284
- .wcflex-direction-nav .wcflex-next {
285
- opacity: 1;
286
- right: 10px;
287
- }
288
- } */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/js/flexslider/fonts/flexslider-icon.eot DELETED
Binary file
includes/js/flexslider/fonts/flexslider-icon.svg DELETED
@@ -1,19 +0,0 @@
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>
5
- This is a custom SVG font generated by IcoMoon.
6
- <iconset grid="14"></iconset>
7
- </metadata>
8
- <defs>
9
- <font id="flexslider-icon" horiz-adv-x="448" >
10
- <font-face units-per-em="448" ascent="384" descent="-64" />
11
- <missing-glyph horiz-adv-x="448" />
12
- <glyph unicode="&#xf001;" d="M 185.50-9.25l-163.00,162.75q-9.25,9.25 -9.25,22.625t 9.25,22.625l 163.00,162.75q 9.25,9.25 22.625,9.25t 22.625-9.25l 18.75-18.75q 9.25-9.25 9.25-22.625t-9.25-22.625l-121.50-121.50l 121.50-121.25q 9.25-9.50 9.25-22.75t-9.25-22.50l-18.75-18.75q-9.25-9.25 -22.625-9.25t-22.625,9.25z" horiz-adv-x="288" />
13
- <glyph unicode="&#xf002;" d="M 274.75,176.00q0.00-13.00 -9.25-22.75l-163.00-162.75q-9.25-9.25 -22.50-9.25t-22.50,9.25l-19.00,18.75q-9.25,9.75 -9.25,22.75q0.00,13.25 9.25,22.50l 121.50,121.50l-121.50,121.25q-9.25,9.75 -9.25,22.75q0.00,13.25 9.25,22.50l 19.00,18.75q 9.00,9.50 22.50,9.50t 22.50-9.50l 163.00-162.75q 9.25-9.25 9.25-22.50z" horiz-adv-x="288" />
14
- <glyph unicode="&#xf003;" d="M 346.00,152.25l-332.00-184.50q-5.75-3.25 -9.875-0.75t-4.125,9.00l0.00,368.00 q0.00,6.50 4.125,9.00t 9.875-0.75l 332.00-184.50q 5.75-3.25 5.75-7.75t-5.75-7.75z" horiz-adv-x="352" />
15
- <glyph unicode="&#xf004;" d="M 384.00,336.00l0.00-352.00 q0.00-6.50 -4.75-11.25t-11.25-4.75l-128.00,0.00 q-6.50,0.00 -11.25,4.75t-4.75,11.25l0.00,352.00 q0.00,6.50 4.75,11.25t 11.25,4.75l 128.00,0.00 q 6.50,0.00 11.25-4.75t 4.75-11.25zM 160.00,336.00l0.00-352.00 q0.00-6.50 -4.75-11.25t-11.25-4.75l-128.00,0.00 q-6.50,0.00 -11.25,4.75t-4.75,11.25l0.00,352.00 q0.00,6.50 4.75,11.25t 11.25,4.75l 128.00,0.00 q 6.50,0.00 11.25-4.75t 4.75-11.25z" horiz-adv-x="384" />
16
- <glyph unicode="&#xf005;" d="M 402.75,208.00q0.00-13.25 -9.25-22.50l-162.75-162.75q-9.50-9.50 -22.75-9.50q-13.50,0.00 -22.50,9.50l-162.75,162.75q-9.50,9.00 -9.50,22.50q0.00,13.25 9.50,22.75l 18.50,18.75q 9.75,9.25 22.75,9.25q 13.25,0.00 22.50-9.25l 121.50-121.50l 121.50,121.50q 9.25,9.25 22.50,9.25q 13.00,0.00 22.75-9.25l 18.75-18.75q 9.25-9.75 9.25-22.75z" horiz-adv-x="416" />
17
- <glyph unicode="&#x20;" horiz-adv-x="224" />
18
- <glyph class="hidden" unicode="&#xf000;" d="M0,384L 448 -64L0 -64 z" horiz-adv-x="0" />
19
- </font></defs></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/js/flexslider/fonts/flexslider-icon.ttf DELETED
Binary file
includes/js/flexslider/fonts/flexslider-icon.woff DELETED
Binary file
includes/js/flexslider/images/bg_play_pause.png DELETED
Binary file
includes/js/flexslider/images/slide-arrows.png DELETED
Binary file
includes/js/flexslider/jquery.flexslider-min.js DELETED
@@ -1,5 +0,0 @@
1
- /*
2
- * jQuery FlexSlider v2.4.0
3
- * Copyright 2012 WooThemes
4
- * Contributing Author: Tyler Smith
5
- */(function(e){e.wcflexslider=function(t,n){var r=e(t);r.vars=e.extend({},e.wcflexslider.defaults,n);var i=r.vars.namespace,s=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,o=("ontouchstart"in window||s||window.DocumentTouch&&document instanceof DocumentTouch)&&r.vars.touch,u="click touchend MSPointerUp keyup",a="",f,l=r.vars.direction==="vertical",c=r.vars.reverse,h=r.vars.itemWidth>0,p=r.vars.animation==="fade",d=r.vars.asNavFor!=="",v={},m=!0;e.data(t,"wcflexslider",r);v={init:function(){r.animating=!1;r.currentSlide=parseInt(r.vars.startAt?r.vars.startAt:0,10);isNaN(r.currentSlide)&&(r.currentSlide=0);r.animatingTo=r.currentSlide;r.atEnd=r.currentSlide===0||r.currentSlide===r.last;r.containerSelector=r.vars.selector.substr(0,r.vars.selector.search(" "));r.slides=e(r.vars.selector,r);r.container=e(r.containerSelector,r);r.count=r.slides.length;r.syncExists=e(r.vars.sync).length>0;r.vars.animation==="slide"&&(r.vars.animation="swing");r.prop=l?"top":"marginLeft";r.args={};r.manualPause=!1;r.stopped=!1;r.started=!1;r.startTimeout=null;r.transitions=!r.vars.video&&!p&&r.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var n in t)if(e.style[t[n]]!==undefined){r.pfx=t[n].replace("Perspective","").toLowerCase();r.prop="-"+r.pfx+"-transform";return!0}return!1}();r.ensureAnimationEnd="";r.vars.controlsContainer!==""&&(r.controlsContainer=e(r.vars.controlsContainer).length>0&&e(r.vars.controlsContainer));r.vars.manualControls!==""&&(r.manualControls=e(r.vars.manualControls).length>0&&e(r.vars.manualControls));if(r.vars.randomize){r.slides.sort(function(){return Math.round(Math.random())-.5});r.container.empty().append(r.slides)}r.doMath();r.setup("init");r.vars.controlNav&&v.controlNav.setup();r.vars.directionNav&&v.directionNav.setup();r.vars.keyboard&&(e(r.containerSelector).length===1||r.vars.multipleKeyboard)&&e(document).bind("keyup",function(e){var t=e.keyCode;if(!r.animating&&(t===39||t===37)){var n=t===39?r.getTarget("next"):t===37?r.getTarget("prev"):!1;r.wcflexAnimate(n,r.vars.pauseOnAction)}});r.vars.mousewheel&&r.bind("mousewheel",function(e,t,n,i){e.preventDefault();var s=t<0?r.getTarget("next"):r.getTarget("prev");r.wcflexAnimate(s,r.vars.pauseOnAction)});r.vars.pausePlay&&v.pausePlay.setup();r.vars.slideshow&&r.vars.pauseInvisible&&v.pauseInvisible.init();if(r.vars.slideshow){r.vars.pauseOnHover&&r.hover(function(){!r.manualPlay&&!r.manualPause&&r.pause()},function(){!r.manualPause&&!r.manualPlay&&!r.stopped&&r.play()});if(!r.vars.pauseInvisible||!v.pauseInvisible.isHidden())r.vars.initDelay>0?r.startTimeout=setTimeout(r.play,r.vars.initDelay):r.play()}d&&v.asNav.setup();o&&r.vars.touch&&v.touch();(!p||p&&r.vars.smoothHeight)&&e(window).bind("resize orientationchange focus",v.resize);r.find("img").attr("draggable","false");setTimeout(function(){r.vars.start(r)},200)},asNav:{setup:function(){r.asNav=!0;r.animatingTo=Math.floor(r.currentSlide/r.move);r.currentItem=r.currentSlide;r.slides.removeClass(i+"active-slide").eq(r.currentItem).addClass(i+"active-slide");if(!s)r.slides.on(u,function(t){t.preventDefault();var n=e(this),s=n.index(),o=n.offset().left-e(r).scrollLeft();if(o<=0&&n.hasClass(i+"active-slide"))r.wcflexAnimate(r.getTarget("prev"),!0);else if(!e(r.vars.asNavFor).data("wcflexslider").animating&&!n.hasClass(i+"active-slide")){r.direction=r.currentItem<s?"next":"prev";r.wcflexAnimate(s,r.vars.pauseOnAction,!1,!0,!0)}});else{t._slider=r;r.slides.each(function(){var t=this;t._gesture=new MSGesture;t._gesture.target=t;t.addEventListener("MSPointerDown",function(e){e.preventDefault();e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1);t.addEventListener("MSGestureTap",function(t){t.preventDefault();var n=e(this),i=n.index();if(!e(r.vars.asNavFor).data("wcflexslider").animating&&!n.hasClass("active")){r.direction=r.currentItem<i?"next":"prev";r.wcflexAnimate(i,r.vars.pauseOnAction,!1,!0,!0)}})})}}},controlNav:{setup:function(){r.manualControls?v.controlNav.setupManual():v.controlNav.setupPaging()},setupPaging:function(){var t=r.vars.controlNav==="thumbnails"?"control-thumbs":"control-paging",n=1,s,o;r.controlNavScaffold=e('<ol class="'+i+"control-nav "+i+t+'"></ol>');if(r.pagingCount>1)for(var f=0;f<r.pagingCount;f++){o=r.slides.eq(f);s=r.vars.controlNav==="thumbnails"?'<img src="'+o.attr("data-thumb")+'"/>':"<a>"+n+"</a>";if("thumbnails"===r.vars.controlNav&&!0===r.vars.thumbCaptions){var l=o.attr("data-thumbcaption");""!=l&&undefined!=l&&(s+='<span class="'+i+'caption">'+l+"</span>")}r.controlNavScaffold.append("<li>"+s+"</li>");n++}r.controlsContainer?e(r.controlsContainer).append(r.controlNavScaffold):r.append(r.controlNavScaffold);v.controlNav.set();v.controlNav.active();r.controlNavScaffold.delegate("a, img",u,function(t){t.preventDefault();if(a===""||a===t.type){var n=e(this),s=r.controlNav.index(n);if(!n.hasClass(i+"active")){r.direction=s>r.currentSlide?"next":"prev";r.wcflexAnimate(s,r.vars.pauseOnAction)}}a===""&&(a=t.type);v.setToClearWatchedEvent()})},setupManual:function(){r.controlNav=r.manualControls;v.controlNav.active();r.controlNav.bind(u,function(t){t.preventDefault();if(a===""||a===t.type){var n=e(this),s=r.controlNav.index(n);if(!n.hasClass(i+"active")){s>r.currentSlide?r.direction="next":r.direction="prev";r.wcflexAnimate(s,r.vars.pauseOnAction)}}a===""&&(a=t.type);v.setToClearWatchedEvent()})},set:function(){var t=r.vars.controlNav==="thumbnails"?"img":"a";r.controlNav=e("."+i+"control-nav li "+t,r.controlsContainer?r.controlsContainer:r)},active:function(){r.controlNav.removeClass(i+"active").eq(r.animatingTo).addClass(i+"active")},update:function(t,n){r.pagingCount>1&&t==="add"?r.controlNavScaffold.append(e("<li><a>"+r.count+"</a></li>")):r.pagingCount===1?r.controlNavScaffold.find("li").remove():r.controlNav.eq(n).closest("li").remove();v.controlNav.set();r.pagingCount>1&&r.pagingCount!==r.controlNav.length?r.update(n,t):v.controlNav.active()}},directionNav:{setup:function(){var t=e('<ul class="'+i+'direction-nav"><li class="'+i+'nav-prev"><a class="'+i+'prev" href="#">'+r.vars.prevText+'</a></li><li class="'+i+'nav-next"><a class="'+i+'next" href="#">'+r.vars.nextText+"</a></li></ul>");if(r.controlsContainer){e(r.controlsContainer).append(t);r.directionNav=e("."+i+"direction-nav li a",r.controlsContainer)}else{r.append(t);r.directionNav=e("."+i+"direction-nav li a",r)}v.directionNav.update();r.directionNav.bind(u,function(t){t.preventDefault();var n;if(a===""||a===t.type){n=e(this).hasClass(i+"next")?r.getTarget("next"):r.getTarget("prev");r.wcflexAnimate(n,r.vars.pauseOnAction)}a===""&&(a=t.type);v.setToClearWatchedEvent()})},update:function(){var e=i+"disabled";r.pagingCount===1?r.directionNav.addClass(e).attr("tabindex","-1"):r.vars.animationLoop?r.directionNav.removeClass(e).removeAttr("tabindex"):r.animatingTo===0?r.directionNav.removeClass(e).filter("."+i+"prev").addClass(e).attr("tabindex","-1"):r.animatingTo===r.last?r.directionNav.removeClass(e).filter("."+i+"next").addClass(e).attr("tabindex","-1"):r.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=e('<div class="'+i+'pauseplay"><a></a></div>');if(r.controlsContainer){r.controlsContainer.append(t);r.pausePlay=e("."+i+"pauseplay a",r.controlsContainer)}else{r.append(t);r.pausePlay=e("."+i+"pauseplay a",r)}v.pausePlay.update(r.vars.slideshow?i+"pause":i+"play");r.pausePlay.bind(u,function(t){t.preventDefault();if(a===""||a===t.type)if(e(this).hasClass(i+"pause")){r.manualPause=!0;r.manualPlay=!1;r.pause()}else{r.manualPause=!1;r.manualPlay=!0;r.play()}a===""&&(a=t.type);v.setToClearWatchedEvent()})},update:function(e){e==="play"?r.pausePlay.removeClass(i+"pause").addClass(i+"play").html(r.vars.playText):r.pausePlay.removeClass(i+"play").addClass(i+"pause").html(r.vars.pauseText)}},touch:function(){var e,n,i,o,u,a,f=!1,d=0,v=0,m=0;if(!s){t.addEventListener("touchstart",g,!1);function g(s){if(r.animating)s.preventDefault();else if(window.navigator.msPointerEnabled||s.touches.length===1){r.pause();o=l?r.h:r.w;a=Number(new Date);d=s.touches[0].pageX;v=s.touches[0].pageY;i=h&&c&&r.animatingTo===r.last?0:h&&c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:h&&r.currentSlide===r.last?r.limit:h?(r.itemW+r.vars.itemMargin)*r.move*r.currentSlide:c?(r.last-r.currentSlide+r.cloneOffset)*o:(r.currentSlide+r.cloneOffset)*o;e=l?v:d;n=l?d:v;t.addEventListener("touchmove",y,!1);t.addEventListener("touchend",b,!1)}}function y(t){d=t.touches[0].pageX;v=t.touches[0].pageY;u=l?e-v:e-d;f=l?Math.abs(u)<Math.abs(d-n):Math.abs(u)<Math.abs(v-n);var s=500;if(!f||Number(new Date)-a>s){t.preventDefault();if(!p&&r.transitions){r.vars.animationLoop||(u/=r.currentSlide===0&&u<0||r.currentSlide===r.last&&u>0?Math.abs(u)/o+2:1);r.setProps(i+u,"setTouch")}}}function b(s){t.removeEventListener("touchmove",y,!1);if(r.animatingTo===r.currentSlide&&!f&&u!==null){var l=c?-u:u,h=l>0?r.getTarget("next"):r.getTarget("prev");r.canAdvance(h)&&(Number(new Date)-a<550&&Math.abs(l)>50||Math.abs(l)>o/2)?r.wcflexAnimate(h,r.vars.pauseOnAction):p||r.wcflexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)}t.removeEventListener("touchend",b,!1);e=null;n=null;u=null;i=null}}else{t.style.msTouchAction="none";t._gesture=new MSGesture;t._gesture.target=t;t.addEventListener("MSPointerDown",w,!1);t._slider=r;t.addEventListener("MSGestureChange",E,!1);t.addEventListener("MSGestureEnd",S,!1);function w(e){e.stopPropagation();if(r.animating)e.preventDefault();else{r.pause();t._gesture.addPointer(e.pointerId);m=0;o=l?r.h:r.w;a=Number(new Date);i=h&&c&&r.animatingTo===r.last?0:h&&c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:h&&r.currentSlide===r.last?r.limit:h?(r.itemW+r.vars.itemMargin)*r.move*r.currentSlide:c?(r.last-r.currentSlide+r.cloneOffset)*o:(r.currentSlide+r.cloneOffset)*o}}function E(e){e.stopPropagation();var n=e.target._slider;if(!n)return;var r=-e.translationX,s=-e.translationY;m+=l?s:r;u=m;f=l?Math.abs(m)<Math.abs(-r):Math.abs(m)<Math.abs(-s);if(e.detail===e.MSGESTURE_FLAG_INERTIA){setImmediate(function(){t._gesture.stop()});return}if(!f||Number(new Date)-a>500){e.preventDefault();if(!p&&n.transitions){n.vars.animationLoop||(u=m/(n.currentSlide===0&&m<0||n.currentSlide===n.last&&m>0?Math.abs(m)/o+2:1));n.setProps(i+u,"setTouch")}}}function S(t){t.stopPropagation();var r=t.target._slider;if(!r)return;if(r.animatingTo===r.currentSlide&&!f&&u!==null){var s=c?-u:u,l=s>0?r.getTarget("next"):r.getTarget("prev");r.canAdvance(l)&&(Number(new Date)-a<550&&Math.abs(s)>50||Math.abs(s)>o/2)?r.wcflexAnimate(l,r.vars.pauseOnAction):p||r.wcflexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)}e=null;n=null;u=null;i=null;m=0}}},resize:function(){if(!r.animating&&r.is(":visible")){h||r.doMath();if(p)v.smoothHeight();else if(h){r.slides.width(r.computedW);r.update(r.pagingCount);r.setProps()}else if(l){r.viewport.height(r.h);r.setProps(r.h,"setTotal")}else{r.vars.smoothHeight&&v.smoothHeight();r.newSlides.width(r.computedW);r.setProps(r.computedW,"setTotal")}}},smoothHeight:function(e){if(!l||p){var t=r.viewport;t.height(r.slides.eq(r.animatingTo).height())}},sync:function(t){var n=e(r.vars.sync).data("wcflexslider"),i=r.animatingTo;switch(t){case"animate":n.wcflexAnimate(i,r.vars.pauseOnAction,!1,!0);break;case"play":!n.playing&&!n.asNav&&n.play();break;case"pause":n.pause()}},uniqueID:function(t){t.filter("[id]").add(t.find("[id]")).each(function(){var t=e(this);t.attr("id",t.attr("id")+"_clone")});return t},pauseInvisible:{visProp:null,init:function(){var e=v.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){v.pauseInvisible.isHidden()?r.startTimeout?clearTimeout(r.startTimeout):r.pause():r.started?r.play():r.vars.initDelay>0?setTimeout(r.play,r.vars.initDelay):r.play()})}},isHidden:function(){var e=v.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(f);f=setTimeout(function(){a=""},3e3)}};r.wcflexAnimate=function(t,n,s,u,a){!r.vars.animationLoop&&t!==r.currentSlide&&(r.direction=t>r.currentSlide?"next":"prev");d&&r.pagingCount===1&&(r.direction=r.currentItem<t?"next":"prev");if(!r.animating&&(r.canAdvance(t,a)||s)&&r.is(":visible")){if(d&&u){var f=e(r.vars.asNavFor).data("wcflexslider");r.atEnd=t===0||t===r.count-1;f.wcflexAnimate(t,!0,!1,!0,a);r.direction=r.currentItem<t?"next":"prev";f.direction=r.direction;if(Math.ceil((t+1)/r.visible)-1===r.currentSlide||t===0){r.currentItem=t;r.slides.removeClass(i+"active-slide").eq(t).addClass(i+"active-slide");return!1}r.currentItem=t;r.slides.removeClass(i+"active-slide").eq(t).addClass(i+"active-slide");t=Math.floor(t/r.visible)}r.animating=!0;r.animatingTo=t;n&&r.pause();r.vars.before(r);r.syncExists&&!a&&v.sync("animate");r.vars.controlNav&&v.controlNav.active();h||r.slides.removeClass(i+"active-slide").eq(t).addClass(i+"active-slide");r.atEnd=t===0||t===r.last;r.vars.directionNav&&v.directionNav.update();if(t===r.last){r.vars.end(r);r.vars.animationLoop||r.pause()}if(!p){var m=l?r.slides.filter(":first").height():r.computedW,g,y,b;if(h){g=r.vars.itemMargin;b=(r.itemW+g)*r.move*r.animatingTo;y=b>r.limit&&r.visible!==1?r.limit:b}else r.currentSlide===0&&t===r.count-1&&r.vars.animationLoop&&r.direction!=="next"?y=c?(r.count+r.cloneOffset)*m:0:r.currentSlide===r.last&&t===0&&r.vars.animationLoop&&r.direction!=="prev"?y=c?0:(r.count+1)*m:y=c?(r.count-1-t+r.cloneOffset)*m:(t+r.cloneOffset)*m;r.setProps(y,"",r.vars.animationSpeed);if(r.transitions){if(!r.vars.animationLoop||!r.atEnd){r.animating=!1;r.currentSlide=r.animatingTo}r.container.unbind("webkitTransitionEnd transitionend");r.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(r.ensureAnimationEnd);r.wrapup(m)});clearTimeout(r.ensureAnimationEnd);r.ensureAnimationEnd=setTimeout(function(){r.wrapup(m)},r.vars.animationSpeed+100)}else r.container.animate(r.args,r.vars.animationSpeed,r.vars.easing,function(){r.wrapup(m)})}else if(!o){r.slides.eq(r.currentSlide).css({zIndex:1}).animate({opacity:0},r.vars.animationSpeed,r.vars.easing);r.slides.eq(t).css({zIndex:2}).animate({opacity:1},r.vars.animationSpeed,r.vars.easing,r.wrapup)}else{r.slides.eq(r.currentSlide).css({opacity:0,zIndex:1});r.slides.eq(t).css({opacity:1,zIndex:2});r.wrapup(m)}r.vars.smoothHeight&&v.smoothHeight(r.vars.animationSpeed)}};r.wrapup=function(e){!p&&!h&&(r.currentSlide===0&&r.animatingTo===r.last&&r.vars.animationLoop?r.setProps(e,"jumpEnd"):r.currentSlide===r.last&&r.animatingTo===0&&r.vars.animationLoop&&r.setProps(e,"jumpStart"));r.animating=!1;r.currentSlide=r.animatingTo;r.vars.after(r)};r.animateSlides=function(){!r.animating&&m&&r.wcflexAnimate(r.getTarget("next"))};r.pause=function(){clearInterval(r.animatedSlides);r.animatedSlides=null;r.playing=!1;r.vars.pausePlay&&v.pausePlay.update("play");r.syncExists&&v.sync("pause")};r.play=function(){r.playing&&clearInterval(r.animatedSlides);r.animatedSlides=r.animatedSlides||setInterval(r.animateSlides,r.vars.slideshowSpeed);r.started=r.playing=!0;r.vars.pausePlay&&v.pausePlay.update("pause");r.syncExists&&v.sync("play")};r.stop=function(){r.pause();r.stopped=!0};r.canAdvance=function(e,t){var n=d?r.pagingCount-1:r.last;return t?!0:d&&r.currentItem===r.count-1&&e===0&&r.direction==="prev"?!0:d&&r.currentItem===0&&e===r.pagingCount-1&&r.direction!=="next"?!1:e===r.currentSlide&&!d?!1:r.vars.animationLoop?!0:r.atEnd&&r.currentSlide===0&&e===n&&r.direction!=="next"?!1:r.atEnd&&r.currentSlide===n&&e===0&&r.direction==="next"?!1:!0};r.getTarget=function(e){r.direction=e;return e==="next"?r.currentSlide===r.last?0:r.currentSlide+1:r.currentSlide===0?r.last:r.currentSlide-1};r.setProps=function(e,t,n){var i=function(){var n=e?e:(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo,i=function(){if(h)return t==="setTouch"?e:c&&r.animatingTo===r.last?0:c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:r.animatingTo===r.last?r.limit:n;switch(t){case"setTotal":return c?(r.count-1-r.currentSlide+r.cloneOffset)*e:(r.currentSlide+r.cloneOffset)*e;case"setTouch":return c?e:e;case"jumpEnd":return c?e:r.count*e;case"jumpStart":return c?r.count*e:e;default:return e}}();return i*-1+"px"}();if(r.transitions){i=l?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)";n=n!==undefined?n/1e3+"s":"0s";r.container.css("-"+r.pfx+"-transition-duration",n);r.container.css("transition-duration",n)}r.args[r.prop]=i;(r.transitions||n===undefined)&&r.container.css(r.args);r.container.css("transform",i)};r.setup=function(t){if(!p){var n,s;if(t==="init"){r.viewport=e('<div class="'+i+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(r).append(r.container);r.cloneCount=0;r.cloneOffset=0;if(c){s=e.makeArray(r.slides).reverse();r.slides=e(s);r.container.empty().append(r.slides)}}if(r.vars.animationLoop&&!h){r.cloneCount=2;r.cloneOffset=1;t!=="init"&&r.container.find(".clone").remove();r.container.append(v.uniqueID(r.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(v.uniqueID(r.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))}r.newSlides=e(r.vars.selector,r);n=c?r.count-1-r.currentSlide+r.cloneOffset:r.currentSlide+r.cloneOffset;if(l&&!h){r.container.height((r.count+r.cloneCount)*200+"%").css("position","absolute").width("100%");setTimeout(function(){r.newSlides.css({display:"block"});r.doMath();r.viewport.height(r.h);r.setProps(n*r.h,"init")},t==="init"?100:0)}else{r.container.width((r.count+r.cloneCount)*200+"%");r.setProps(n*r.computedW,"init");setTimeout(function(){r.doMath();r.newSlides.css({width:r.computedW,"float":"left",display:"block"});r.vars.smoothHeight&&v.smoothHeight()},t==="init"?100:0)}}else{r.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"});if(t==="init"){r.viewport=e('<div class="'+i+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(r).append(r.container);o?r.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+r.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(r.currentSlide).css({opacity:1,zIndex:2}):r.vars.fadeFirstSlide==0?r.slides.css({opacity:0,display:"block",zIndex:1}).eq(r.currentSlide).css({zIndex:2}).css({opacity:1}):r.slides.css({opacity:0,display:"block",zIndex:1}).eq(r.currentSlide).css({zIndex:2}).animate({opacity:1},r.vars.animationSpeed,r.vars.easing)}r.vars.smoothHeight&&v.smoothHeight()}h||r.slides.removeClass(i+"active-slide").eq(r.currentSlide).addClass(i+"active-slide");r.vars.init(r)};r.doMath=function(){var e=r.slides.first(),t=r.vars.itemMargin,n=r.vars.minItems,i=r.vars.maxItems;r.w=r.viewport===undefined?r.width():r.viewport.width();r.h=e.height();r.boxPadding=e.outerWidth()-e.width();if(h){r.itemT=r.vars.itemWidth+t;r.minW=n?n*r.itemT:r.w;r.maxW=i?i*r.itemT-t:r.w;r.itemW=r.minW>r.w?(r.w-t*(n-1))/n:r.maxW<r.w?(r.w-t*(i-1))/i:r.vars.itemWidth>r.w?r.w:r.vars.itemWidth;r.visible=Math.floor(r.w/r.itemW);r.move=r.vars.move>0&&r.vars.move<r.visible?r.vars.move:r.visible;r.pagingCount=Math.ceil((r.count-r.visible)/r.move+1);r.last=r.pagingCount-1;r.limit=r.pagingCount===1?0:r.vars.itemWidth>r.w?r.itemW*(r.count-1)+t*(r.count-1):(r.itemW+t)*r.count-r.w-t}else{r.itemW=r.w;r.pagingCount=r.count;r.last=r.count-1}r.computedW=r.itemW-r.boxPadding};r.update=function(e,t){r.doMath();if(!h){e<r.currentSlide?r.currentSlide+=1:e<=r.currentSlide&&e!==0&&(r.currentSlide-=1);r.animatingTo=r.currentSlide}if(r.vars.controlNav&&!r.manualControls)if(t==="add"&&!h||r.pagingCount>r.controlNav.length)v.controlNav.update("add");else if(t==="remove"&&!h||r.pagingCount<r.controlNav.length){if(h&&r.currentSlide>r.last){r.currentSlide-=1;r.animatingTo-=1}v.controlNav.update("remove",r.last)}r.vars.directionNav&&v.directionNav.update()};r.addSlide=function(t,n){var i=e(t);r.count+=1;r.last=r.count-1;l&&c?n!==undefined?r.slides.eq(r.count-n).after(i):r.container.prepend(i):n!==undefined?r.slides.eq(n).before(i):r.container.append(i);r.update(n,"add");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.added(r)};r.removeSlide=function(t){var n=isNaN(t)?r.slides.index(e(t)):t;r.count-=1;r.last=r.count-1;isNaN(t)?e(t,r.slides).remove():l&&c?r.slides.eq(r.last).remove():r.slides.eq(t).remove();r.doMath();r.update(n,"remove");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.removed(r)};v.init()};e(window).blur(function(e){focused=!1}).focus(function(e){focused=!0});e.wcflexslider.defaults={namespace:"wcflex-",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:"",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(){}};e.fn.wcflexslider=function(t){t===undefined&&(t={});if(typeof t=="object")return this.each(function(){var n=e(this),r=t.selector?t.selector:".slides > li",i=n.find(r);if(i.length===1&&t.allowOneSlide===!0||i.length===0){i.fadeIn(400);t.start&&t.start(n)}else n.data("wcflexslider")===undefined&&new e.wcflexslider(this,t)});var n=e(this).data("wcflexslider");switch(t){case"play":n.play();break;case"pause":n.pause();break;case"stop":n.stop();break;case"next":n.wcflexAnimate(n.getTarget("next"),!0);break;case"prev":case"previous":n.wcflexAnimate(n.getTarget("prev"),!0);break;default:typeof t=="number"&&n.wcflexAnimate(t,!0)}}})(jQuery);
 
 
 
 
 
includes/js/flexslider/jquery.flexslider.js DELETED
@@ -1,1183 +0,0 @@
1
- /*
2
- * jQuery FlexSlider v2.4.0
3
- * Copyright 2012 WooThemes
4
- * Contributing Author: Tyler Smith
5
- */
6
- ;
7
- (function ($) {
8
-
9
- //FlexSlider: Object Instance
10
- $.wcflexslider = function(el, options) {
11
- var slider = $(el);
12
-
13
- // making variables public
14
- slider.vars = $.extend({}, $.wcflexslider.defaults, options);
15
-
16
- var namespace = slider.vars.namespace,
17
- msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
18
- touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch,
19
- // depricating this idea, as devices are being released with both of these events
20
- //eventType = (touch) ? "touchend" : "click",
21
- eventType = "click touchend MSPointerUp keyup",
22
- watchedEvent = "",
23
- watchedEventClearTimer,
24
- vertical = slider.vars.direction === "vertical",
25
- reverse = slider.vars.reverse,
26
- carousel = (slider.vars.itemWidth > 0),
27
- fade = slider.vars.animation === "fade",
28
- asNav = slider.vars.asNavFor !== "",
29
- methods = {},
30
- focused = true;
31
-
32
- // Store a reference to the slider object
33
- $.data(el, "wcflexslider", 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
- // RANDOMIZE:
80
- if (slider.vars.randomize) {
81
- slider.slides.sort(function() { return (Math.round(Math.random())-0.5); });
82
- slider.container.empty().append(slider.slides);
83
- }
84
-
85
- slider.doMath();
86
-
87
- // INIT
88
- slider.setup("init");
89
-
90
- // CONTROLNAV:
91
- if (slider.vars.controlNav) { methods.controlNav.setup(); }
92
-
93
- // DIRECTIONNAV:
94
- if (slider.vars.directionNav) { methods.directionNav.setup(); }
95
-
96
- // KEYBOARD:
97
- if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) {
98
- $(document).bind('keyup', function(event) {
99
- var keycode = event.keyCode;
100
- if (!slider.animating && (keycode === 39 || keycode === 37)) {
101
- var target = (keycode === 39) ? slider.getTarget('next') :
102
- (keycode === 37) ? slider.getTarget('prev') : false;
103
- slider.wcflexAnimate(target, slider.vars.pauseOnAction);
104
- }
105
- });
106
- }
107
- // MOUSEWHEEL:
108
- if (slider.vars.mousewheel) {
109
- slider.bind('mousewheel', function(event, delta, deltaX, deltaY) {
110
- event.preventDefault();
111
- var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev');
112
- slider.wcflexAnimate(target, slider.vars.pauseOnAction);
113
- });
114
- }
115
-
116
- // PAUSEPLAY
117
- if (slider.vars.pausePlay) { methods.pausePlay.setup(); }
118
-
119
- //PAUSE WHEN INVISIBLE
120
- if (slider.vars.slideshow && slider.vars.pauseInvisible) { methods.pauseInvisible.init(); }
121
-
122
- // SLIDSESHOW
123
- if (slider.vars.slideshow) {
124
- if (slider.vars.pauseOnHover) {
125
- slider.hover(function() {
126
- if (!slider.manualPlay && !slider.manualPause) { slider.pause(); }
127
- }, function() {
128
- if (!slider.manualPause && !slider.manualPlay && !slider.stopped) { slider.play(); }
129
- });
130
- }
131
- // initialize animation
132
- //If we're visible, or we don't use PageVisibility API
133
- if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) {
134
- (slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play();
135
- }
136
- }
137
-
138
- // ASNAV:
139
- if (asNav) { methods.asNav.setup(); }
140
-
141
- // TOUCH
142
- if (touch && slider.vars.touch) { methods.touch(); }
143
-
144
- // FADE&&SMOOTHHEIGHT || SLIDE:
145
- if (!fade || (fade && slider.vars.smoothHeight)) { $(window).bind("resize orientationchange focus", methods.resize); }
146
-
147
- slider.find("img").attr("draggable", "false");
148
-
149
- // API: start() Callback
150
- setTimeout(function(){
151
- slider.vars.start(slider);
152
- }, 200);
153
- },
154
- asNav: {
155
- setup: function() {
156
- slider.asNav = true;
157
- slider.animatingTo = Math.floor(slider.currentSlide/slider.move);
158
- slider.currentItem = slider.currentSlide;
159
- slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
160
- if(!msGesture){
161
- slider.slides.on(eventType, function(e){
162
- e.preventDefault();
163
- var $slide = $(this),
164
- target = $slide.index();
165
- var posFromLeft = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container
166
- if( posFromLeft <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) {
167
- slider.wcflexAnimate(slider.getTarget("prev"), true);
168
- } else if (!$(slider.vars.asNavFor).data('wcflexslider').animating && !$slide.hasClass(namespace + "active-slide")) {
169
- slider.direction = (slider.currentItem < target) ? "next" : "prev";
170
- slider.wcflexAnimate(target, slider.vars.pauseOnAction, false, true, true);
171
- }
172
- });
173
- }else{
174
- el._slider = slider;
175
- slider.slides.each(function (){
176
- var that = this;
177
- that._gesture = new MSGesture();
178
- that._gesture.target = that;
179
- that.addEventListener("MSPointerDown", function (e){
180
- e.preventDefault();
181
- if(e.currentTarget._gesture) {
182
- e.currentTarget._gesture.addPointer(e.pointerId);
183
- }
184
- }, false);
185
- that.addEventListener("MSGestureTap", function (e){
186
- e.preventDefault();
187
- var $slide = $(this),
188
- target = $slide.index();
189
- if (!$(slider.vars.asNavFor).data('wcflexslider').animating && !$slide.hasClass('active')) {
190
- slider.direction = (slider.currentItem < target) ? "next" : "prev";
191
- slider.wcflexAnimate(target, slider.vars.pauseOnAction, false, true, true);
192
- }
193
- });
194
- });
195
- }
196
- }
197
- },
198
- controlNav: {
199
- setup: function() {
200
- if (!slider.manualControls) {
201
- methods.controlNav.setupPaging();
202
- } else { // MANUALCONTROLS:
203
- methods.controlNav.setupManual();
204
- }
205
- },
206
- setupPaging: function() {
207
- var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging',
208
- j = 1,
209
- item,
210
- slide;
211
-
212
- slider.controlNavScaffold = $('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>');
213
-
214
- if (slider.pagingCount > 1) {
215
- for (var i = 0; i < slider.pagingCount; i++) {
216
- slide = slider.slides.eq(i);
217
- item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"/>' : '<a>' + j + '</a>';
218
- if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
219
- var captn = slide.attr( 'data-thumbcaption' );
220
- if ( '' != captn && undefined != captn ) { item += '<span class="' + namespace + 'caption">' + captn + '</span>'; }
221
- }
222
- slider.controlNavScaffold.append('<li>' + item + '</li>');
223
- j++;
224
- }
225
- }
226
-
227
- // CONTROLSCONTAINER:
228
- (slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold);
229
- methods.controlNav.set();
230
-
231
- methods.controlNav.active();
232
-
233
- slider.controlNavScaffold.delegate('a, img', eventType, function(event) {
234
- event.preventDefault();
235
-
236
- if (watchedEvent === "" || watchedEvent === event.type) {
237
- var $this = $(this),
238
- target = slider.controlNav.index($this);
239
-
240
- if (!$this.hasClass(namespace + 'active')) {
241
- slider.direction = (target > slider.currentSlide) ? "next" : "prev";
242
- slider.wcflexAnimate(target, slider.vars.pauseOnAction);
243
- }
244
- }
245
-
246
- // setup flags to prevent event duplication
247
- if (watchedEvent === "") {
248
- watchedEvent = event.type;
249
- }
250
- methods.setToClearWatchedEvent();
251
-
252
- });
253
- },
254
- setupManual: function() {
255
- slider.controlNav = slider.manualControls;
256
- methods.controlNav.active();
257
-
258
- slider.controlNav.bind(eventType, function(event) {
259
- event.preventDefault();
260
-
261
- if (watchedEvent === "" || watchedEvent === event.type) {
262
- var $this = $(this),
263
- target = slider.controlNav.index($this);
264
-
265
- if (!$this.hasClass(namespace + 'active')) {
266
- (target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
267
- slider.wcflexAnimate(target, slider.vars.pauseOnAction);
268
- }
269
- }
270
-
271
- // setup flags to prevent event duplication
272
- if (watchedEvent === "") {
273
- watchedEvent = event.type;
274
- }
275
- methods.setToClearWatchedEvent();
276
- });
277
- },
278
- set: function() {
279
- var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a';
280
- slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider);
281
- },
282
- active: function() {
283
- slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
284
- },
285
- update: function(action, pos) {
286
- if (slider.pagingCount > 1 && action === "add") {
287
- slider.controlNavScaffold.append($('<li><a>' + slider.count + '</a></li>'));
288
- } else if (slider.pagingCount === 1) {
289
- slider.controlNavScaffold.find('li').remove();
290
- } else {
291
- slider.controlNav.eq(pos).closest('li').remove();
292
- }
293
- methods.controlNav.set();
294
- (slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
295
- }
296
- },
297
- directionNav: {
298
- setup: function() {
299
- 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>');
300
-
301
- // CONTROLSCONTAINER:
302
- if (slider.controlsContainer) {
303
- $(slider.controlsContainer).append(directionNavScaffold);
304
- slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer);
305
- } else {
306
- slider.append(directionNavScaffold);
307
- slider.directionNav = $('.' + namespace + 'direction-nav li a', slider);
308
- }
309
-
310
- methods.directionNav.update();
311
-
312
- slider.directionNav.bind(eventType, function(event) {
313
- event.preventDefault();
314
- var target;
315
-
316
- if (watchedEvent === "" || watchedEvent === event.type) {
317
- target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev');
318
- slider.wcflexAnimate(target, slider.vars.pauseOnAction);
319
- }
320
-
321
- // setup flags to prevent event duplication
322
- if (watchedEvent === "") {
323
- watchedEvent = event.type;
324
- }
325
- methods.setToClearWatchedEvent();
326
- });
327
- },
328
- update: function() {
329
- var disabledClass = namespace + 'disabled';
330
- if (slider.pagingCount === 1) {
331
- slider.directionNav.addClass(disabledClass).attr('tabindex', '-1');
332
- } else if (!slider.vars.animationLoop) {
333
- if (slider.animatingTo === 0) {
334
- slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1');
335
- } else if (slider.animatingTo === slider.last) {
336
- slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1');
337
- } else {
338
- slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
339
- }
340
- } else {
341
- slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
342
- }
343
- }
344
- },
345
- pausePlay: {
346
- setup: function() {
347
- var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a></a></div>');
348
-
349
- // CONTROLSCONTAINER:
350
- if (slider.controlsContainer) {
351
- slider.controlsContainer.append(pausePlayScaffold);
352
- slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer);
353
- } else {
354
- slider.append(pausePlayScaffold);
355
- slider.pausePlay = $('.' + namespace + 'pauseplay a', slider);
356
- }
357
-
358
- methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play');
359
-
360
- slider.pausePlay.bind(eventType, function(event) {
361
- event.preventDefault();
362
-
363
- if (watchedEvent === "" || watchedEvent === event.type) {
364
- if ($(this).hasClass(namespace + 'pause')) {
365
- slider.manualPause = true;
366
- slider.manualPlay = false;
367
- slider.pause();
368
- } else {
369
- slider.manualPause = false;
370
- slider.manualPlay = true;
371
- slider.play();
372
- }
373
- }
374
-
375
- // setup flags to prevent event duplication
376
- if (watchedEvent === "") {
377
- watchedEvent = event.type;
378
- }
379
- methods.setToClearWatchedEvent();
380
- });
381
- },
382
- update: function(state) {
383
- (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);
384
- }
385
- },
386
- touch: function() {
387
- var startX,
388
- startY,
389
- offset,
390
- cwidth,
391
- dx,
392
- startT,
393
- scrolling = false,
394
- localX = 0,
395
- localY = 0,
396
- accDx = 0;
397
-
398
- if(!msGesture){
399
- el.addEventListener('touchstart', onTouchStart, false);
400
-
401
- function onTouchStart(e) {
402
- if (slider.animating) {
403
- e.preventDefault();
404
- } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
405
- slider.pause();
406
- // CAROUSEL:
407
- cwidth = (vertical) ? slider.h : slider. w;
408
- startT = Number(new Date());
409
- // CAROUSEL:
410
-
411
- // Local vars for X and Y points.
412
- localX = e.touches[0].pageX;
413
- localY = e.touches[0].pageY;
414
-
415
- offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
416
- (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
417
- (carousel && slider.currentSlide === slider.last) ? slider.limit :
418
- (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
419
- (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
420
- startX = (vertical) ? localY : localX;
421
- startY = (vertical) ? localX : localY;
422
-
423
- el.addEventListener('touchmove', onTouchMove, false);
424
- el.addEventListener('touchend', onTouchEnd, false);
425
- }
426
- }
427
-
428
- function onTouchMove(e) {
429
- // Local vars for X and Y points.
430
-
431
- localX = e.touches[0].pageX;
432
- localY = e.touches[0].pageY;
433
-
434
- dx = (vertical) ? startX - localY : startX - localX;
435
- scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY));
436
-
437
- var fxms = 500;
438
-
439
- if ( ! scrolling || Number( new Date() ) - startT > fxms ) {
440
- e.preventDefault();
441
- if (!fade && slider.transitions) {
442
- if (!slider.vars.animationLoop) {
443
- dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
444
- }
445
- slider.setProps(offset + dx, "setTouch");
446
- }
447
- }
448
- }
449
-
450
- function onTouchEnd(e) {
451
- // finish the touch by undoing the touch session
452
- el.removeEventListener('touchmove', onTouchMove, false);
453
-
454
- if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
455
- var updateDx = (reverse) ? -dx : dx,
456
- target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
457
-
458
- if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
459
- slider.wcflexAnimate(target, slider.vars.pauseOnAction);
460
- } else {
461
- if (!fade) { slider.wcflexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
462
- }
463
- }
464
- el.removeEventListener('touchend', onTouchEnd, false);
465
-
466
- startX = null;
467
- startY = null;
468
- dx = null;
469
- offset = null;
470
- }
471
- }else{
472
- el.style.msTouchAction = "none";
473
- el._gesture = new MSGesture();
474
- el._gesture.target = el;
475
- el.addEventListener("MSPointerDown", onMSPointerDown, false);
476
- el._slider = slider;
477
- el.addEventListener("MSGestureChange", onMSGestureChange, false);
478
- el.addEventListener("MSGestureEnd", onMSGestureEnd, false);
479
-
480
- function onMSPointerDown(e){
481
- e.stopPropagation();
482
- if (slider.animating) {
483
- e.preventDefault();
484
- }else{
485
- slider.pause();
486
- el._gesture.addPointer(e.pointerId);
487
- accDx = 0;
488
- cwidth = (vertical) ? slider.h : slider. w;
489
- startT = Number(new Date());
490
- // CAROUSEL:
491
-
492
- offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
493
- (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
494
- (carousel && slider.currentSlide === slider.last) ? slider.limit :
495
- (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
496
- (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
497
- }
498
- }
499
-
500
- function onMSGestureChange(e) {
501
- e.stopPropagation();
502
- var slider = e.target._slider;
503
- if(!slider){
504
- return;
505
- }
506
- var transX = -e.translationX,
507
- transY = -e.translationY;
508
-
509
- //Accumulate translations.
510
- accDx = accDx + ((vertical) ? transY : transX);
511
- dx = accDx;
512
- scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY));
513
-
514
- if(e.detail === e.MSGESTURE_FLAG_INERTIA){
515
- setImmediate(function (){
516
- el._gesture.stop();
517
- });
518
-
519
- return;
520
- }
521
-
522
- if (!scrolling || Number(new Date()) - startT > 500) {
523
- e.preventDefault();
524
- if (!fade && slider.transitions) {
525
- if (!slider.vars.animationLoop) {
526
- dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1);
527
- }
528
- slider.setProps(offset + dx, "setTouch");
529
- }
530
- }
531
- }
532
-
533
- function onMSGestureEnd(e) {
534
- e.stopPropagation();
535
- var slider = e.target._slider;
536
- if(!slider){
537
- return;
538
- }
539
- if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
540
- var updateDx = (reverse) ? -dx : dx,
541
- target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
542
-
543
- if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
544
- slider.wcflexAnimate(target, slider.vars.pauseOnAction);
545
- } else {
546
- if (!fade) { slider.wcflexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
547
- }
548
- }
549
-
550
- startX = null;
551
- startY = null;
552
- dx = null;
553
- offset = null;
554
- accDx = 0;
555
- }
556
- }
557
- },
558
- resize: function() {
559
- if (!slider.animating && slider.is(':visible')) {
560
- if (!carousel) { slider.doMath(); }
561
-
562
- if (fade) {
563
- // SMOOTH HEIGHT:
564
- methods.smoothHeight();
565
- } else if (carousel) { //CAROUSEL:
566
- slider.slides.width(slider.computedW);
567
- slider.update(slider.pagingCount);
568
- slider.setProps();
569
- }
570
- else if (vertical) { //VERTICAL:
571
- slider.viewport.height(slider.h);
572
- slider.setProps(slider.h, "setTotal");
573
- } else {
574
- // SMOOTH HEIGHT:
575
- if (slider.vars.smoothHeight) { methods.smoothHeight(); }
576
- slider.newSlides.width(slider.computedW);
577
- slider.setProps(slider.computedW, "setTotal");
578
- }
579
- }
580
- },
581
- smoothHeight: function(dur) {
582
- if (!vertical || fade) {
583
- var $obj = slider.viewport;
584
- $obj.height(slider.slides.eq(slider.animatingTo).height());
585
- // (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height());
586
- }
587
- },
588
- sync: function(action) {
589
- var $obj = $(slider.vars.sync).data("wcflexslider"),
590
- target = slider.animatingTo;
591
-
592
- switch (action) {
593
- case "animate": $obj.wcflexAnimate(target, slider.vars.pauseOnAction, false, true); break;
594
- case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break;
595
- case "pause": $obj.pause(); break;
596
- }
597
- },
598
- uniqueID: function($clone) {
599
- // Append _clone to current level and children elements with id attributes
600
- $clone.filter( '[id]' ).add($clone.find( '[id]' )).each(function() {
601
- var $this = $(this);
602
- $this.attr( 'id', $this.attr( 'id' ) + '_clone' );
603
- });
604
- return $clone;
605
- },
606
- pauseInvisible: {
607
- visProp: null,
608
- init: function() {
609
- var visProp = methods.pauseInvisible.getHiddenProp();
610
- if (visProp) {
611
- var evtname = visProp.replace(/[H|h]idden/,'') + 'visibilitychange';
612
- document.addEventListener(evtname, function() {
613
- if (methods.pauseInvisible.isHidden()) {
614
- if(slider.startTimeout) {
615
- clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible
616
- } else {
617
- slider.pause(); //Or just pause
618
- }
619
- }
620
- else {
621
- if(slider.started) {
622
- slider.play(); //Initiated before, just play
623
- } else {
624
- if (slider.vars.initDelay > 0) {
625
- setTimeout(slider.play, slider.vars.initDelay);
626
- } else {
627
- slider.play(); //Didn't init before: simply init or wait for it
628
- }
629
- }
630
- }
631
- });
632
- }
633
- },
634
- isHidden: function() {
635
- var prop = methods.pauseInvisible.getHiddenProp();
636
- if (!prop) {
637
- return false;
638
- }
639
- return document[prop];
640
- },
641
- getHiddenProp: function() {
642
- var prefixes = ['webkit','moz','ms','o'];
643
- // if 'hidden' is natively supported just return it
644
- if ('hidden' in document) {
645
- return 'hidden';
646
- }
647
- // otherwise loop over all the known prefixes until we find one
648
- for ( var i = 0; i < prefixes.length; i++ ) {
649
- if ((prefixes[i] + 'Hidden') in document) {
650
- return prefixes[i] + 'Hidden';
651
- }
652
- }
653
- // otherwise it's not supported
654
- return null;
655
- }
656
- },
657
- setToClearWatchedEvent: function() {
658
- clearTimeout(watchedEventClearTimer);
659
- watchedEventClearTimer = setTimeout(function() {
660
- watchedEvent = "";
661
- }, 3000);
662
- }
663
- };
664
-
665
- // public methods
666
- slider.wcflexAnimate = function(target, pause, override, withSync, fromNav) {
667
- if (!slider.vars.animationLoop && target !== slider.currentSlide) {
668
- slider.direction = (target > slider.currentSlide) ? "next" : "prev";
669
- }
670
-
671
- if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev";
672
-
673
- if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) {
674
- if (asNav && withSync) {
675
- var master = $(slider.vars.asNavFor).data('wcflexslider');
676
- slider.atEnd = target === 0 || target === slider.count - 1;
677
- master.wcflexAnimate(target, true, false, true, fromNav);
678
- slider.direction = (slider.currentItem < target) ? "next" : "prev";
679
- master.direction = slider.direction;
680
-
681
- if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) {
682
- slider.currentItem = target;
683
- slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
684
- target = Math.floor(target/slider.visible);
685
- } else {
686
- slider.currentItem = target;
687
- slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
688
- return false;
689
- }
690
- }
691
-
692
- slider.animating = true;
693
- slider.animatingTo = target;
694
-
695
- // SLIDESHOW:
696
- if (pause) { slider.pause(); }
697
-
698
- // API: before() animation Callback
699
- slider.vars.before(slider);
700
-
701
- // SYNC:
702
- if (slider.syncExists && !fromNav) { methods.sync("animate"); }
703
-
704
- // CONTROLNAV
705
- if (slider.vars.controlNav) { methods.controlNav.active(); }
706
-
707
- // !CAROUSEL:
708
- // CANDIDATE: slide active class (for add/remove slide)
709
- if (!carousel) { slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide'); }
710
-
711
- // INFINITE LOOP:
712
- // CANDIDATE: atEnd
713
- slider.atEnd = target === 0 || target === slider.last;
714
-
715
- // DIRECTIONNAV:
716
- if (slider.vars.directionNav) { methods.directionNav.update(); }
717
-
718
- if (target === slider.last) {
719
- // API: end() of cycle Callback
720
- slider.vars.end(slider);
721
- // SLIDESHOW && !INFINITE LOOP:
722
- if (!slider.vars.animationLoop) { slider.pause(); }
723
- }
724
-
725
- // SLIDE:
726
- if (!fade) {
727
- var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW,
728
- margin, slideString, calcNext;
729
-
730
- // INFINITE LOOP / REVERSE:
731
- if (carousel) {
732
- //margin = (slider.vars.itemWidth > slider.w) ? slider.vars.itemMargin * 2 : slider.vars.itemMargin;
733
- margin = slider.vars.itemMargin;
734
- calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo;
735
- slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext;
736
- } else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") {
737
- slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0;
738
- } else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") {
739
- slideString = (reverse) ? 0 : (slider.count + 1) * dimension;
740
- } else {
741
- slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
742
- }
743
- slider.setProps(slideString, "", slider.vars.animationSpeed);
744
- if (slider.transitions) {
745
- if (!slider.vars.animationLoop || !slider.atEnd) {
746
- slider.animating = false;
747
- slider.currentSlide = slider.animatingTo;
748
- }
749
-
750
- // Unbind previous transitionEnd events and re-bind new transitionEnd event
751
- slider.container.unbind("webkitTransitionEnd transitionend");
752
- slider.container.bind("webkitTransitionEnd transitionend", function() {
753
- clearTimeout(slider.ensureAnimationEnd);
754
- slider.wrapup(dimension);
755
- });
756
-
757
- // Insurance for the ever-so-fickle transitionEnd event
758
- clearTimeout(slider.ensureAnimationEnd);
759
- slider.ensureAnimationEnd = setTimeout(function() {
760
- slider.wrapup(dimension);
761
- }, slider.vars.animationSpeed + 100);
762
-
763
- } else {
764
- slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){
765
- slider.wrapup(dimension);
766
- });
767
- }
768
- } else { // FADE:
769
- if (!touch) {
770
- //slider.slides.eq(slider.currentSlide).fadeOut(slider.vars.animationSpeed, slider.vars.easing);
771
- //slider.slides.eq(target).fadeIn(slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
772
-
773
- slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing);
774
- slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
775
-
776
- } else {
777
- slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
778
- slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
779
- slider.wrapup(dimension);
780
- }
781
- }
782
- // SMOOTH HEIGHT:
783
- if (slider.vars.smoothHeight) { methods.smoothHeight(slider.vars.animationSpeed); }
784
- }
785
- };
786
- slider.wrapup = function(dimension) {
787
- // SLIDE:
788
- if (!fade && !carousel) {
789
- if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) {
790
- slider.setProps(dimension, "jumpEnd");
791
- } else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) {
792
- slider.setProps(dimension, "jumpStart");
793
- }
794
- }
795
- slider.animating = false;
796
- slider.currentSlide = slider.animatingTo;
797
- // API: after() animation Callback
798
- slider.vars.after(slider);
799
- };
800
-
801
- // SLIDESHOW:
802
- slider.animateSlides = function() {
803
- if (!slider.animating && focused ) { slider.wcflexAnimate(slider.getTarget("next")); }
804
- };
805
- // SLIDESHOW:
806
- slider.pause = function() {
807
- clearInterval(slider.animatedSlides);
808
- slider.animatedSlides = null;
809
- slider.playing = false;
810
- // PAUSEPLAY:
811
- if (slider.vars.pausePlay) { methods.pausePlay.update("play"); }
812
- // SYNC:
813
- if (slider.syncExists) { methods.sync("pause"); }
814
- };
815
- // SLIDESHOW:
816
- slider.play = function() {
817
- if (slider.playing) { clearInterval(slider.animatedSlides); }
818
- slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
819
- slider.started = slider.playing = true;
820
- // PAUSEPLAY:
821
- if (slider.vars.pausePlay) { methods.pausePlay.update("pause"); }
822
- // SYNC:
823
- if (slider.syncExists) { methods.sync("play"); }
824
- };
825
- // STOP:
826
- slider.stop = function () {
827
- slider.pause();
828
- slider.stopped = true;
829
- };
830
- slider.canAdvance = function(target, fromNav) {
831
- // ASNAV:
832
- var last = (asNav) ? slider.pagingCount - 1 : slider.last;
833
- return (fromNav) ? true :
834
- (asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true :
835
- (asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false :
836
- (target === slider.currentSlide && !asNav) ? false :
837
- (slider.vars.animationLoop) ? true :
838
- (slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false :
839
- (slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false :
840
- true;
841
- };
842
- slider.getTarget = function(dir) {
843
- slider.direction = dir;
844
- if (dir === "next") {
845
- return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1;
846
- } else {
847
- return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1;
848
- }
849
- };
850
-
851
- // SLIDE:
852
- slider.setProps = function(pos, special, dur) {
853
- var target = (function() {
854
- var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo,
855
- posCalc = (function() {
856
- if (carousel) {
857
- return (special === "setTouch") ? pos :
858
- (reverse && slider.animatingTo === slider.last) ? 0 :
859
- (reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
860
- (slider.animatingTo === slider.last) ? slider.limit : posCheck;
861
- } else {
862
- switch (special) {
863
- case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos;
864
- case "setTouch": return (reverse) ? pos : pos;
865
- case "jumpEnd": return (reverse) ? pos : slider.count * pos;
866
- case "jumpStart": return (reverse) ? slider.count * pos : pos;
867
- default: return pos;
868
- }
869
- }
870
- }());
871
-
872
- return (posCalc * -1) + "px";
873
- }());
874
-
875
- if (slider.transitions) {
876
- target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)";
877
- dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
878
- slider.container.css("-" + slider.pfx + "-transition-duration", dur);
879
- slider.container.css("transition-duration", dur);
880
- }
881
-
882
- slider.args[slider.prop] = target;
883
- if (slider.transitions || dur === undefined) { slider.container.css(slider.args); }
884
-
885
- slider.container.css('transform',target);
886
- };
887
-
888
- slider.setup = function(type) {
889
- // SLIDE:
890
- if (!fade) {
891
- var sliderOffset, arr;
892
-
893
- if (type === "init") {
894
- slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
895
- // INFINITE LOOP:
896
- slider.cloneCount = 0;
897
- slider.cloneOffset = 0;
898
- // REVERSE:
899
- if (reverse) {
900
- arr = $.makeArray(slider.slides).reverse();
901
- slider.slides = $(arr);
902
- slider.container.empty().append(slider.slides);
903
- }
904
- }
905
- // INFINITE LOOP && !CAROUSEL:
906
- if (slider.vars.animationLoop && !carousel) {
907
- slider.cloneCount = 2;
908
- slider.cloneOffset = 1;
909
- // clear out old clones
910
- if (type !== "init") { slider.container.find('.clone').remove(); }
911
- slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true'))
912
- .prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true'));
913
- }
914
- slider.newSlides = $(slider.vars.selector, slider);
915
-
916
- sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset;
917
- // VERTICAL:
918
- if (vertical && !carousel) {
919
- slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
920
- setTimeout(function(){
921
- slider.newSlides.css({"display": "block"});
922
- slider.doMath();
923
- slider.viewport.height(slider.h);
924
- slider.setProps(sliderOffset * slider.h, "init");
925
- }, (type === "init") ? 100 : 0);
926
- } else {
927
- slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
928
- slider.setProps(sliderOffset * slider.computedW, "init");
929
- setTimeout(function(){
930
- slider.doMath();
931
- slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"});
932
- // SMOOTH HEIGHT:
933
- if (slider.vars.smoothHeight) { methods.smoothHeight(); }
934
- }, (type === "init") ? 100 : 0);
935
- }
936
- } else { // FADE:
937
- slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"});
938
- if (type === "init") {
939
- slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
940
- if (!touch) {
941
- //slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing);
942
- if (slider.vars.fadeFirstSlide == false) {
943
- slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).css({"opacity": 1});
944
- } else {
945
- slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing);
946
- }
947
- } else {
948
- 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});
949
- }
950
- }
951
- // SMOOTH HEIGHT:
952
- if (slider.vars.smoothHeight) { methods.smoothHeight(); }
953
- }
954
- // !CAROUSEL:
955
- // CANDIDATE: active slide
956
- if (!carousel) { slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide"); }
957
-
958
- //FlexSlider: init() Callback
959
- slider.vars.init(slider);
960
- };
961
-
962
- slider.doMath = function() {
963
- var slide = slider.slides.first(),
964
- slideMargin = slider.vars.itemMargin,
965
- minItems = slider.vars.minItems,
966
- maxItems = slider.vars.maxItems;
967
-
968
- slider.w = (slider.viewport===undefined) ? slider.width() : slider.viewport.width();
969
- slider.h = slide.height();
970
- slider.boxPadding = slide.outerWidth() - slide.width();
971
-
972
- // CAROUSEL:
973
- if (carousel) {
974
- slider.itemT = slider.vars.itemWidth + slideMargin;
975
- slider.minW = (minItems) ? minItems * slider.itemT : slider.w;
976
- slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w;
977
- slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems :
978
- (slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems :
979
- (slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth;
980
-
981
- slider.visible = Math.floor(slider.w/(slider.itemW));
982
- slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible;
983
- slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
984
- slider.last = slider.pagingCount - 1;
985
- slider.limit = (slider.pagingCount === 1) ? 0 :
986
- (slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
987
- } else {
988
- slider.itemW = slider.w;
989
- slider.pagingCount = slider.count;
990
- slider.last = slider.count - 1;
991
- }
992
- slider.computedW = slider.itemW - slider.boxPadding;
993
- };
994
-
995
- slider.update = function(pos, action) {
996
- slider.doMath();
997
-
998
- // update currentSlide and slider.animatingTo if necessary
999
- if (!carousel) {
1000
- if (pos < slider.currentSlide) {
1001
- slider.currentSlide += 1;
1002
- } else if (pos <= slider.currentSlide && pos !== 0) {
1003
- slider.currentSlide -= 1;
1004
- }
1005
- slider.animatingTo = slider.currentSlide;
1006
- }
1007
-
1008
- // update controlNav
1009
- if (slider.vars.controlNav && !slider.manualControls) {
1010
- if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) {
1011
- methods.controlNav.update("add");
1012
- } else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) {
1013
- if (carousel && slider.currentSlide > slider.last) {
1014
- slider.currentSlide -= 1;
1015
- slider.animatingTo -= 1;
1016
- }
1017
- methods.controlNav.update("remove", slider.last);
1018
- }
1019
- }
1020
- // update directionNav
1021
- if (slider.vars.directionNav) { methods.directionNav.update(); }
1022
-
1023
- };
1024
-
1025
- slider.addSlide = function(obj, pos) {
1026
- var $obj = $(obj);
1027
-
1028
- slider.count += 1;
1029
- slider.last = slider.count - 1;
1030
-
1031
- // append new slide
1032
- if (vertical && reverse) {
1033
- (pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj);
1034
- } else {
1035
- (pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj);
1036
- }
1037
-
1038
- // update currentSlide, animatingTo, controlNav, and directionNav
1039
- slider.update(pos, "add");
1040
-
1041
- // update slider.slides
1042
- slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
1043
- // re-setup the slider to accomdate new slide
1044
- slider.setup();
1045
-
1046
- //FlexSlider: added() Callback
1047
- slider.vars.added(slider);
1048
- };
1049
- slider.removeSlide = function(obj) {
1050
- var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;
1051
-
1052
- // update count
1053
- slider.count -= 1;
1054
- slider.last = slider.count - 1;
1055
-
1056
- // remove slide
1057
- if (isNaN(obj)) {
1058
- $(obj, slider.slides).remove();
1059
- } else {
1060
- (vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove();
1061
- }
1062
-
1063
- // update currentSlide, animatingTo, controlNav, and directionNav
1064
- slider.doMath();
1065
- slider.update(pos, "remove");
1066
-
1067
- // update slider.slides
1068
- slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
1069
- // re-setup the slider to accomdate new slide
1070
- slider.setup();
1071
-
1072
- // FlexSlider: removed() Callback
1073
- slider.vars.removed(slider);
1074
- };
1075
-
1076
- //FlexSlider: Initialize
1077
- methods.init();
1078
- };
1079
-
1080
- // Ensure the slider isn't focussed if the window loses focus.
1081
- $( window ).blur( function ( e ) {
1082
- focused = false;
1083
- }).focus( function ( e ) {
1084
- focused = true;
1085
- });
1086
-
1087
- //FlexSlider: Default Settings
1088
- $.wcflexslider.defaults = {
1089
- namespace: "wcflex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin
1090
- selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
1091
- animation: "fade", //String: Select your animation type, "fade" or "slide"
1092
- easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
1093
- direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
1094
- reverse: false, //{NEW} Boolean: Reverse the animation direction
1095
- animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
1096
- smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
1097
- startAt: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide)
1098
- slideshow: true, //Boolean: Animate slider automatically
1099
- slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds
1100
- animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds
1101
- initDelay: 0, //{NEW} Integer: Set an initialization delay, in milliseconds
1102
- randomize: false, //Boolean: Randomize slide order
1103
- fadeFirstSlide: true, //Boolean: Fade in the first slide when animation type is "fade"
1104
- thumbCaptions: false, //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav.
1105
-
1106
- // Usability features
1107
- pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
1108
- pauseOnHover: false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
1109
- pauseInvisible: true, //{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage.
1110
- useCSS: true, //{NEW} Boolean: Slider will use CSS3 transitions if available
1111
- touch: true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
1112
- video: false, //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches
1113
-
1114
- // Primary Controls
1115
- controlNav: true, //Boolean: Create navigation for paging control of each slide? Note: Leave true for manualControls usage
1116
- directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false)
1117
- prevText: "Previous", //String: Set the text for the "previous" directionNav item
1118
- nextText: "Next", //String: Set the text for the "next" directionNav item
1119
-
1120
- // Secondary Navigation
1121
- keyboard: true, //Boolean: Allow slider navigating via keyboard left/right keys
1122
- multipleKeyboard: false, //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
1123
- mousewheel: false, //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
1124
- pausePlay: false, //Boolean: Create pause/play dynamic element
1125
- pauseText: "Pause", //String: Set the text for the "pause" pausePlay item
1126
- playText: "Play", //String: Set the text for the "play" pausePlay item
1127
-
1128
- // Special properties
1129
- 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 $(".wcflexslider-container"). Property is ignored if given element is not found.
1130
- manualControls: "", //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".wcflex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
1131
- sync: "", //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
1132
- asNavFor: "", //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider
1133
-
1134
- // Carousel Options
1135
- itemWidth: 0, //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
1136
- itemMargin: 0, //{NEW} Integer: Margin between carousel items.
1137
- minItems: 1, //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
1138
- maxItems: 0, //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
1139
- move: 0, //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
1140
- allowOneSlide: true, //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide
1141
-
1142
- // Callback API
1143
- start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide
1144
- before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation
1145
- after: function(){}, //Callback: function(slider) - Fires after each slider animation completes
1146
- end: function(){}, //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
1147
- added: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is added
1148
- removed: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is removed
1149
- init: function() {} //{NEW} Callback: function(slider) - Fires after the slider is initially setup
1150
- };
1151
-
1152
- //FlexSlider: Plugin Function
1153
- $.fn.wcflexslider = function(options) {
1154
- if (options === undefined) { options = {}; }
1155
-
1156
- if (typeof options === "object") {
1157
- return this.each(function() {
1158
- var $this = $(this),
1159
- selector = (options.selector) ? options.selector : ".slides > li",
1160
- $slides = $this.find(selector);
1161
-
1162
- if ( ( $slides.length === 1 && options.allowOneSlide === true ) || $slides.length === 0 ) {
1163
- $slides.fadeIn(400);
1164
- if (options.start) { options.start($this); }
1165
- } else if ($this.data('wcflexslider') === undefined) {
1166
- new $.wcflexslider(this, options);
1167
- }
1168
- });
1169
- } else {
1170
- // Helper strings to quickly perform functions on the slider
1171
- var $slider = $(this).data('wcflexslider');
1172
- switch (options) {
1173
- case "play": $slider.play(); break;
1174
- case "pause": $slider.pause(); break;
1175
- case "stop": $slider.stop(); break;
1176
- case "next": $slider.wcflexAnimate($slider.getTarget("next"), true); break;
1177
- case "prev":
1178
- case "previous": $slider.wcflexAnimate($slider.getTarget("prev"), true); break;
1179
- default: if (typeof options === "number") { $slider.wcflexAnimate(options, true); }
1180
- }
1181
- }
1182
- };
1183
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/js/gallery.js CHANGED
@@ -7,6 +7,31 @@
7
  ( function( $ ) {
8
  "use strict";
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  var body = $( 'body' ),
11
  _window = $( window );
12
 
@@ -49,14 +74,12 @@
49
  return {columnWidth: columnWidth, gutterWidth: gutterWidth, columns: columns};
50
  }
51
 
52
- var runMasonry = function( duration, $container) {
53
- var $postBox = $container.children('.gallery-item');
54
-
55
  var o = calculateGrid($container);
56
 
57
- $postBox.css({'width':o.columnWidth+'px', 'margin-bottom':o.gutterWidth+'px', 'padding':'0'});
58
 
59
- $container.masonry( {
60
  itemSelector: '.gallery-item',
61
  columnWidth: o.columnWidth,
62
  gutter: o.gutterWidth,
@@ -64,30 +87,25 @@
64
  } );
65
  }
66
 
67
-
68
  var initGallery = function() {
69
  $('.gallery-masonry').each( function() {
70
  var $container = $(this);
 
71
 
72
- if ( $container.is(':hidden') ) {
73
- return;
74
- }
75
-
76
- if ( $container.hasClass( 'masonry' ) ) {
77
- return;
78
- }
79
 
80
- imagesLoaded( $container, function() {
81
- runMasonry(0, $container);
82
 
83
- $container.css('visibility', 'visible');
84
- });
85
 
86
  $(window).resize(function() {
87
- runMasonry(0, $container);
88
- });
89
- });
90
 
 
91
 
92
  if( jQuery().magnificPopup) {
93
  $('.gallery-link-file').each( function() {
@@ -142,7 +160,7 @@
142
 
143
  gutterWidth = parseInt( gutterWidth );
144
 
145
- // imagesLoaded( $flex, function() {
146
  if ( $flex.hasClass('wcslider') ) {
147
  $flex.wcflexslider({
148
  prevText: "",
@@ -211,7 +229,7 @@
211
  }
212
  });
213
  }
214
- // });
215
  });
216
  }
217
  if( jQuery().owlCarousel) {
7
  ( function( $ ) {
8
  "use strict";
9
 
10
+ $.fn.wcGalleryMasonryImagesReveal = function( $items ) {
11
+ var msnry = this.data('masonry');
12
+ var itemSelector = msnry.options.itemSelector;
13
+
14
+ // hide by default
15
+ $items.hide();
16
+
17
+ // append to container
18
+ this.append( $items );
19
+
20
+ $.each( $items, function( key, item ) {
21
+ var $item = $(this);
22
+
23
+ // un-hide item
24
+ $item.show();
25
+
26
+ $item.imagesLoaded().always( function( instance ) {
27
+ // masonry does its thing
28
+ msnry.appended( $item );
29
+ });
30
+ });
31
+
32
+ return this;
33
+ };
34
+
35
  var body = $( 'body' ),
36
  _window = $( window );
37
 
74
  return {columnWidth: columnWidth, gutterWidth: gutterWidth, columns: columns};
75
  }
76
 
77
+ var runMasonry = function( duration, $container, $posts ) {
 
 
78
  var o = calculateGrid($container);
79
 
80
+ $posts.css({'width':o.columnWidth+'px', 'margin-bottom':o.gutterWidth+'px', 'padding':'0'});
81
 
82
+ $container = $container.masonry( {
83
  itemSelector: '.gallery-item',
84
  columnWidth: o.columnWidth,
85
  gutter: o.gutterWidth,
87
  } );
88
  }
89
 
 
90
  var initGallery = function() {
91
  $('.gallery-masonry').each( function() {
92
  var $container = $(this);
93
+ var $posts = $container.children('.gallery-item');
94
 
95
+ // remove posts from element
96
+ $container.empty();
 
 
 
 
 
97
 
98
+ // keeps the media elements from calculating for the full width of the post
99
+ runMasonry(0, $container, $posts);
100
 
101
+ // we are going to append masonry items as the images load
102
+ $container.wcGalleryMasonryImagesReveal( $posts );
103
 
104
  $(window).resize(function() {
105
+ runMasonry(0, $container, $posts);
106
+ });
 
107
 
108
+ });
109
 
110
  if( jQuery().magnificPopup) {
111
  $('.gallery-link-file').each( function() {
160
 
161
  gutterWidth = parseInt( gutterWidth );
162
 
163
+ imagesLoaded( $flex, function() {
164
  if ( $flex.hasClass('wcslider') ) {
165
  $flex.wcflexslider({
166
  prevText: "",
229
  }
230
  });
231
  }
232
+ });
233
  });
234
  }
235
  if( jQuery().owlCarousel) {
includes/js/masonry.pkgd.min.js DELETED
@@ -1,9 +0,0 @@
1
- /*!
2
- * Masonry PACKAGED v3.1.5
3
- * Cascading grid layout library
4
- * http://masonry.desandro.com
5
- * MIT License
6
- * by David DeSandro
7
- */
8
-
9
- !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(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}(this),function(a){function b(a){"function"==typeof a&&(b.isReady?a():f.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==e.readyState;if(!b.isReady&&!c){b.isReady=!0;for(var d=0,g=f.length;g>d;d++){var h=f[d];h()}}}function d(d){return d.bind(e,"DOMContentLoaded",c),d.bind(e,"readystatechange",c),d.bind(a,"load",c),b}var e=a.document,f=[];b.isReady=!1,"function"==typeof define&&define.amd?(b.isReady="function"==typeof requirejs,define("doc-ready/doc-ready",["eventie/eventie"],d)):a.docReady=d(a.eventie)}(this),function(){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:this.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){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function d(a){function d(a){if("string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var d=f(a);if("none"===d.display)return c();var e={};e.width=a.offsetWidth,e.height=a.offsetHeight;for(var k=e.isBorderBox=!(!j||!d[j]||"border-box"!==d[j]),l=0,m=g.length;m>l;l++){var n=g[l],o=d[n];o=h(a,o);var p=parseFloat(o);e[n]=isNaN(p)?0:p}var q=e.paddingLeft+e.paddingRight,r=e.paddingTop+e.paddingBottom,s=e.marginLeft+e.marginRight,t=e.marginTop+e.marginBottom,u=e.borderLeftWidth+e.borderRightWidth,v=e.borderTopWidth+e.borderBottomWidth,w=k&&i,x=b(d.width);x!==!1&&(e.width=x+(w?0:q+u));var y=b(d.height);return y!==!1&&(e.height=y+(w?0:r+v)),e.innerWidth=e.width-(q+u),e.innerHeight=e.height-(r+v),e.outerWidth=e.width+s,e.outerHeight=e.height+t,e}}function h(a,b){if(e||-1===b.indexOf("%"))return b;var c=a.style,d=c.left,f=a.runtimeStyle,g=f&&f.left;return g&&(f.left=a.currentStyle.left),c.left=b,b=c.pixelLeft,c.left=d,g&&(f.left=g),b}var i,j=a("boxSizing");return function(){if(j){var a=document.createElement("div");a.style.width="200px",a.style.padding="1px 2px 3px 4px",a.style.borderStyle="solid",a.style.borderWidth="1px 2px 3px 4px",a.style[j]="border-box";var c=document.body||document.documentElement;c.appendChild(a);var d=f(a);i=200===b(d.width),c.removeChild(a)}}(),d}var e=a.getComputedStyle,f=e?function(a){return e(a,null)}:function(a){return a.currentStyle},g=["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"],d):"object"==typeof exports?module.exports=d(require("get-style-property")):a.getSize=d(a.getStyleProperty)}(window),function(a,b){function c(a,b){return a[h](b)}function d(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function e(a,b){d(a);for(var c=a.parentNode.querySelectorAll(b),e=0,f=c.length;f>e;e++)if(c[e]===a)return!0;return!1}function f(a,b){return d(a),c(a,b)}var g,h=function(){if(b.matchesSelector)return"matchesSelector";for(var a=["webkit","moz","ms","o"],c=0,d=a.length;d>c;c++){var e=a[c],f=e+"MatchesSelector";if(b[f])return f}}();if(h){var i=document.createElement("div"),j=c(i,"div");g=j?c:f}else g=e;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return g}):window.matchesSelector=g}(this,Element.prototype),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){for(var b in a)return!1;return b=null,!0}function d(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function e(a,e,f){function h(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}var i=f("transition"),j=f("transform"),k=i&&j,l=!!f("perspective"),m={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[i],n=["transform","transition","transitionDuration","transitionProperty"],o=function(){for(var a={},b=0,c=n.length;c>b;b++){var d=n[b],e=f(d);e&&e!==d&&(a[d]=e)}return a}();b(h.prototype,a.prototype),h.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},h.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},h.prototype.getSize=function(){this.size=e(this.element)},h.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=o[c]||c;b[d]=a[c]}},h.prototype.getPosition=function(){var a=g(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=parseInt(a[c?"left":"right"],10),f=parseInt(a[d?"top":"bottom"],10);e=isNaN(e)?0:e,f=isNaN(f)?0:f;var h=this.layout.size;e-=c?h.paddingLeft:h.paddingRight,f-=d?h.paddingTop:h.paddingBottom,this.position.x=e,this.position.y=f},h.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={};b.isOriginLeft?(c.left=this.position.x+a.paddingLeft+"px",c.right=""):(c.right=this.position.x+a.paddingRight+"px",c.left=""),b.isOriginTop?(c.top=this.position.y+a.paddingTop+"px",c.bottom=""):(c.bottom=this.position.y+a.paddingBottom+"px",c.top=""),this.css(c),this.emitEvent("layout",[this])};var p=l?function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"}:function(a,b){return"translate("+a+"px, "+b+"px)"};h.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={},k=this.layout.options;h=k.isOriginLeft?h:-h,i=k.isOriginTop?i:-i,j.transform=p(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},h.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},h.prototype.moveTo=k?h.prototype._transitionTo:h.prototype.goTo,h.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},h.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)},h.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 q=j&&d(j)+",opacity";h.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:q,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(m,this,!1))},h.prototype.transition=h.prototype[i?"_transition":"_nonTransition"],h.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},h.prototype.onotransitionend=function(a){this.ontransitionend(a)};var r={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};h.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,d=r[a.propertyName]||a.propertyName;if(delete b.ingProperties[d],c(b.ingProperties)&&this.disableTransition(),d in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[d]),d in b.onEnd){var e=b.onEnd[d];e.call(this),delete b.onEnd[d]}this.emitEvent("transitionEnd",[this])}},h.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(m,this,!1),this.isTransitioning=!1},h.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var s={transitionProperty:"",transitionDuration:""};return h.prototype.removeTransitionStyles=function(){this.css(s)},h.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},h.prototype.remove=function(){if(!i||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.on("transitionEnd",function(){return a.removeElem(),!0}),this.hide()},h.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options;this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0})},h.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options;this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},h.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},h}var f=a.getComputedStyle,g=f?function(a){return f(a,null)}:function(a){return a.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],e):(a.Outlayer={},a.Outlayer.Item=e(a.EventEmitter,a.getSize,a.getStyleProperty))}(window),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){return"[object Array]"===l.call(a)}function d(a){var b=[];if(c(a))b=a;else if(a&&"number"==typeof a.length)for(var d=0,e=a.length;e>d;d++)b.push(a[d]);else b.push(a);return b}function e(a,b){var c=n(b,a);-1!==c&&b.splice(c,1)}function f(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()}function g(c,g,l,n,o,p){function q(a,c){if("string"==typeof a&&(a=h.querySelector(a)),!a||!m(a))return void(i&&i.error("Bad "+this.constructor.namespace+" element: "+a));this.element=a,this.options=b({},this.constructor.defaults),this.option(c);var d=++r;this.element.outlayerGUID=d,s[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var r=0,s={};return q.namespace="outlayer",q.Item=p,q.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)"}},b(q.prototype,l.prototype),q.prototype.option=function(a){b(this.options,a)},q.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),b(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},q.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},q.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},q.prototype._filterFindItemElements=function(a){a=d(a);for(var b=this.options.itemSelector,c=[],e=0,f=a.length;f>e;e++){var g=a[e];if(m(g))if(b){o(g,b)&&c.push(g);for(var h=g.querySelectorAll(b),i=0,j=h.length;j>i;i++)c.push(h[i])}else c.push(g)}return c},q.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},q.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},q.prototype._init=q.prototype.layout,q.prototype._resetLayout=function(){this.getSize()},q.prototype.getSize=function(){this.size=n(this.element)},q.prototype._getMeasurement=function(a,b){var c,d=this.options[a];d?("string"==typeof d?c=this.element.querySelector(d):m(d)&&(c=d),this[a]=c?n(c)[b]:d):this[a]=0},q.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},q.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},q.prototype._layoutItems=function(a,b){function c(){d.emitEvent("layoutComplete",[d,a])}var d=this;if(!a||!a.length)return void c();this._itemsOn(a,"layout",c);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f],i=this._getItemLayoutPosition(h);i.item=h,i.isInstant=b||h.isLayoutInstant,e.push(i)}this._processLayoutQueue(e)},q.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},q.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)}},q.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},q.prototype._postLayout=function(){this.resizeContainer()},q.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},q.prototype._getContainerSize=k,q.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"}},q.prototype._itemsOn=function(a,b,c){function d(){return e++,e===f&&c.call(g),!0}for(var e=0,f=a.length,g=this,h=0,i=a.length;i>h;h++){var j=a[h];j.on(b,d)}},q.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},q.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},q.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)}}},q.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e(d,this.stamps),this.unignore(d)}},q.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=d(a)):void 0},q.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)}}},q.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)}},q.prototype._manageStamp=k,q.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,d=n(a),e={left:b.left-c.left-d.marginLeft,top:b.top-c.top-d.marginTop,right:c.right-b.right-d.marginRight,bottom:c.bottom-b.bottom-d.marginBottom};return e},q.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},q.prototype.bindResize=function(){this.isResizeBound||(c.bind(a,"resize",this),this.isResizeBound=!0)},q.prototype.unbindResize=function(){this.isResizeBound&&c.unbind(a,"resize",this),this.isResizeBound=!1},q.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},q.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},q.prototype.needsResizeLayout=function(){var a=n(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},q.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},q.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},q.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)}},q.prototype.reveal=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.reveal()}},q.prototype.hide=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.hide()}},q.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}},q.prototype.getItems=function(a){if(a&&a.length){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c],f=this.getItem(e);f&&b.push(f)}return b}},q.prototype.remove=function(a){a=d(a);var b=this.getItems(a);if(b&&b.length){this._itemsOn(b,"remove",function(){this.emitEvent("removeComplete",[this,b])});for(var c=0,f=b.length;f>c;c++){var g=b[c];g.remove(),e(g,this.items)}}},q.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(),delete this.element.outlayerGUID,j&&j.removeData(this.element,this.constructor.namespace)},q.data=function(a){var b=a&&a.outlayerGUID;return b&&s[b]},q.create=function(a,c){function d(){q.apply(this,arguments)}return Object.create?d.prototype=Object.create(q.prototype):b(d.prototype,q.prototype),d.prototype.constructor=d,d.defaults=b({},q.defaults),b(d.defaults,c),d.prototype.settings={},d.namespace=a,d.data=q.data,d.Item=function(){p.apply(this,arguments)},d.Item.prototype=new p,g(function(){for(var b=f(a),c=h.querySelectorAll(".js-"+b),e="data-"+b+"-options",g=0,k=c.length;k>g;g++){var l,m=c[g],n=m.getAttribute(e);try{l=n&&JSON.parse(n)}catch(o){i&&i.error("Error parsing "+e+" on "+m.nodeName.toLowerCase()+(m.id?"#"+m.id:"")+": "+o);continue}var p=new d(m,l);j&&j.data(m,a,p)}}),j&&j.bridget&&j.bridget(a,d),d},q.Item=p,q}var h=a.document,i=a.console,j=a.jQuery,k=function(){},l=Object.prototype.toString,m="object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1===a.nodeType&&"string"==typeof a.nodeName},n=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};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],g):a.Outlayer=g(a.eventie,a.docReady,a.EventEmitter,a.getSize,a.matchesSelector,a.Outlayer.Item)}(window),function(a){function b(a,b){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}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,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(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}var c=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++){var e=a[c];if(e===b)return c}return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],b):a.Masonry=b(a.Outlayer,a.getSize)}(window);
 
 
 
 
 
 
 
 
 
includes/js/owlcarousel/README.md DELETED
@@ -1,57 +0,0 @@
1
- ### Owl Carousel 2
2
- version 2.0.0-beta.2.4
3
-
4
- Touch enabled jQuery plugin that lets you create beautiful responsive carousel slider.
5
-
6
- ####[Visit Owl Carousel landing page for full documentation and demos ](http://owlcarousel.owlgraphic.com)
7
-
8
-
9
- ## Installation
10
-
11
-
12
- ### Include CSS
13
- First include two CSS files into your HTML head:
14
- ```
15
- <link rel="stylesheet" href="owlcarousel/owl.carousel.min.css">
16
- <link rel="stylesheet" href="owlcarousel/owl.theme.default.min.css">
17
- ```
18
- > `owl.carousel.css` file is required and its good when inculded in head before *.js
19
-
20
-
21
- ### Include JS
22
-
23
- Yep, include jQuery and `owl.carousel.min.js` into footer.
24
- ```
25
- <script src="jquery.min.js"></script>
26
- <script src="owlcarousel/owl.carousel.min.js"></script>
27
- ```
28
-
29
-
30
- ### Set HTML
31
-
32
- You don't need any special markup. All you need is to wrap your divs(owl works with any type element a/img/span..) inside the container element `<div class="owl-carousel">`.
33
- Class "owl-carousel" is mandatory to apply proper styles that come from owl.carousel.css file.
34
-
35
- ```
36
- <!-- Set up your HTML -->
37
- <div class="owl-carousel">
38
- <div> Your Content </div>
39
- <div> Your Content </div>
40
- <div> Your Content </div>
41
- <div> Your Content </div>
42
- <div> Your Content </div>
43
- <div> Your Content </div>
44
- <div> Your Content </div>
45
- </div>
46
- ```
47
-
48
- ### Call the plugin
49
-
50
- Now call the Owl initializer function and your carousel is ready.
51
-
52
- ```
53
- $(document).ready(function(){
54
- $(".owl-carousel").owlCarousel();
55
- });
56
- ```
57
- > See [demos](http://owlcarousel.owlgraphic.com/demos/demos.html) for customisation and options usage.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/js/owlcarousel/assets/ajax-loader.gif DELETED
Binary file
includes/js/owlcarousel/assets/owl.carousel.min.css DELETED
@@ -1 +0,0 @@
1
- .owl-carousel .animated{-webkit-animation-duration:1000ms;animation-duration:1000ms;-webkit-animation-fill-mode:both;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{-webkit-transition:height 500ms ease-in-out;-moz-transition:height 500ms ease-in-out;-ms-transition:height 500ms ease-in-out;-o-transition:height 500ms ease-in-out;transition:height 500ms ease-in-out}.owl-carousel{display:none;width:100%;-webkit-tap-highlight-color:transparent;position:relative;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0px,0,0)}.owl-carousel .owl-controls .owl-dot,.owl-carousel .owl-controls .owl-nav .owl-next,.owl-carousel .owl-controls .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loaded{display:block}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel .owl-refresh .owl-item{display:none}.owl-carousel .owl-item{position:relative;min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-item img{display:block;width:100%;-webkit-transform-style:preserve-3d}.owl-carousel.owl-text-select-on .owl-item{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.owl-carousel .owl-grab{cursor:move;cursor:-webkit-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.owl-carousel .owl-rtl{direction:rtl}.owl-carousel .owl-rtl .owl-item{float:right}.no-js .owl-carousel{display:block}.owl-carousel .owl-item .owl-lazy{opacity:0;-webkit-transition:opacity 400ms ease;-moz-transition:opacity 400ms ease;-ms-transition:opacity 400ms ease;-o-transition:opacity 400ms ease;transition:opacity 400ms ease}.owl-carousel .owl-item img{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;-webkit-transition:scale 100ms ease;-moz-transition:scale 100ms ease;-ms-transition:scale 100ms ease;-o-transition:scale 100ms ease;transition:scale 100ms ease}.owl-carousel .owl-video-play-icon:hover{-webkit-transition:scale(1.3,1.3);-moz-transition:scale(1.3,1.3);-ms-transition:scale(1.3,1.3);-o-transition:scale(1.3,1.3);transition:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;-webkit-background-size:contain;-moz-background-size:contain;-o-background-size:contain;background-size:contain;-webkit-transition:opacity 400ms ease;-moz-transition:opacity 400ms ease;-ms-transition:opacity 400ms ease;-o-transition:opacity 400ms ease;transition:opacity 400ms ease}.owl-carousel .owl-video-frame{position:relative;z-index:1}
 
includes/js/owlcarousel/assets/owl.theme.default.css DELETED
@@ -1,75 +0,0 @@
1
- /*
2
- * Default theme - Owl Carousel CSS File
3
- */
4
- .owl-theme .owl-controls {
5
- margin-top: 0px;
6
- text-align: center;
7
- -webkit-tap-highlight-color: transparent;
8
- }
9
- .owl-theme .owl-controls .owl-nav [class*='owl-'] {
10
- color: transparent;
11
- font-size: 14px;
12
- margin: 0;
13
- padding: 0;
14
- display: inline-block;
15
- cursor: pointer;
16
- -webkit-border-radius: 0;
17
- -moz-border-radius: 0;
18
- border-radius: 0;
19
- width: 50px;
20
- height: 50px;
21
- }
22
- .owl-theme .owl-controls .owl-nav .owl-next,
23
- .owl-theme .owl-controls .owl-nav .owl-prev {
24
- background-position: center center;
25
- background-repeat: no-repeat;
26
- position: absolute;
27
- top: 50%;
28
- margin-top: -25px;
29
- opacity: 0;
30
- cursor: pointer;
31
- }
32
- .owl-theme:hover .owl-controls .owl-nav .owl-next,
33
- .owl-theme:hover .owl-controls .owl-nav .owl-prev {
34
- opacity: 1;
35
- }
36
- .owl-theme .owl-controls .owl-nav .owl-next {
37
- right: 0;
38
- background-image: url('slide-arrow-right.png');
39
- }
40
- .owl-theme .owl-controls .owl-nav .owl-prev {
41
- left: 0;
42
- background-image: url('slide-arrow-left.png');
43
- }
44
- .owl-theme .owl-controls .owl-nav [class*='owl-']:hover {
45
- text-decoration: none;
46
- }
47
- .owl-theme .owl-controls .owl-nav .disabled {
48
- opacity: 0.5;
49
- cursor: default;
50
- }
51
-
52
- .owl-theme .owl-dots .owl-dot {
53
- display: inline-block;
54
- zoom: 1;
55
- *display: inline;
56
- }
57
- .owl-theme .owl-dots .owl-dot span {
58
- width: 10px;
59
- height: 10px;
60
- margin: 5px 7px;
61
- background: #d6d6d6;
62
- display: block;
63
- -webkit-backface-visibility: visible;
64
- -webkit-transition: opacity 200ms ease;
65
- -moz-transition: opacity 200ms ease;
66
- -ms-transition: opacity 200ms ease;
67
- -o-transition: opacity 200ms ease;
68
- transition: opacity 200ms ease;
69
- -webkit-border-radius: 30px;
70
- -moz-border-radius: 30px;
71
- border-radius: 30px;
72
- }
73
- .owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span {
74
- background: #869791;
75
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/js/owlcarousel/assets/owl.theme.default.min.css DELETED
@@ -1 +0,0 @@
1
- .owl-theme .owl-controls{margin-top:10px;text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-controls .owl-nav [class*=owl-]{color:#fff;font-size:14px;margin:5px;padding:4px 7px;background:#d6d6d6;display:inline-block;cursor:pointer;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.owl-theme .owl-controls .owl-nav [class*=owl-]:hover{background:#869791;color:#fff;text-decoration:none}.owl-theme .owl-controls .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1;*display:inline}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#d6d6d6;display:block;-webkit-backface-visibility:visible;-webkit-transition:opacity 200ms ease;-moz-transition:opacity 200ms ease;-ms-transition:opacity 200ms ease;-o-transition:opacity 200ms ease;transition:opacity 200ms ease;-webkit-border-radius:30px;-moz-border-radius:30px;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#869791}
 
includes/js/owlcarousel/assets/owl.theme.green.css DELETED
@@ -1,53 +0,0 @@
1
- /*
2
- * Green theme - Owl Carousel CSS File
3
- */
4
- .owl-theme .owl-controls {
5
- margin-top: 10px;
6
- text-align: center;
7
- -webkit-tap-highlight-color: transparent;
8
- }
9
- .owl-theme .owl-controls .owl-nav [class*='owl-'] {
10
- color: white;
11
- font-size: 14px;
12
- margin: 5px;
13
- padding: 4px 7px;
14
- background: #d6d6d6;
15
- display: inline-block;
16
- cursor: pointer;
17
- -webkit-border-radius: 3px;
18
- -moz-border-radius: 3px;
19
- border-radius: 3px;
20
- }
21
- .owl-theme .owl-controls .owl-nav [class*='owl-']:hover {
22
- background: #4dc7a0;
23
- color: white;
24
- text-decoration: none;
25
- }
26
- .owl-theme .owl-controls .owl-nav .disabled {
27
- opacity: 0.5;
28
- cursor: default;
29
- }
30
- .owl-theme .owl-dots .owl-dot {
31
- display: inline-block;
32
- zoom: 1;
33
- *display: inline;
34
- }
35
- .owl-theme .owl-dots .owl-dot span {
36
- width: 10px;
37
- height: 10px;
38
- margin: 5px 7px;
39
- background: #d6d6d6;
40
- display: block;
41
- -webkit-backface-visibility: visible;
42
- -webkit-transition: opacity 200ms ease;
43
- -moz-transition: opacity 200ms ease;
44
- -ms-transition: opacity 200ms ease;
45
- -o-transition: opacity 200ms ease;
46
- transition: opacity 200ms ease;
47
- -webkit-border-radius: 30px;
48
- -moz-border-radius: 30px;
49
- border-radius: 30px;
50
- }
51
- .owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span {
52
- background: #4dc7a0;
53
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/js/owlcarousel/assets/owl.theme.green.min.css DELETED
@@ -1 +0,0 @@
1
- .owl-theme .owl-controls{margin-top:10px;text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-controls .owl-nav [class*=owl-]{color:#fff;font-size:14px;margin:5px;padding:4px 7px;background:#d6d6d6;display:inline-block;cursor:pointer;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.owl-theme .owl-controls .owl-nav [class*=owl-]:hover{background:#4dc7a0;color:#fff;text-decoration:none}.owl-theme .owl-controls .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1;*display:inline}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#d6d6d6;display:block;-webkit-backface-visibility:visible;-webkit-transition:opacity 200ms ease;-moz-transition:opacity 200ms ease;-ms-transition:opacity 200ms ease;-o-transition:opacity 200ms ease;transition:opacity 200ms ease;-webkit-border-radius:30px;-moz-border-radius:30px;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#4dc7a0}
 
includes/js/owlcarousel/assets/slide-arrow-left.png DELETED
Binary file
includes/js/owlcarousel/assets/slide-arrow-right.png DELETED
Binary file
includes/js/owlcarousel/owl.carousel.min.js DELETED
@@ -1,2 +0,0 @@
1
- !function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this.drag=a.extend({},m),this.state=a.extend({},n),this.e=a.extend({},o),this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._invalidated={},this._pipe=[],a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a[0].toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Pipe,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}function f(a){if(a.touches!==d)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(a.touches===d){if(a.pageX!==d)return{x:a.pageX,y:a.pageY};if(a.pageX===d)return{x:a.clientX,y:a.clientY}}}function g(a){var b,d,e=c.createElement("div"),f=a;for(b in f)if(d=f[b],"undefined"!=typeof e.style[d])return e=null,[d,b];return[!1]}function h(){return g(["transition","WebkitTransition","MozTransition","OTransition"])[1]}function i(){return g(["transform","WebkitTransform","MozTransform","OTransform","msTransform"])[0]}function j(){return g(["perspective","webkitPerspective","MozPerspective","OPerspective","MsPerspective"])[0]}function k(){return"ontouchstart"in b||!!navigator.msMaxTouchPoints}function l(){return b.navigator.msPointerEnabled}var m,n,o;m={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,offsetX:0,offsetY:0,distance:null,startTime:0,endTime:0,updatedX:0,targetEl:null},n={isTouch:!1,isScrolling:!1,isSwiping:!1,direction:!1,inMotion:!1},o={_onDragStart:null,_onDragMove:null,_onDragEnd:null,_transitionEnd:null,_resizer:null,_responsiveCall:null,_goToLoop:null,_checkVisibile:null},e.Defaults={items:3,loop:!1,center:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,responsiveClass:!1,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",themeClass:"owl-theme",baseClass:"owl-carousel",itemClass:"owl-item",centerClass:"center",activeClass:"active"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Plugins={},e.Pipe=[{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){var a=this._clones,b=this.$stage.children(".cloned");(b.length!==a.length||!this.settings.loop&&a.length>0)&&(this.$stage.children(".cloned").remove(),this._clones=[])}},{filter:["items","settings"],run:function(){var a,b,c=this._clones,d=this._items,e=this.settings.loop?c.length-Math.max(2*this.settings.items,4):0;for(a=0,b=Math.abs(e/2);b>a;a++)e>0?(this.$stage.children().eq(d.length+c.length-1).remove(),c.pop(),this.$stage.children().eq(0).remove(),c.pop()):(c.push(c.length/2),this.$stage.append(d[c[c.length-1]].clone().addClass("cloned")),c.push(d.length-1-(c.length-1)/2),this.$stage.prepend(d[c[c.length-1]].clone().addClass("cloned")))}},{filter:["width","items","settings"],run:function(){var a,b,c,d=this.settings.rtl?1:-1,e=(this.width()/this.settings.items).toFixed(3),f=0;for(this._coordinates=[],b=0,c=this._clones.length+this._items.length;c>b;b++)a=this._mergers[this.relative(b)],a=this.settings.mergeFit&&Math.min(a,this.settings.items)||a,f+=(this.settings.autoWidth?this._items[this.relative(b)].width()+this.settings.margin:e*a)*d,this._coordinates.push(f)}},{filter:["width","items","settings"],run:function(){var b,c,d=(this.width()/this.settings.items).toFixed(3),e={width:Math.abs(this._coordinates[this._coordinates.length-1])+2*this.settings.stagePadding,"padding-left":this.settings.stagePadding||"","padding-right":this.settings.stagePadding||""};if(this.$stage.css(e),e={width:this.settings.autoWidth?"auto":d-this.settings.margin},e[this.settings.rtl?"margin-left":"margin-right"]=this.settings.margin,!this.settings.autoWidth&&a.grep(this._mergers,function(a){return a>1}).length>0)for(b=0,c=this._coordinates.length;c>b;b++)e.width=Math.abs(this._coordinates[b])-Math.abs(this._coordinates[b-1]||0)-this.settings.margin,this.$stage.children().eq(b).css(e);else this.$stage.children().css(e)}},{filter:["width","items","settings"],run:function(a){a.current&&this.reset(this.$stage.children().index(a.current))}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children("."+this.settings.activeClass).removeClass(this.settings.activeClass),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass(this.settings.activeClass),this.settings.center&&(this.$stage.children("."+this.settings.centerClass).removeClass(this.settings.centerClass),this.$stage.children().eq(this.current()).addClass(this.settings.centerClass))}}],e.prototype.initialize=function(){if(this.trigger("initialize"),this.$element.addClass(this.settings.baseClass).addClass(this.settings.themeClass).toggleClass("owl-rtl",this.settings.rtl),this.browserSupport(),this.settings.autoWidth&&this.state.imagesLoaded!==!0){var b,c,e;if(b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&0>=e)return this.preloadAutoWidthImages(b),!1}this.$element.addClass("owl-loading"),this.$stage=a("<"+this.settings.stageElement+' class="owl-stage"/>').wrap('<div class="owl-stage-outer">'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this._width=this.$element.width(),this.refresh(),this.$element.removeClass("owl-loading").addClass("owl-loaded"),this.eventsCall(),this.internalEvents(),this.addTriggerableEvents(),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){b>=a&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),delete e.responsive,e.responsiveClass&&this.$element.attr("class",function(a,b){return b.replace(/\b owl-responsive-\S+/g,"")}).addClass("owl-responsive-"+d)):e=a.extend({},this.options),(null===this.settings||this._breakpoint!==d)&&(this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}}))},e.prototype.optionsLogic=function(){this.$element.toggleClass("owl-center",this.settings.center),this.settings.loop&&this._items.length<this.settings.items&&(this.settings.loop=!1),this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.settings.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};c>b;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={}},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){if(0===this._items.length)return!1;(new Date).getTime();this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$stage.addClass("owl-refresh"),this.update(),this.$stage.removeClass("owl-refresh"),this.state.orientation=b.orientation,this.watchVisibility(),this.trigger("refreshed")},e.prototype.eventsCall=function(){this.e._onDragStart=a.proxy(function(a){this.onDragStart(a)},this),this.e._onDragMove=a.proxy(function(a){this.onDragMove(a)},this),this.e._onDragEnd=a.proxy(function(a){this.onDragEnd(a)},this),this.e._onResize=a.proxy(function(a){this.onResize(a)},this),this.e._transitionEnd=a.proxy(function(a){this.transitionEnd(a)},this),this.e._preventClick=a.proxy(function(a){this.preventClick(a)},this)},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this.e._onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.trigger("resize").isDefaultPrevented()?!1:(this._width=this.$element.width(),this.invalidate("width"),this.refresh(),void this.trigger("resized")):!1},e.prototype.eventsRouter=function(a){var b=a.type;"mousedown"===b||"touchstart"===b?this.onDragStart(a):"mousemove"===b||"touchmove"===b?this.onDragMove(a):"mouseup"===b||"touchend"===b?this.onDragEnd(a):"touchcancel"===b&&this.onDragEnd(a)},e.prototype.internalEvents=function(){var c=(k(),l());this.settings.mouseDrag?(this.$stage.on("mousedown",a.proxy(function(a){this.eventsRouter(a)},this)),this.$stage.on("dragstart",function(){return!1}),this.$stage.get(0).onselectstart=function(){return!1}):this.$element.addClass("owl-text-select-on"),this.settings.touchDrag&&!c&&this.$stage.on("touchstart touchcancel",a.proxy(function(a){this.eventsRouter(a)},this)),this.transitionEndVendor&&this.on(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd,!1),this.settings.responsive!==!1&&this.on(b,"resize",a.proxy(this.onThrottledResize,this))},e.prototype.onDragStart=function(d){var e,g,h,i;if(e=d.originalEvent||d||b.event,3===e.which||this.state.isTouch)return!1;if("mousedown"===e.type&&this.$stage.addClass("owl-grab"),this.trigger("drag"),this.drag.startTime=(new Date).getTime(),this.speed(0),this.state.isTouch=!0,this.state.isScrolling=!1,this.state.isSwiping=!1,this.drag.distance=0,g=f(e).x,h=f(e).y,this.drag.offsetX=this.$stage.position().left,this.drag.offsetY=this.$stage.position().top,this.settings.rtl&&(this.drag.offsetX=this.$stage.position().left+this.$stage.width()-this.width()+this.settings.margin),this.state.inMotion&&this.support3d)i=this.getTransformProperty(),this.drag.offsetX=i,this.animate(i),this.state.inMotion=!0;else if(this.state.inMotion&&!this.support3d)return this.state.inMotion=!1,!1;this.drag.startX=g-this.drag.offsetX,this.drag.startY=h-this.drag.offsetY,this.drag.start=g-this.drag.startX,this.drag.targetEl=e.target||e.srcElement,this.drag.updatedX=this.drag.start,("IMG"===this.drag.targetEl.tagName||"A"===this.drag.targetEl.tagName)&&(this.drag.targetEl.draggable=!1),a(c).on("mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents",a.proxy(function(a){this.eventsRouter(a)},this))},e.prototype.onDragMove=function(a){var c,e,g,h,i,j;this.state.isTouch&&(this.state.isScrolling||(c=a.originalEvent||a||b.event,e=f(c).x,g=f(c).y,this.drag.currentX=e-this.drag.startX,this.drag.currentY=g-this.drag.startY,this.drag.distance=this.drag.currentX-this.drag.offsetX,this.drag.distance<0?this.state.direction=this.settings.rtl?"right":"left":this.drag.distance>0&&(this.state.direction=this.settings.rtl?"left":"right"),this.settings.loop?this.op(this.drag.currentX,">",this.coordinates(this.minimum()))&&"right"===this.state.direction?this.drag.currentX-=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length):this.op(this.drag.currentX,"<",this.coordinates(this.maximum()))&&"left"===this.state.direction&&(this.drag.currentX+=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length)):(h=this.coordinates(this.settings.rtl?this.maximum():this.minimum()),i=this.coordinates(this.settings.rtl?this.minimum():this.maximum()),j=this.settings.pullDrag?this.drag.distance/5:0,this.drag.currentX=Math.max(Math.min(this.drag.currentX,h+j),i+j)),(this.drag.distance>8||this.drag.distance<-8)&&(c.preventDefault!==d?c.preventDefault():c.returnValue=!1,this.state.isSwiping=!0),this.drag.updatedX=this.drag.currentX,(this.drag.currentY>16||this.drag.currentY<-16)&&this.state.isSwiping===!1&&(this.state.isScrolling=!0,this.drag.updatedX=this.drag.start),this.animate(this.drag.updatedX)))},e.prototype.onDragEnd=function(b){var d,e,f;if(this.state.isTouch){if("mouseup"===b.type&&this.$stage.removeClass("owl-grab"),this.trigger("dragged"),this.drag.targetEl.removeAttribute("draggable"),this.state.isTouch=!1,this.state.isScrolling=!1,this.state.isSwiping=!1,0===this.drag.distance&&this.state.inMotion!==!0)return this.state.inMotion=!1,!1;this.drag.endTime=(new Date).getTime(),d=this.drag.endTime-this.drag.startTime,e=Math.abs(this.drag.distance),(e>3||d>300)&&this.removeClick(this.drag.targetEl),f=this.closest(this.drag.updatedX),this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(f),this.invalidate("position"),this.update(),this.settings.pullDrag||this.drag.updatedX!==this.coordinates(f)||this.transitionEnd(),this.drag.distance=0,a(c).off(".owl.dragEvents")}},e.prototype.removeClick=function(c){this.drag.targetEl=c,a(c).on("click.preventClick",this.e._preventClick),b.setTimeout(function(){a(c).off("click.preventClick")},300)},e.prototype.preventClick=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation&&b.stopPropagation(),a(b.target).off("click.preventClick")},e.prototype.getTransformProperty=function(){var a,c;return a=b.getComputedStyle(this.$stage.get(0),null).getPropertyValue(this.vendorName+"transform"),a=a.replace(/matrix(3d)?\(|\)/g,"").split(","),c=16===a.length,c!==!0?a[4]:a[12]},e.prototype.closest=function(b){var c=-1,d=30,e=this.width(),f=this.coordinates();return this.settings.freeDrag||a.each(f,a.proxy(function(a,g){return b>g-d&&g+d>b?c=a:this.op(b,"<",g)&&this.op(b,">",f[a+1]||g-e)&&(c="left"===this.state.direction?a+1:a),-1===c},this)),this.settings.loop||(this.op(b,">",f[this.minimum()])?c=b=this.minimum():this.op(b,"<",f[this.maximum()])&&(c=b=this.maximum())),c},e.prototype.animate=function(b){this.trigger("translate"),this.state.inMotion=this.speed()>0,this.support3d?this.$stage.css({transform:"translate3d("+b+"px,0px, 0px)",transition:this.speed()/1e3+"s"}):this.state.isTouch?this.$stage.css({left:b+"px"}):this.$stage.animate({left:b},this.speed()/1e3,this.settings.fallbackEasing,a.proxy(function(){this.state.inMotion&&this.transitionEnd()},this))},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(a){this._invalidated[a]=!0},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(b,c){var e=c?this._items.length:this._items.length+this._clones.length;return!a.isNumeric(b)||1>e?d:b=this._clones.length?(b%e+e)%e:Math.max(this.minimum(c),Math.min(this.maximum(c),b))},e.prototype.relative=function(a){return a=this.normalize(a),a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=0,f=this.settings;if(a)return this._items.length-1;if(!f.loop&&f.center)b=this._items.length-1;else if(f.loop||f.center)if(f.loop||f.center)b=this._items.length+f.items;else{if(!f.autoWidth&&!f.merge)throw"Can not detect maximum absolute position.";for(revert=f.rtl?1:-1,c=this.$stage.width()-this.$element.width();(d=this.coordinates(e))&&!(d*revert>=c);)b=++e}else b=this._items.length-f.items;return b},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c=null;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[b-1]||0))/2*(this.settings.rtl?-1:1)):c=this._coordinates[b-1]||0,c)},e.prototype.duration=function(a,b,c){return Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(c,d){if(this.settings.loop){var e=c-this.relative(this.current()),f=this.current(),g=this.current(),h=this.current()+e,i=0>g-h?!0:!1,j=this._clones.length+this._items.length;h<this.settings.items&&i===!1?(f=g+this._items.length,this.reset(f)):h>=j-this.settings.items&&i===!0&&(f=g-this._items.length,this.reset(f)),b.clearTimeout(this.e._goToLoop),this.e._goToLoop=b.setTimeout(a.proxy(function(){this.speed(this.duration(this.current(),f+e,d)),this.current(f+e),this.update()},this),30)}else this.speed(this.duration(this.current(),c,d)),this.current(c),this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.transitionEnd=function(a){return a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))?!1:(this.state.inMotion=!1,void this.trigger("translated"))},e.prototype.viewport=function(){var d;if(this.options.responsiveBaseElement!==b)d=a(this.options.responsiveBaseElement).width();else if(b.innerWidth)d=b.innerWidth;else{if(!c.documentElement||!c.documentElement.clientWidth)throw"Can not detect viewport width.";d=c.documentElement.clientWidth}return d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)},this)),this.reset(a.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(a,b){b=b===d?this._items.length:this.normalize(b,!0),this.trigger("add",{content:a,position:b}),0===this._items.length||b===this._items.length?(this.$stage.append(a),this._items.push(a),this._mergers.push(1*a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)):(this._items[b].before(a),this._items.splice(b,0,a),this._mergers.splice(b,0,1*a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)),this.invalidate("items"),this.trigger("added",{content:a,position:b})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.addTriggerableEvents=function(){var b=a.proxy(function(b,c){return a.proxy(function(a){a.relatedTarget!==this&&(this.suppress([c]),b.apply(this,[].slice.call(arguments,1)),this.release([c]))},this)},this);a.each({next:this.next,prev:this.prev,to:this.to,destroy:this.destroy,refresh:this.refresh,replace:this.replace,add:this.add,remove:this.remove},a.proxy(function(a,c){this.$element.on(a+".owl.carousel",b(c,a+".owl.carousel"))},this))},e.prototype.watchVisibility=function(){function c(a){return a.offsetWidth>0&&a.offsetHeight>0}function d(){c(this.$element.get(0))&&(this.$element.removeClass("owl-hidden"),this.refresh(),b.clearInterval(this.e._checkVisibile))}c(this.$element.get(0))||(this.$element.addClass("owl-hidden"),b.clearInterval(this.e._checkVisibile),this.e._checkVisibile=b.setInterval(a.proxy(d,this),500))},e.prototype.preloadAutoWidthImages=function(b){var c,d,e,f;c=0,d=this,b.each(function(g,h){e=a(h),f=new Image,f.onload=function(){c++,e.attr("src",f.src),e.css("opacity",1),c>=b.length&&(d.state.imagesLoaded=!0,d.initialize())},f.src=e.attr("src")||e.attr("data-src")||e.attr("data-src-retina")})},e.prototype.destroy=function(){this.$element.hasClass(this.settings.themeClass)&&this.$element.removeClass(this.settings.themeClass),this.settings.responsive!==!1&&a(b).off("resize.owl.carousel"),this.transitionEndVendor&&this.off(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd);for(var d in this._plugins)this._plugins[d].destroy();(this.settings.mouseDrag||this.settings.touchDrag)&&(this.$stage.off("mousedown touchstart touchcancel"),a(c).off(".owl.dragEvents"),this.$stage.get(0).onselectstart=function(){},this.$stage.off("dragstart",function(){return!1})),this.$element.off(".owl"),this.$stage.children(".cloned").remove(),this.e=null,this.$element.removeData("owlCarousel"),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.unwrap()},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:c>a;case">":return d?c>a:a>c;case">=":return d?c>=a:a>=c;case"<=":return d?a>=c:c>=a}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d){var e={item:{count:this._items.length,index:this.current()}},f=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),g=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},e,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(g)}),this.$element.trigger(g),this.settings&&"function"==typeof this.settings[f]&&this.settings[f].apply(this,g)),g},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.browserSupport=function(){if(this.support3d=j(),this.support3d){this.transformVendor=i();var a=["transitionend","webkitTransitionEnd","transitionend","oTransitionEnd"];this.transitionEndVendor=a[h()],this.vendorName=this.transformVendor.replace(/Transform/i,""),this.vendorName=""!==this.vendorName?"-"+this.vendorName.toLowerCase()+"-":""}this.state.orientation=b.orientation},a.fn.owlCarousel=function(b){return this.each(function(){a(this).data("owlCarousel")||a(this).data("owlCarousel",new e(this,b))})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b){var c=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,d=c.center&&Math.ceil(c.items/2)||c.items,e=c.center&&-1*d||0,f=(b.property&&b.property.value||this._core.current())+e,g=this._core.clones().length,h=a.proxy(function(a,b){this.load(b)},this);e++<d;)this.load(g/2+this._core.relative(f)),g&&a.each(this._core.clones(this._core.relative(f++)),h)},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this._core.$element.on(this._handlers)};c.Defaults={lazyLoad:!1},c.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":"url("+g+")",opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},c.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=c}(window.Zepto||window.jQuery,window,document),function(a){var b=function(c){this._core=c,this._handlers={"initialized.owl.carousel":a.proxy(function(){this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass)===this._core.$stage.children().eq(this._core.current())&&this.update()},this)},this._core.options=a.extend({},b.Defaults,this._core.options),this._core.$element.on(this._handlers)};b.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},b.prototype.update=function(){this._core.$stage.parent().height(this._core.$stage.children().eq(this._core.current()).height()).addClass(this._core.settings.autoHeightClass)},b.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=b}(window.Zepto||window.jQuery,window,document),function(a,b,c){var d=function(b){this._core=b,this._videos={},this._playing=null,this._fullscreen=!1,this._handlers={"resize.owl.carousel":a.proxy(function(a){this._core.settings.video&&!this.isInFullScreen()&&a.preventDefault()},this),"refresh.owl.carousel changed.owl.carousel":a.proxy(function(){this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))},this)},this._core.options=a.extend({},d.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};d.Defaults={video:!1,videoHeight:!1,videoWidth:!1},d.prototype.fetch=function(a,b){var c=a.attr("data-vimeo-id")?"vimeo":"youtube",d=a.attr("data-vimeo-id")||a.attr("data-youtube-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else{if(!(d[3].indexOf("vimeo")>-1))throw new Error("Video URL not supported.");c="vimeo"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},d.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};return b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(l(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(f="http://img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type&&a.ajax({type:"GET",url:"http://vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}))},d.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null},d.prototype.play=function(b){this._core.trigger("play",null,"video"),this._playing&&this.stop();var c,d,e=a(b.target||b.srcElement),f=e.closest("."+this._core.settings.itemClass),g=this._videos[f.attr("data-video")],h=g.width||"100%",i=g.height||this._core.$stage.height();"youtube"===g.type?c='<iframe width="'+h+'" height="'+i+'" src="http://www.youtube.com/embed/'+g.id+"?autoplay=1&v="+g.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===g.type&&(c='<iframe src="http://player.vimeo.com/video/'+g.id+'?autoplay=1" width="'+h+'" height="'+i+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),f.addClass("owl-video-playing"),this._playing=f,d=a('<div style="height:'+i+"px; width:"+h+'px" class="owl-video-frame">'+c+"</div>"),e.after(d)},d.prototype.isInFullScreen=function(){var d=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return d&&a(d).parent().hasClass("owl-video-frame")&&(this._core.speed(0),this._fullscreen=!0),d&&this._fullscreen&&this._playing?!1:this._fullscreen?(this._fullscreen=!1,!1):this._playing&&this._core.state.orientation!==b.orientation?(this._core.state.orientation=b.orientation,!1):!0},d.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=d}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){this.swapping="translated"==a.type},this),"translate.owl.carousel":a.proxy(function(){this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&this.core.support3d){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c)),f&&e.addClass("animated owl-animated-in").addClass(f).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.transitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c){var d=function(b){this.core=b,this.core.options=a.extend({},d.Defaults,this.core.options),this.handlers={"translated.owl.carousel refreshed.owl.carousel":a.proxy(function(){this.autoplay()
2
- },this),"play.owl.autoplay":a.proxy(function(a,b,c){this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(){this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.autoplay()},this)},this.core.$element.on(this.handlers)};d.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},d.prototype.autoplay=function(){this.core.settings.autoplay&&!this.core.state.videoPlay?(b.clearInterval(this.interval),this.interval=b.setInterval(a.proxy(function(){this.play()},this),this.core.settings.autoplayTimeout)):b.clearInterval(this.interval)},d.prototype.play=function(){return c.hidden===!0||this.core.state.isTouch||this.core.state.isScrolling||this.core.state.isSwiping||this.core.state.inMotion?void 0:this.core.settings.autoplay===!1?void b.clearInterval(this.interval):void this.core.next(this.core.settings.autoplaySpeed)},d.prototype.stop=function(){b.clearInterval(this.interval)},d.prototype.pause=function(){b.clearInterval(this.interval)},d.prototype.destroy=function(){var a,c;b.clearInterval(this.interval);for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=d}(window.Zepto||window.jQuery,window,document),function(a){"use strict";var b=function(c){this._core=c,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.push(a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"add.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.splice(b.position,0,a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"remove.owl.carousel prepared.owl.carousel":a.proxy(function(a){this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"change.owl.carousel":a.proxy(function(a){if("position"==a.property.name&&!this._core.state.revert&&!this._core.settings.loop&&this._core.settings.navRewind){var b=this._core.current(),c=this._core.maximum(),d=this._core.minimum();a.data=a.property.value>c?b>=c?d:c:a.property.value<d?c:a.property.value}},this),"changed.owl.carousel":a.proxy(function(a){"position"==a.property.name&&this.draw()},this),"refreshed.owl.carousel":a.proxy(function(){this._initialized||(this.initialize(),this._initialized=!0),this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation")},this)},this._core.options=a.extend({},b.Defaults,this._core.options),this.$element.on(this._handlers)};b.Defaults={nav:!1,navRewind:!0,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotData:!1,dotsSpeed:!1,dotsContainer:!1,controlsClass:"owl-controls"},b.prototype.initialize=function(){var b,c,d=this._core.settings;d.dotsData||(this._templates=[a("<div>").addClass(d.dotClass).append(a("<span>")).prop("outerHTML")]),d.navContainer&&d.dotsContainer||(this._controls.$container=a("<div>").addClass(d.controlsClass).appendTo(this.$element)),this._controls.$indicators=d.dotsContainer?a(d.dotsContainer):a("<div>").hide().addClass(d.dotsClass).appendTo(this._controls.$container),this._controls.$indicators.on("click","div",a.proxy(function(b){var c=a(b.target).parent().is(this._controls.$indicators)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(c,d.dotsSpeed)},this)),b=d.navContainer?a(d.navContainer):a("<div>").addClass(d.navContainerClass).prependTo(this._controls.$container),this._controls.$next=a("<"+d.navElement+">"),this._controls.$previous=this._controls.$next.clone(),this._controls.$previous.addClass(d.navClass[0]).html(d.navText[0]).hide().prependTo(b).on("click",a.proxy(function(){this.prev(d.navSpeed)},this)),this._controls.$next.addClass(d.navClass[1]).html(d.navText[1]).hide().appendTo(b).on("click",a.proxy(function(){this.next(d.navSpeed)},this));for(c in this._overrides)this._core[c]=a.proxy(this[c],this)},b.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},b.prototype.update=function(){var a,b,c,d=this._core.settings,e=this._core.clones().length/2,f=e+this._core.items().length,g=d.center||d.autoWidth||d.dotData?1:d.dotsEach||d.items;if("page"!==d.slideBy&&(d.slideBy=Math.min(d.slideBy,d.items)),d.dots||"page"==d.slideBy)for(this._pages=[],a=e,b=0,c=0;f>a;a++)(b>=g||0===b)&&(this._pages.push({start:a-e,end:a-e+g-1}),b=0,++c),b+=this._core.mergers(this._core.relative(a))},b.prototype.draw=function(){var b,c,d="",e=this._core.settings,f=(this._core.$stage.children(),this._core.relative(this._core.current()));if(!e.nav||e.loop||e.navRewind||(this._controls.$previous.toggleClass("disabled",0>=f),this._controls.$next.toggleClass("disabled",f>=this._core.maximum())),this._controls.$previous.toggle(e.nav),this._controls.$next.toggle(e.nav),e.dots){if(b=this._pages.length-this._controls.$indicators.children().length,e.dotData&&0!==b){for(c=0;c<this._controls.$indicators.children().length;c++)d+=this._templates[this._core.relative(c)];this._controls.$indicators.html(d)}else b>0?(d=new Array(b+1).join(this._templates[0]),this._controls.$indicators.append(d)):0>b&&this._controls.$indicators.children().slice(b).remove();this._controls.$indicators.find(".active").removeClass("active"),this._controls.$indicators.children().eq(a.inArray(this.current(),this._pages)).addClass("active")}this._controls.$indicators.toggle(e.dots)},b.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotData?1:c.dotsEach||c.items)}},b.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,function(a){return a.start<=b&&a.end>=b}).pop()},b.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},b.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},b.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},b.prototype.to=function(b,c,d){var e;d?a.proxy(this._overrides.to,this._core)(b,c):(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c))},a.fn.owlCarousel.Constructor.Plugins.Navigation=b}(window.Zepto||window.jQuery,window,document),function(a,b){"use strict";var c=function(d){this._core=d,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(){"URLHash"==this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");this._hashes[c]=b.content},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(){var a=b.location.hash.substring(1),c=this._core.$stage.children(),d=this._hashes[a]&&c.index(this._hashes[a])||0;return a?void this._core.to(d,!1,!0):!1},this))};c.Defaults={URLhashListener:!1},c.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=c}(window.Zepto||window.jQuery,window,document);
 
 
includes/scripts.php CHANGED
@@ -32,11 +32,11 @@ if( !function_exists ('wc_gallery_scripts') ) :
32
  }
33
 
34
  // Gallery Shortcode
35
- wp_enqueue_style( 'wc-gallery-flexslider-style', plugin_dir_url( __FILE__ ) . 'js/flexslider/flexslider.css', array( ), '2.2.0' );
36
- wp_enqueue_style( 'wc-gallery-owlcarousel-style', plugin_dir_url( __FILE__ ) . 'js/owlcarousel/assets/owl.carousel.min.css', array( ), '2.0.0' );
37
- wp_enqueue_style( 'wc-gallery-owlcarousel-theme-style', plugin_dir_url( __FILE__ ) . 'js/owlcarousel/assets/owl.theme.default.css', array( ), '2.0.0' );
38
- wp_register_script( 'wc-gallery-flexslider', plugin_dir_url( __FILE__ ) . 'js/flexslider/jquery.flexslider-min.js', array ( 'jquery' ), '2.2.2.1', true );
39
- wp_register_script( 'wc-gallery-owlcarousel', plugin_dir_url( __FILE__ ) . 'js/owlcarousel/owl.carousel.min.js', array ( 'jquery' ), '2.0.0', true );
40
  wp_register_script( 'wc-gallery', plugin_dir_url( __FILE__ ) . 'js/gallery.js', array ( 'jquery', 'wordpresscanvas-imagesloaded' ), $ver, true );
41
  wp_register_script( 'wc-gallery-woocommerce-product', plugin_dir_url( __FILE__ ) . 'js/woocommerce.product.js', array( 'jquery' ), $ver, true );
42
 
32
  }
33
 
34
  // Gallery Shortcode
35
+ wp_enqueue_style( 'wc-gallery-flexslider-style', plugin_dir_url( __FILE__ ) . 'vendors/flexslider/flexslider.css', array( ), '2.5.0' );
36
+ wp_enqueue_style( 'wc-gallery-owlcarousel-style', plugin_dir_url( __FILE__ ) . 'vendors/owlcarousel/assets/owl.carousel.css', array( ), '2.0.0-beta.3.0' );
37
+ wp_enqueue_style( 'wc-gallery-owlcarousel-theme-style', plugin_dir_url( __FILE__ ) . 'vendors/owlcarousel/assets/owl.theme.default.css', array( ), '2.0.0-beta.3.0' );
38
+ wp_register_script( 'wc-gallery-flexslider', plugin_dir_url( __FILE__ ) . 'vendors/flexslider/jquery.flexslider-min.js', array ( 'jquery' ), '2.5', true );
39
+ wp_register_script( 'wc-gallery-owlcarousel', plugin_dir_url( __FILE__ ) . 'vendors/owlcarousel/owl.carousel.min.js', array ( 'jquery' ), '2.0.0-beta.3.0', true );
40
  wp_register_script( 'wc-gallery', plugin_dir_url( __FILE__ ) . 'js/gallery.js', array ( 'jquery', 'wordpresscanvas-imagesloaded' ), $ver, true );
41
  wp_register_script( 'wc-gallery-woocommerce-product', plugin_dir_url( __FILE__ ) . 'js/woocommerce.product.js', array( 'jquery' ), $ver, true );
42
 
includes/{js/owlcarousel/LICENSE-MIT → vendors/owlcarousel/LICENSE} RENAMED
File without changes
includes/vendors/owlcarousel/README.md ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [![Stories in Ready](https://badge.waffle.io/smashingboxes/OwlCarousel2.png?label=ready&title=Ready)](http://waffle.io/smashingboxes/OwlCarousel2)
2
+ [![Build Status](https://travis-ci.org/smashingboxes/OwlCarousel2.svg)](https://travis-ci.org/smashingboxes/OwlCarousel2)
3
+
4
+ ## Announcement.
5
+
6
+ Big announcement comming about maintainance of this project. Stay tuned!
7
+
8
+ ## Owl Carousel 2 Beta
9
+
10
+ Touch enabled [jQuery](http://jquery.com/) plugin that lets you createbeautiful responsive carousel slider. **To get started, check out http://owlcarousel.owlgraphic.com.**
11
+
12
+ Please consider that the project is still in beta. The current status of the milestones can be found [here](https://github.com/OwlFonk/OwlCarousel2/milestones). If you want to use the [latest development](https://github.com/OwlFonk/OwlCarousel2/archive/develop.zip) see [building](#building).
13
+
14
+ ## Quick start
15
+
16
+ Download the [latest release](http://owlcarousel.owlgraphic.com/download/owl.carousel.zip) and put the required stylesheet at the [top](https://developer.yahoo.com/performance/rules.html#css_top) of your markup:
17
+
18
+ ```html
19
+ <link rel="stylesheet" href="owlcarousel/owl.carousel.min.css" />
20
+ ```
21
+
22
+ Put the script at the [bottom](https://developer.yahoo.com/performance/rules.html#js_bottom) of your markup right after jQuery:
23
+
24
+ ```html
25
+ <script src="jquery.min.js"></script>
26
+ <script src="owlcarousel/owl.carousel.min.js"></script>
27
+ ```
28
+
29
+ Wrap your items (`div`, `a`, `img`, `span`, `li` etc.) with a container element (`div`, `ul` etc.). Only the class `owl-carousel` is mandatory to apply proper styles:
30
+
31
+ ```html
32
+ <div class="owl-carousel">
33
+ <div> Your Content </div>
34
+ <div> Your Content </div>
35
+ <div> Your Content </div>
36
+ <div> Your Content </div>
37
+ <div> Your Content </div>
38
+ <div> Your Content </div>
39
+ <div> Your Content </div>
40
+ </div>
41
+ ```
42
+
43
+ Call the [plugin](http://learn.jquery.com/plugins/) function and your carousel is ready.
44
+
45
+ ```javascript
46
+ $(document).ready(function(){
47
+ $('.owl-carousel').owlCarousel();
48
+ });
49
+ ```
50
+
51
+ ## Documentation
52
+
53
+ The documentation, included in this repo in the root directory, is built with [Assemble](http://assemble.io/) and publicly available at http://owlcarousel.owlgraphic.com. The documentation may also be run locally.
54
+
55
+ ## Building
56
+
57
+ This package comes with [Grunt](http://gruntjs.com/) and [Bower](http://bower.io/). The following tasks are available:
58
+
59
+ * `default` compiles the CSS and JS into `/dist` and builds the doc.
60
+ * `dist` compiles the CSS and JS into `/dist` only.
61
+ * `watch` watches source files and builds them automatically whenever you save.
62
+ * `test` runs [JSHint](http://www.jshint.com/) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/).
63
+
64
+ To define which plugins are build into the distribution just edit `/_config.json` to fit your needs.
65
+
66
+ ## Contributing
67
+
68
+ The [issue tracker](https://github.com/OwlFonk/OwlCarousel2/issues) is the preferred channel for bug reports, features requests and submitting pull requests.
69
+
70
+ **Please do not use the issue tracker for personal support requests. Stack Overflow ([`owl-carousel`](http://stackoverflow.com/questions/tagged/owl-carousel)) is a better place to get help.**
71
+
72
+ ### Bug reports
73
+
74
+ A bug is a **demonstrable problem** that is caused by the code in the repository. Good bug reports are extremely helpful, so thanks!
75
+
76
+ Guidelines for bug reports:
77
+
78
+ 1. Use the GitHub issue search — check if the issue has already been reported.
79
+
80
+ 2. Check if the issue has been fixed — try to reproduce it using the latest `develop` branch in the repository.
81
+
82
+ 3. Isolate the problem — ideally create a reduced test case and a live example. This [JSFiddle](http://jsfiddle.net/eqbL6vLb/) and this [JS Bin](http://jsbin.com/xuxozu/1) are helpful templates you can fork or clone.
83
+
84
+ Example:
85
+
86
+ > Short and descriptive example bug report title
87
+ >
88
+ > A summary of the issue and the browser/OS environment in which it occurs. If suitable, include the steps required to reproduce the bug.
89
+ >
90
+ > 1. This is the first step
91
+ > 2. This is the second step
92
+ > 3. Further steps, etc.
93
+ >
94
+ > `<url>` - a link to the reduced test case
95
+ >
96
+ > Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, and potential solutions (and your opinions on their merits).
97
+
98
+ ### Feature requests
99
+
100
+ Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible.
101
+
102
+ ### Pull requests
103
+
104
+ Good pull requests are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.
105
+
106
+ **Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
107
+
108
+ Adhering to the following process is the best way to get your work included in the project:
109
+
110
+ 1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes:
111
+
112
+ ```bash
113
+ git clone https://github.com/<your-username>/OwlCarousel2.git
114
+ cd OwlCarousel2
115
+ git remote add upstream https://github.com/OwlFonk/OwlCarousel2.git
116
+ ```
117
+
118
+ 2. If you cloned a while ago, get the latest changes from upstream:
119
+
120
+ ```bash
121
+ git checkout develop
122
+ git pull [--rebase] upstream develop
123
+ ```
124
+
125
+ 3. Create a new topic branch (off the main project `develop` branch) to contain your feature, change, or fix:
126
+
127
+ ```bash
128
+ git checkout -b <topic-branch-name>
129
+ ```
130
+
131
+ 4. Build the distribution before committing to ensure your changes follow the coding standards and all build files are up to date.
132
+
133
+ ```bash
134
+ grunt dist
135
+ ```
136
+
137
+ 5. Commit your changes in logical chunks. Please adhere to these [guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). Use Git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public.
138
+
139
+ 6. Locally merge (or rebase) the upstream development branch into your topic branch:
140
+
141
+ ```bash
142
+ git pull [--rebase] upstream develop
143
+ ```
144
+
145
+ 7. Push your topic branch up to your fork:
146
+
147
+ ```bash
148
+ git push origin <topic-branch-name>
149
+ ```
150
+
151
+ 8. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description against the `develop` branch.
152
+
153
+ **By submitting a patch, you agree to allow the project owner to
154
+ license your work under the terms of the [MIT License](LICENSE).**
155
+
156
+ ## License
157
+
158
+ The code and the documentation are released under the [MIT License](LICENSE).
includes/{js → vendors}/owlcarousel/assets/owl.carousel.css RENAMED
@@ -5,37 +5,28 @@
5
  -webkit-animation-duration: 1000ms;
6
  animation-duration: 1000ms;
7
  -webkit-animation-fill-mode: both;
8
- animation-fill-mode: both;
9
- }
10
  .owl-carousel .owl-animated-in {
11
- z-index: 0;
12
- }
13
  .owl-carousel .owl-animated-out {
14
- z-index: 1;
15
- }
16
  .owl-carousel .fadeOut {
17
  -webkit-animation-name: fadeOut;
18
- animation-name: fadeOut;
19
- }
20
 
21
  @-webkit-keyframes fadeOut {
22
  0% {
23
- opacity: 1;
24
- }
25
 
26
  100% {
27
- opacity: 0;
28
- }
29
- }
30
  @keyframes fadeOut {
31
  0% {
32
- opacity: 1;
33
- }
34
 
35
  100% {
36
- opacity: 0;
37
- }
38
- }
39
 
40
  /*
41
  * Owl Carousel - Auto Height Plugin
@@ -45,8 +36,7 @@
45
  -moz-transition: height 500ms ease-in-out;
46
  -ms-transition: height 500ms ease-in-out;
47
  -o-transition: height 500ms ease-in-out;
48
- transition: height 500ms ease-in-out;
49
- }
50
 
51
  /*
52
  * Core Owl Carousel CSS File
@@ -57,91 +47,71 @@
57
  -webkit-tap-highlight-color: transparent;
58
  /* position relative and z-index fix webkit rendering fonts issue */
59
  position: relative;
60
- z-index: 1;
61
- }
62
- .owl-carousel .owl-stage {
63
- position: relative;
64
- -ms-touch-action: pan-Y;
65
- }
66
- .owl-carousel .owl-stage:after {
67
- content: ".";
68
- display: block;
69
- clear: both;
70
- visibility: hidden;
71
- line-height: 0;
72
- height: 0;
73
- }
74
- .owl-carousel .owl-stage-outer {
75
- position: relative;
76
- overflow: hidden;
77
- /* fix for flashing background */
78
- -webkit-transform: translate3d(0px, 0px, 0px);
79
- }
80
- .owl-carousel .owl-controls .owl-nav .owl-prev,
81
- .owl-carousel .owl-controls .owl-nav .owl-next,
82
- .owl-carousel .owl-controls .owl-dot {
83
- cursor: pointer;
84
- cursor: hand;
85
- -webkit-user-select: none;
86
- -khtml-user-select: none;
87
- -moz-user-select: none;
88
- -ms-user-select: none;
89
- user-select: none;
90
- }
91
- .owl-carousel.owl-loaded {
92
- display: block;
93
- }
94
- .owl-carousel.owl-loading {
95
- opacity: 0;
96
- display: block;
97
- }
98
- .owl-carousel.owl-hidden {
99
- opacity: 0;
100
- }
101
- .owl-carousel .owl-refresh .owl-item {
102
- display: none;
103
- }
104
- .owl-carousel .owl-item {
105
- position: relative;
106
- min-height: 1px;
107
- float: left;
108
- -webkit-backface-visibility: hidden;
109
- -webkit-tap-highlight-color: transparent;
110
- -webkit-touch-callout: none;
111
- -webkit-user-select: none;
112
- -moz-user-select: none;
113
- -ms-user-select: none;
114
- user-select: none;
115
- }
116
- .owl-carousel .owl-item img {
117
- display: block;
118
- width: 100%;
119
- -webkit-transform-style: preserve-3d;
120
- }
121
- .owl-carousel.owl-text-select-on .owl-item {
122
- -webkit-user-select: auto;
123
- -moz-user-select: auto;
124
- -ms-user-select: auto;
125
- user-select: auto;
126
- }
127
- .owl-carousel .owl-grab {
128
- cursor: move;
129
- cursor: -webkit-grab;
130
- cursor: -o-grab;
131
- cursor: -ms-grab;
132
- cursor: grab;
133
- }
134
- .owl-carousel.owl-rtl {
135
- direction: rtl;
136
- }
137
- .owl-carousel.owl-rtl .owl-item {
138
- float: right;
139
- }
140
 
141
  /* No Js */
142
  .no-js .owl-carousel {
143
- display: block;
144
- }
145
 
146
  /*
147
  * Owl Carousel - Lazy Load Plugin
@@ -152,11 +122,9 @@
152
  -moz-transition: opacity 400ms ease;
153
  -ms-transition: opacity 400ms ease;
154
  -o-transition: opacity 400ms ease;
155
- transition: opacity 400ms ease;
156
- }
157
  .owl-carousel .owl-item img {
158
- transform-style: preserve-3d;
159
- }
160
 
161
  /*
162
  * Owl Carousel - Video Plugin
@@ -164,8 +132,7 @@
164
  .owl-carousel .owl-video-wrapper {
165
  position: relative;
166
  height: 100%;
167
- background: #000;
168
- }
169
  .owl-carousel .owl-video-play-icon {
170
  position: absolute;
171
  height: 80px;
@@ -182,19 +149,15 @@
182
  -moz-transition: scale 100ms ease;
183
  -ms-transition: scale 100ms ease;
184
  -o-transition: scale 100ms ease;
185
- transition: scale 100ms ease;
186
- }
187
  .owl-carousel .owl-video-play-icon:hover {
188
  -webkit-transition: scale(1.3, 1.3);
189
  -moz-transition: scale(1.3, 1.3);
190
  -ms-transition: scale(1.3, 1.3);
191
  -o-transition: scale(1.3, 1.3);
192
- transition: scale(1.3, 1.3);
193
- }
194
- .owl-carousel .owl-video-playing .owl-video-tn,
195
- .owl-carousel .owl-video-playing .owl-video-play-icon {
196
- display: none;
197
- }
198
  .owl-carousel .owl-video-tn {
199
  opacity: 0;
200
  height: 100%;
@@ -208,9 +171,9 @@
208
  -moz-transition: opacity 400ms ease;
209
  -ms-transition: opacity 400ms ease;
210
  -o-transition: opacity 400ms ease;
211
- transition: opacity 400ms ease;
212
- }
213
  .owl-carousel .owl-video-frame {
214
  position: relative;
215
  z-index: 1;
216
- }
 
5
  -webkit-animation-duration: 1000ms;
6
  animation-duration: 1000ms;
7
  -webkit-animation-fill-mode: both;
8
+ animation-fill-mode: both; }
 
9
  .owl-carousel .owl-animated-in {
10
+ z-index: 0; }
 
11
  .owl-carousel .owl-animated-out {
12
+ z-index: 1; }
 
13
  .owl-carousel .fadeOut {
14
  -webkit-animation-name: fadeOut;
15
+ animation-name: fadeOut; }
 
16
 
17
  @-webkit-keyframes fadeOut {
18
  0% {
19
+ opacity: 1; }
 
20
 
21
  100% {
22
+ opacity: 0; } }
23
+
 
24
  @keyframes fadeOut {
25
  0% {
26
+ opacity: 1; }
 
27
 
28
  100% {
29
+ opacity: 0; } }
 
 
30
 
31
  /*
32
  * Owl Carousel - Auto Height Plugin
36
  -moz-transition: height 500ms ease-in-out;
37
  -ms-transition: height 500ms ease-in-out;
38
  -o-transition: height 500ms ease-in-out;
39
+ transition: height 500ms ease-in-out; }
 
40
 
41
  /*
42
  * Core Owl Carousel CSS File
47
  -webkit-tap-highlight-color: transparent;
48
  /* position relative and z-index fix webkit rendering fonts issue */
49
  position: relative;
50
+ z-index: 1; }
51
+ .owl-carousel .owl-stage {
52
+ position: relative;
53
+ -ms-touch-action: pan-Y; }
54
+ .owl-carousel .owl-stage:after {
55
+ content: ".";
56
+ display: block;
57
+ clear: both;
58
+ visibility: hidden;
59
+ line-height: 0;
60
+ height: 0; }
61
+ .owl-carousel .owl-stage-outer {
62
+ position: relative;
63
+ overflow: hidden;
64
+ /* fix for flashing background */
65
+ -webkit-transform: translate3d(0px, 0px, 0px); }
66
+ .owl-carousel .owl-item {
67
+ position: relative;
68
+ min-height: 1px;
69
+ float: left;
70
+ -webkit-backface-visibility: hidden;
71
+ -webkit-tap-highlight-color: transparent;
72
+ -webkit-touch-callout: none; }
73
+ .owl-carousel .owl-item img {
74
+ display: block;
75
+ width: 100%;
76
+ -webkit-transform-style: preserve-3d; }
77
+ .owl-carousel .owl-nav.disabled, .owl-carousel .owl-dots.disabled {
78
+ display: none; }
79
+ .owl-carousel .owl-nav .owl-prev, .owl-carousel .owl-nav .owl-next, .owl-carousel .owl-dot {
80
+ cursor: pointer;
81
+ cursor: hand;
82
+ -webkit-user-select: none;
83
+ -khtml-user-select: none;
84
+ -moz-user-select: none;
85
+ -ms-user-select: none;
86
+ user-select: none; }
87
+ .owl-carousel.owl-loaded {
88
+ display: block; }
89
+ .owl-carousel.owl-loading {
90
+ opacity: 0;
91
+ display: block; }
92
+ .owl-carousel.owl-hidden {
93
+ opacity: 0; }
94
+ .owl-carousel.owl-refresh .owl-item {
95
+ display: none; }
96
+ .owl-carousel.owl-drag .owl-item {
97
+ -webkit-user-select: none;
98
+ -moz-user-select: none;
99
+ -ms-user-select: none;
100
+ user-select: none; }
101
+ .owl-carousel.owl-grab {
102
+ cursor: move;
103
+ cursor: -webkit-grab;
104
+ cursor: -o-grab;
105
+ cursor: -ms-grab;
106
+ cursor: grab; }
107
+ .owl-carousel.owl-rtl {
108
+ direction: rtl; }
109
+ .owl-carousel.owl-rtl .owl-item {
110
+ float: right; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
 
112
  /* No Js */
113
  .no-js .owl-carousel {
114
+ display: block; }
 
115
 
116
  /*
117
  * Owl Carousel - Lazy Load Plugin
122
  -moz-transition: opacity 400ms ease;
123
  -ms-transition: opacity 400ms ease;
124
  -o-transition: opacity 400ms ease;
125
+ transition: opacity 400ms ease; }
 
126
  .owl-carousel .owl-item img {
127
+ transform-style: preserve-3d; }
 
128
 
129
  /*
130
  * Owl Carousel - Video Plugin
132
  .owl-carousel .owl-video-wrapper {
133
  position: relative;
134
  height: 100%;
135
+ background: #000; }
 
136
  .owl-carousel .owl-video-play-icon {
137
  position: absolute;
138
  height: 80px;
149
  -moz-transition: scale 100ms ease;
150
  -ms-transition: scale 100ms ease;
151
  -o-transition: scale 100ms ease;
152
+ transition: scale 100ms ease; }
 
153
  .owl-carousel .owl-video-play-icon:hover {
154
  -webkit-transition: scale(1.3, 1.3);
155
  -moz-transition: scale(1.3, 1.3);
156
  -ms-transition: scale(1.3, 1.3);
157
  -o-transition: scale(1.3, 1.3);
158
+ transition: scale(1.3, 1.3); }
159
+ .owl-carousel .owl-video-playing .owl-video-tn, .owl-carousel .owl-video-playing .owl-video-play-icon {
160
+ display: none; }
 
 
 
161
  .owl-carousel .owl-video-tn {
162
  opacity: 0;
163
  height: 100%;
171
  -moz-transition: opacity 400ms ease;
172
  -ms-transition: opacity 400ms ease;
173
  -o-transition: opacity 400ms ease;
174
+ transition: opacity 400ms ease; }
 
175
  .owl-carousel .owl-video-frame {
176
  position: relative;
177
  z-index: 1;
178
+ height: 100%;
179
+ width: 100%; }
includes/vendors/owlcarousel/assets/owl.carousel.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .owl-carousel .animated{-webkit-animation-duration:1000ms;animation-duration:1000ms;-webkit-animation-fill-mode:both;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{-webkit-transition:height 500ms ease-in-out;-moz-transition:height 500ms ease-in-out;-ms-transition:height 500ms ease-in-out;-o-transition:height 500ms ease-in-out;transition:height 500ms ease-in-out}.owl-carousel{display:none;width:100%;-webkit-tap-highlight-color:transparent;position:relative;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0px,0,0)}.owl-carousel .owl-item{position:relative;min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%;-webkit-transform-style:preserve-3d}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loaded{display:block}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{display:none}.owl-carousel.owl-drag .owl-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:-webkit-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.no-js .owl-carousel{display:block}.owl-carousel .owl-item .owl-lazy{opacity:0;-webkit-transition:opacity 400ms ease;-moz-transition:opacity 400ms ease;-ms-transition:opacity 400ms ease;-o-transition:opacity 400ms ease;transition:opacity 400ms ease}.owl-carousel .owl-item img{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;-webkit-transition:scale 100ms ease;-moz-transition:scale 100ms ease;-ms-transition:scale 100ms ease;-o-transition:scale 100ms ease;transition:scale 100ms ease}.owl-carousel .owl-video-play-icon:hover{-webkit-transition:scale(1.3,1.3);-moz-transition:scale(1.3,1.3);-ms-transition:scale(1.3,1.3);-o-transition:scale(1.3,1.3);transition:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;-webkit-background-size:contain;-moz-background-size:contain;-o-background-size:contain;background-size:contain;-webkit-transition:opacity 400ms ease;-moz-transition:opacity 400ms ease;-ms-transition:opacity 400ms ease;-o-transition:opacity 400ms ease;transition:opacity 400ms ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}
includes/vendors/owlcarousel/assets/owl.theme.default.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Default theme - Owl Carousel CSS File
3
+ */
4
+ .owl-carousel .owl-nav .owl-next,
5
+ .owl-carousel .owl-nav .owl-prev {
6
+ background-position: center center;
7
+ background-repeat: no-repeat;
8
+ position: absolute;
9
+ top: 50%;
10
+ margin-top: -25px;
11
+ opacity: 0;
12
+ cursor: pointer;
13
+ width: 50px;
14
+ height: 50px;
15
+ color: transparent;
16
+ }
17
+ .owl-carousel:hover .owl-nav .owl-next,
18
+ .owl-carousel:hover .owl-nav .owl-prev {
19
+ opacity: 1;
20
+ }
21
+ .owl-carousel .owl-nav .owl-next {
22
+ right: 0;
23
+ background-image: url('slide-arrow-right.png');
24
+ }
25
+ .owl-carousel .owl-nav .owl-prev {
26
+ left: 0;
27
+ background-image: url('slide-arrow-left.png');
28
+ }
includes/{js → vendors}/owlcarousel/assets/owl.video.play.png RENAMED
File without changes
includes/{js/flexslider/images → vendors/owlcarousel/assets}/slide-arrow-left.png RENAMED
File without changes
includes/{js/flexslider/images → vendors/owlcarousel/assets}/slide-arrow-right.png RENAMED
File without changes
includes/{js → vendors}/owlcarousel/owl.carousel.js RENAMED
@@ -11,55 +11,6 @@
11
  */
12
  ;(function($, window, document, undefined) {
13
 
14
- var drag, state, e;
15
-
16
- /**
17
- * Template for status information about drag and touch events.
18
- * @private
19
- */
20
- drag = {
21
- start: 0,
22
- startX: 0,
23
- startY: 0,
24
- current: 0,
25
- currentX: 0,
26
- currentY: 0,
27
- offsetX: 0,
28
- offsetY: 0,
29
- distance: null,
30
- startTime: 0,
31
- endTime: 0,
32
- updatedX: 0,
33
- targetEl: null
34
- };
35
-
36
- /**
37
- * Template for some status informations.
38
- * @private
39
- */
40
- state = {
41
- isTouch: false,
42
- isScrolling: false,
43
- isSwiping: false,
44
- direction: false,
45
- inMotion: false
46
- };
47
-
48
- /**
49
- * Event functions references.
50
- * @private
51
- */
52
- e = {
53
- _onDragStart: null,
54
- _onDragMove: null,
55
- _onDragEnd: null,
56
- _transitionEnd: null,
57
- _resizer: null,
58
- _responsiveCall: null,
59
- _goToLoop: null,
60
- _checkVisibile: null
61
- };
62
-
63
  /**
64
  * Creates a carousel.
65
  * @class The Owl Carousel.
@@ -88,21 +39,10 @@
88
  this.$element = $(element);
89
 
90
  /**
91
- * Caches informations about drag and touch events.
92
- */
93
- this.drag = $.extend({}, drag);
94
-
95
- /**
96
- * Caches some status informations.
97
- * @protected
98
- */
99
- this.state = $.extend({}, state);
100
-
101
- /**
102
  * @protected
103
- * @todo Must be documented
104
  */
105
- this.e = $.extend({}, e);
106
 
107
  /**
108
  * References to the running plugins of this carousel.
@@ -166,6 +106,11 @@
166
  */
167
  this._mergers = [];
168
 
 
 
 
 
 
169
  /**
170
  * Invalidated parts within the update process.
171
  * @protected
@@ -178,12 +123,46 @@
178
  */
179
  this._pipe = [];
180
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  $.each(Owl.Plugins, $.proxy(function(key, plugin) {
182
- this._plugins[key[0].toLowerCase() + key.slice(1)]
183
  = new plugin(this);
184
  }, this));
185
 
186
- $.each(Owl.Pipe, $.proxy(function(priority, worker) {
187
  this._pipe.push({
188
  'filter': worker.filter,
189
  'run': $.proxy(worker.run, this)
@@ -202,6 +181,7 @@
202
  items: 3,
203
  loop: false,
204
  center: false,
 
205
 
206
  mouseDrag: true,
207
  touchDrag: true,
@@ -225,7 +205,6 @@
225
  responsive: {},
226
  responsiveRefreshRate: 200,
227
  responsiveBaseElement: window,
228
- responsiveClass: false,
229
 
230
  fallbackEasing: 'swing',
231
 
@@ -235,12 +214,16 @@
235
  itemElement: 'div',
236
  stageElement: 'div',
237
 
238
- // Classes and Names
239
- themeClass: 'owl-theme',
240
- baseClass: 'owl-carousel',
 
 
 
241
  itemClass: 'owl-item',
242
- centerClass: 'center',
243
- activeClass: 'active'
 
244
  };
245
 
246
  /**
@@ -255,6 +238,17 @@
255
  Outer: 'outer'
256
  };
257
 
 
 
 
 
 
 
 
 
 
 
 
258
  /**
259
  * Contains all registered plugins.
260
  * @public
@@ -262,9 +256,14 @@
262
  Owl.Plugins = {};
263
 
264
  /**
265
- * Update pipe.
266
  */
267
- Owl.Pipe = [ {
 
 
 
 
 
268
  filter: [ 'width', 'items', 'settings' ],
269
  run: function(cache) {
270
  cache.current = this._items && this._items[this.relative(this._current)];
@@ -272,79 +271,134 @@
272
  }, {
273
  filter: [ 'items', 'settings' ],
274
  run: function() {
275
- var cached = this._clones,
276
- clones = this.$stage.children('.cloned');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
 
278
- if (clones.length !== cached.length || (!this.settings.loop && cached.length > 0)) {
279
- this.$stage.children('.cloned').remove();
280
- this._clones = [];
281
  }
 
 
282
  }
283
  }, {
284
  filter: [ 'items', 'settings' ],
285
  run: function() {
286
- var i, n,
287
- clones = this._clones,
288
  items = this._items,
289
- delta = this.settings.loop ? clones.length - Math.max(this.settings.items * 2, 4) : 0;
290
-
291
- for (i = 0, n = Math.abs(delta / 2); i < n; i++) {
292
- if (delta > 0) {
293
- this.$stage.children().eq(items.length + clones.length - 1).remove();
294
- clones.pop();
295
- this.$stage.children().eq(0).remove();
296
- clones.pop();
297
- } else {
298
- clones.push(clones.length / 2);
299
- this.$stage.append(items[clones[clones.length - 1]].clone().addClass('cloned'));
300
- clones.push(items.length - 1 - (clones.length - 1) / 2);
301
- this.$stage.prepend(items[clones[clones.length - 1]].clone().addClass('cloned'));
302
- }
303
  }
 
 
 
 
 
304
  }
305
  }, {
306
  filter: [ 'width', 'items', 'settings' ],
307
  run: function() {
308
- var rtl = (this.settings.rtl ? 1 : -1),
309
- width = (this.width() / this.settings.items).toFixed(3),
310
- coordinate = 0, merge, i, n;
311
-
312
- this._coordinates = [];
313
- for (i = 0, n = this._clones.length + this._items.length; i < n; i++) {
314
- merge = this._mergers[this.relative(i)];
315
- merge = (this.settings.mergeFit && Math.min(merge, this.settings.items)) || merge;
316
- coordinate += (this.settings.autoWidth ? this._items[this.relative(i)].width() + this.settings.margin : width * merge) * rtl;
317
-
318
- this._coordinates.push(coordinate);
319
  }
 
 
320
  }
321
  }, {
322
  filter: [ 'width', 'items', 'settings' ],
323
  run: function() {
324
- var i, n, width = (this.width() / this.settings.items).toFixed(3), css = {
325
- 'width': Math.abs(this._coordinates[this._coordinates.length - 1]) + this.settings.stagePadding * 2,
326
- 'padding-left': this.settings.stagePadding || '',
327
- 'padding-right': this.settings.stagePadding || ''
328
- };
 
 
329
 
330
  this.$stage.css(css);
331
-
332
- css = { 'width': this.settings.autoWidth ? 'auto' : width - this.settings.margin };
333
- css[this.settings.rtl ? 'margin-left' : 'margin-right'] = this.settings.margin;
334
-
335
- if (!this.settings.autoWidth && $.grep(this._mergers, function(v) { return v > 1 }).length > 0) {
336
- for (i = 0, n = this._coordinates.length; i < n; i++) {
337
- css.width = Math.abs(this._coordinates[i]) - Math.abs(this._coordinates[i - 1] || 0) - this.settings.margin;
338
- this.$stage.children().eq(i).css(css);
 
 
 
 
339
  }
340
- } else {
341
- this.$stage.children().css(css);
 
342
  }
343
  }
 
 
 
 
 
344
  }, {
345
  filter: [ 'width', 'items', 'settings' ],
346
  run: function(cache) {
347
- cache.current && this.reset(this.$stage.children().index(cache.current));
 
 
348
  }
349
  }, {
350
  filter: [ 'position' ],
@@ -370,12 +424,12 @@
370
  }
371
  }
372
 
373
- this.$stage.children('.' + this.settings.activeClass).removeClass(this.settings.activeClass);
374
- this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass(this.settings.activeClass);
375
 
376
  if (this.settings.center) {
377
- this.$stage.children('.' + this.settings.centerClass).removeClass(this.settings.centerClass);
378
- this.$stage.children().eq(this.current()).addClass(this.settings.centerClass);
379
  }
380
  }
381
  } ];
@@ -385,17 +439,12 @@
385
  * @protected
386
  */
387
  Owl.prototype.initialize = function() {
 
388
  this.trigger('initialize');
389
 
390
- this.$element
391
- .addClass(this.settings.baseClass)
392
- .addClass(this.settings.themeClass)
393
- .toggleClass('owl-rtl', this.settings.rtl);
394
-
395
- // check support
396
- this.browserSupport();
397
 
398
- if (this.settings.autoWidth && this.state.imagesLoaded !== true) {
399
  var imgs, nestedSelector, width;
400
  imgs = this.$element.find('img');
401
  nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined;
@@ -403,15 +452,14 @@
403
 
404
  if (imgs.length && width <= 0) {
405
  this.preloadAutoWidthImages(imgs);
406
- return false;
407
  }
408
  }
409
 
410
- this.$element.addClass('owl-loading');
411
 
412
  // create stage
413
- this.$stage = $('<' + this.settings.stageElement + ' class="owl-stage"/>')
414
- .wrap('<div class="owl-stage-outer">');
415
 
416
  // append stage
417
  this.$element.append(this.$stage.parent());
@@ -419,23 +467,23 @@
419
  // append content
420
  this.replace(this.$element.children().not(this.$stage.parent()));
421
 
422
- // set view width
423
- this._width = this.$element.width();
424
-
425
- // update view
426
- this.refresh();
427
-
428
- this.$element.removeClass('owl-loading').addClass('owl-loaded');
429
-
430
- // attach generic events
431
- this.eventsCall();
432
 
433
- // attach generic events
434
- this.internalEvents();
 
435
 
436
- // attach custom control events
437
- this.addTriggerableEvents();
438
 
 
439
  this.trigger('initialized');
440
  };
441
 
@@ -465,9 +513,9 @@
465
 
466
  // responsive class
467
  if (settings.responsiveClass) {
468
- this.$element.attr('class', function(i, c) {
469
- return c.replace(/\b owl-responsive-\S+/g, '');
470
- }).addClass('owl-responsive-' + match);
471
  }
472
  }
473
 
@@ -485,14 +533,6 @@
485
  * @protected
486
  */
487
  Owl.prototype.optionsLogic = function() {
488
- // Toggle Center class
489
- this.$element.toggleClass('owl-center', this.settings.center);
490
-
491
- // if items number is less than in body
492
- if (this.settings.loop && this._items.length < this.settings.items) {
493
- this.settings.loop = false;
494
- }
495
-
496
  if (this.settings.autoWidth) {
497
  this.settings.stagePadding = false;
498
  this.settings.merge = false;
@@ -510,7 +550,7 @@
510
 
511
  if (!event.data) {
512
  event.data = $('<' + this.settings.itemElement + '/>')
513
- .addClass(this.settings.itemClass).append(item)
514
  }
515
 
516
  this.trigger('prepared', { content: event.data });
@@ -536,6 +576,8 @@
536
  }
537
 
538
  this._invalidated = {};
 
 
539
  };
540
 
541
  /**
@@ -560,66 +602,30 @@
560
  * @public
561
  */
562
  Owl.prototype.refresh = function() {
563
- if (this._items.length === 0) {
564
- return false;
565
- }
566
-
567
- var start = new Date().getTime();
568
-
569
  this.trigger('refresh');
570
 
571
  this.setup();
572
 
573
  this.optionsLogic();
574
 
575
- // hide and show methods helps here to set a proper widths,
576
- // this prevents scrollbar to be calculated in stage width
577
- this.$stage.addClass('owl-refresh');
578
 
579
  this.update();
580
 
581
- this.$stage.removeClass('owl-refresh');
582
-
583
- this.state.orientation = window.orientation;
584
-
585
- this.watchVisibility();
586
 
 
587
  this.trigger('refreshed');
588
  };
589
 
590
- /**
591
- * Save internal event references and add event based functions.
592
- * @protected
593
- */
594
- Owl.prototype.eventsCall = function() {
595
- // Save events references
596
- this.e._onDragStart = $.proxy(function(e) {
597
- this.onDragStart(e);
598
- }, this);
599
- this.e._onDragMove = $.proxy(function(e) {
600
- this.onDragMove(e);
601
- }, this);
602
- this.e._onDragEnd = $.proxy(function(e) {
603
- this.onDragEnd(e);
604
- }, this);
605
- this.e._onResize = $.proxy(function(e) {
606
- this.onResize(e);
607
- }, this);
608
- this.e._transitionEnd = $.proxy(function(e) {
609
- this.transitionEnd(e);
610
- }, this);
611
- this.e._preventClick = $.proxy(function(e) {
612
- this.preventClick(e);
613
- }, this);
614
- };
615
-
616
  /**
617
  * Checks window `resize` event.
618
  * @protected
619
  */
620
  Owl.prototype.onThrottledResize = function() {
621
  window.clearTimeout(this.resizeTimer);
622
- this.resizeTimer = window.setTimeout(this.e._onResize, this.settings.responsiveRefreshRate);
623
  };
624
 
625
  /**
@@ -635,310 +641,185 @@
635
  return false;
636
  }
637
 
638
- if (this.trigger('resize').isDefaultPrevented()) {
639
  return false;
640
  }
641
 
642
- this._width = this.$element.width();
 
 
 
 
 
643
 
644
  this.invalidate('width');
645
 
646
  this.refresh();
647
 
 
648
  this.trigger('resized');
649
  };
650
 
651
  /**
652
- * Checks for touch/mouse drag event type and add run event handlers.
653
- * @protected
654
- */
655
- Owl.prototype.eventsRouter = function(event) {
656
- var type = event.type;
657
-
658
- if (type === "mousedown" || type === "touchstart") {
659
- this.onDragStart(event);
660
- } else if (type === "mousemove" || type === "touchmove") {
661
- this.onDragMove(event);
662
- } else if (type === "mouseup" || type === "touchend") {
663
- this.onDragEnd(event);
664
- } else if (type === "touchcancel") {
665
- this.onDragEnd(event);
666
- }
667
- };
668
-
669
- /**
670
- * Checks for touch/mouse drag options and add necessery event handlers.
671
  * @protected
672
  */
673
- Owl.prototype.internalEvents = function() {
674
- var isTouch = isTouchSupport(),
675
- isTouchIE = isTouchSupportIE();
676
-
677
- if (this.settings.mouseDrag){
678
- this.$stage.on('mousedown', $.proxy(function(event) { this.eventsRouter(event) }, this));
679
- this.$stage.on('dragstart', function() { return false });
680
- this.$stage.get(0).onselectstart = function() { return false };
681
- } else {
682
- this.$element.addClass('owl-text-select-on');
683
  }
684
 
685
- if (this.settings.touchDrag && !isTouchIE){
686
- this.$stage.on('touchstart touchcancel', $.proxy(function(event) { this.eventsRouter(event) }, this));
687
  }
688
 
689
- // catch transitionEnd event
690
- if (this.transitionEndVendor) {
691
- this.on(this.$stage.get(0), this.transitionEndVendor, this.e._transitionEnd, false);
 
692
  }
693
 
694
- // responsive
695
- if (this.settings.responsive !== false) {
696
- this.on(window, 'resize', $.proxy(this.onThrottledResize, this));
697
  }
698
  };
699
 
700
  /**
701
- * Handles touchstart/mousedown event.
 
 
702
  * @protected
703
  * @param {Event} event - The event arguments.
704
  */
705
  Owl.prototype.onDragStart = function(event) {
706
- var ev, isTouchEvent, pageX, pageY, animatedPos;
707
 
708
- ev = event.originalEvent || event || window.event;
 
 
709
 
710
- // prevent right click
711
- if (ev.which === 3 || this.state.isTouch) {
712
- return false;
 
 
 
 
 
 
 
 
 
 
 
713
  }
714
 
715
- if (ev.type === 'mousedown') {
716
- this.$stage.addClass('owl-grab');
 
717
  }
718
 
719
- this.trigger('drag');
720
- this.drag.startTime = new Date().getTime();
721
  this.speed(0);
722
- this.state.isTouch = true;
723
- this.state.isScrolling = false;
724
- this.state.isSwiping = false;
725
- this.drag.distance = 0;
726
-
727
- pageX = getTouches(ev).x;
728
- pageY = getTouches(ev).y;
729
-
730
- // get stage position left
731
- this.drag.offsetX = this.$stage.position().left;
732
- this.drag.offsetY = this.$stage.position().top;
733
-
734
- if (this.settings.rtl) {
735
- this.drag.offsetX = this.$stage.position().left + this.$stage.width() - this.width()
736
- + this.settings.margin;
737
- }
738
-
739
- // catch position // ie to fix
740
- if (this.state.inMotion && this.support3d) {
741
- animatedPos = this.getTransformProperty();
742
- this.drag.offsetX = animatedPos;
743
- this.animate(animatedPos);
744
- this.state.inMotion = true;
745
- } else if (this.state.inMotion && !this.support3d) {
746
- this.state.inMotion = false;
747
- return false;
748
- }
749
 
750
- this.drag.startX = pageX - this.drag.offsetX;
751
- this.drag.startY = pageY - this.drag.offsetY;
 
 
 
752
 
753
- this.drag.start = pageX - this.drag.startX;
754
- this.drag.targetEl = ev.target || ev.srcElement;
755
- this.drag.updatedX = this.drag.start;
756
 
757
- // to do/check
758
- // prevent links and images dragging;
759
- if (this.drag.targetEl.tagName === "IMG" || this.drag.targetEl.tagName === "A") {
760
- this.drag.targetEl.draggable = false;
761
- }
762
 
763
- $(document).on('mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents', $.proxy(function(event) {this.eventsRouter(event)},this));
 
 
 
 
 
 
 
 
764
  };
765
 
766
  /**
767
- * Handles the touchmove/mousemove events.
768
- * @todo Simplify
769
  * @protected
770
  * @param {Event} event - The event arguments.
771
  */
772
  Owl.prototype.onDragMove = function(event) {
773
- var ev, isTouchEvent, pageX, pageY, minValue, maxValue, pull;
 
 
 
 
774
 
775
- if (!this.state.isTouch) {
776
  return;
777
  }
778
 
779
- if (this.state.isScrolling) {
780
- return;
781
- }
782
 
783
- ev = event.originalEvent || event || window.event;
784
-
785
- pageX = getTouches(ev).x;
786
- pageY = getTouches(ev).y;
787
-
788
- // Drag Direction
789
- this.drag.currentX = pageX - this.drag.startX;
790
- this.drag.currentY = pageY - this.drag.startY;
791
- this.drag.distance = this.drag.currentX - this.drag.offsetX;
792
-
793
- // Check move direction
794
- if (this.drag.distance < 0) {
795
- this.state.direction = this.settings.rtl ? 'right' : 'left';
796
- } else if (this.drag.distance > 0) {
797
- this.state.direction = this.settings.rtl ? 'left' : 'right';
798
- }
799
- // Loop
800
  if (this.settings.loop) {
801
- if (this.op(this.drag.currentX, '>', this.coordinates(this.minimum())) && this.state.direction === 'right') {
802
- this.drag.currentX -= (this.settings.center && this.coordinates(0)) - this.coordinates(this._items.length);
803
- } else if (this.op(this.drag.currentX, '<', this.coordinates(this.maximum())) && this.state.direction === 'left') {
804
- this.drag.currentX += (this.settings.center && this.coordinates(0)) - this.coordinates(this._items.length);
805
- }
806
  } else {
807
- // pull
808
- minValue = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum());
809
- maxValue = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum());
810
- pull = this.settings.pullDrag ? this.drag.distance / 5 : 0;
811
- this.drag.currentX = Math.max(Math.min(this.drag.currentX, minValue + pull), maxValue + pull);
812
- }
813
-
814
- // Lock browser if swiping horizontal
815
-
816
- if ((this.drag.distance > 8 || this.drag.distance < -8)) {
817
- if (ev.preventDefault !== undefined) {
818
- ev.preventDefault();
819
- } else {
820
- ev.returnValue = false;
821
- }
822
- this.state.isSwiping = true;
823
  }
824
 
825
- this.drag.updatedX = this.drag.currentX;
826
-
827
- // Lock Owl if scrolling
828
- if ((this.drag.currentY > 16 || this.drag.currentY < -16) && this.state.isSwiping === false) {
829
- this.state.isScrolling = true;
830
- this.drag.updatedX = this.drag.start;
831
- }
832
 
833
- this.animate(this.drag.updatedX);
834
  };
835
 
836
  /**
837
- * Handles the touchend/mouseup events.
 
 
838
  * @protected
 
839
  */
840
  Owl.prototype.onDragEnd = function(event) {
841
- var compareTimes, distanceAbs, closest;
842
-
843
- if (!this.state.isTouch) {
844
- return;
845
- }
846
-
847
- if (event.type === 'mouseup') {
848
- this.$stage.removeClass('owl-grab');
849
- }
850
 
851
- this.trigger('dragged');
852
-
853
- // prevent links and images dragging;
854
- this.drag.targetEl.removeAttribute("draggable");
855
-
856
- // remove drag event listeners
857
 
858
- this.state.isTouch = false;
859
- this.state.isScrolling = false;
860
- this.state.isSwiping = false;
861
-
862
- // to check
863
- if (this.drag.distance === 0 && this.state.inMotion !== true) {
864
- this.state.inMotion = false;
865
- return false;
866
- }
867
 
868
- // prevent clicks while scrolling
869
-
870
- this.drag.endTime = new Date().getTime();
871
- compareTimes = this.drag.endTime - this.drag.startTime;
872
- distanceAbs = Math.abs(this.drag.distance);
873
-
874
- // to test
875
- if (distanceAbs > 3 || compareTimes > 300) {
876
- this.removeClick(this.drag.targetEl);
877
- }
878
-
879
- closest = this.closest(this.drag.updatedX);
880
 
881
- this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed);
882
- this.current(closest);
883
- this.invalidate('position');
884
- this.update();
885
 
886
- // if pullDrag is off then fire transitionEnd event manually when stick
887
- // to border
888
- if (!this.settings.pullDrag && this.drag.updatedX === this.coordinates(closest)) {
889
- this.transitionEnd();
890
  }
891
 
892
- this.drag.distance = 0;
893
-
894
- $(document).off('.owl.dragEvents');
895
- };
896
-
897
- /**
898
- * Attaches `preventClick` to disable link while swipping.
899
- * @protected
900
- * @param {HTMLElement} [target] - The target of the `click` event.
901
- */
902
- Owl.prototype.removeClick = function(target) {
903
- this.drag.targetEl = target;
904
- $(target).on('click.preventClick', this.e._preventClick);
905
- // to make sure click is removed:
906
- window.setTimeout(function() {
907
- $(target).off('click.preventClick');
908
- }, 300);
909
- };
910
-
911
- /**
912
- * Suppresses click event.
913
- * @protected
914
- * @param {Event} ev - The event arguments.
915
- */
916
- Owl.prototype.preventClick = function(ev) {
917
- if (ev.preventDefault) {
918
- ev.preventDefault();
919
- } else {
920
- ev.returnValue = false;
921
- }
922
- if (ev.stopPropagation) {
923
- ev.stopPropagation();
924
  }
925
- $(ev.target).off('click.preventClick');
926
- };
927
 
928
- /**
929
- * Catches stage position while animate (only CSS3).
930
- * @protected
931
- * @returns
932
- */
933
- Owl.prototype.getTransformProperty = function() {
934
- var transform, matrix3d;
935
-
936
- transform = window.getComputedStyle(this.$stage.get(0), null).getPropertyValue(this.vendorName + 'transform');
937
- // var transform = this.$stage.css(this.vendorName + 'transform')
938
- transform = transform.replace(/matrix(3d)?\(|\)/g, '').split(',');
939
- matrix3d = transform.length === 16;
940
-
941
- return matrix3d !== true ? transform[4] : transform[12];
942
  };
943
 
944
  /**
@@ -946,10 +827,14 @@
946
  * @todo Setting `freeDrag` makes `closest` not reusable. See #165.
947
  * @protected
948
  * @param {Number} coordinate - The coordinate in pixel.
 
949
  * @return {Number} - The absolute position of the closest item.
950
  */
951
- Owl.prototype.closest = function(coordinate) {
952
- var position = -1, pull = 30, width = this.width(), coordinates = this.coordinates();
 
 
 
953
 
954
  if (!this.settings.freeDrag) {
955
  // check closest item
@@ -958,7 +843,7 @@
958
  position = index;
959
  } else if (this.op(coordinate, '<', value)
960
  && this.op(coordinate, '>', coordinates[index + 1] || value - width)) {
961
- position = this.state.direction === 'left' ? index + 1 : index;
962
  }
963
  return position === -1;
964
  }, this));
@@ -978,33 +863,45 @@
978
 
979
  /**
980
  * Animates the stage.
 
981
  * @public
982
  * @param {Number} coordinate - The coordinate in pixels.
983
  */
984
  Owl.prototype.animate = function(coordinate) {
985
- this.trigger('translate');
986
- this.state.inMotion = this.speed() > 0;
987
 
988
- if (this.support3d) {
 
 
 
 
 
 
 
989
  this.$stage.css({
990
- transform: 'translate3d(' + coordinate + 'px' + ',0px, 0px)',
991
  transition: (this.speed() / 1000) + 's'
992
  });
993
- } else if (this.state.isTouch) {
 
 
 
 
994
  this.$stage.css({
995
  left: coordinate + 'px'
996
  });
997
- } else {
998
- this.$stage.animate({
999
- left: coordinate
1000
- }, this.speed() / 1000, this.settings.fallbackEasing, $.proxy(function() {
1001
- if (this.state.inMotion) {
1002
- this.transitionEnd();
1003
- }
1004
- }, this));
1005
  }
1006
  };
1007
 
 
 
 
 
 
 
 
 
 
1008
  /**
1009
  * Sets the absolute position of the current item.
1010
  * @public
@@ -1041,11 +938,16 @@
1041
 
1042
  /**
1043
  * Invalidates the given part of the update routine.
1044
- * @param {String} part - The part to invalidate.
 
1045
  */
1046
  Owl.prototype.invalidate = function(part) {
1047
- this._invalidated[part] = true;
1048
- }
 
 
 
 
1049
 
1050
  /**
1051
  * Resets the absolute position of the current item.
@@ -1070,88 +972,77 @@
1070
  };
1071
 
1072
  /**
1073
- * Normalizes an absolute or a relative position for an item.
1074
  * @public
1075
  * @param {Number} position - The absolute or relative position to normalize.
1076
  * @param {Boolean} [relative=false] - Whether the given position is relative or not.
1077
  * @returns {Number} - The normalized position.
1078
  */
1079
  Owl.prototype.normalize = function(position, relative) {
1080
- var n = (relative ? this._items.length : this._items.length + this._clones.length);
 
1081
 
1082
  if (!$.isNumeric(position) || n < 1) {
1083
- return undefined;
1084
- }
1085
-
1086
- if (this._clones.length) {
1087
- position = ((position % n) + n) % n;
1088
- } else {
1089
- position = Math.max(this.minimum(relative), Math.min(this.maximum(relative), position));
1090
  }
1091
 
1092
  return position;
1093
  };
1094
 
1095
  /**
1096
- * Converts an absolute position for an item into a relative position.
1097
  * @public
1098
  * @param {Number} position - The absolute position to convert.
1099
  * @returns {Number} - The converted position.
1100
  */
1101
  Owl.prototype.relative = function(position) {
1102
- position = this.normalize(position);
1103
- position = position - this._clones.length / 2;
1104
  return this.normalize(position, true);
1105
  };
1106
 
1107
  /**
1108
- * Gets the maximum position for an item.
1109
  * @public
1110
  * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
1111
  * @returns {Number}
1112
  */
1113
  Owl.prototype.maximum = function(relative) {
1114
- var maximum, width, i = 0, coordinate,
1115
- settings = this.settings;
1116
-
1117
- if (relative) {
1118
- return this._items.length - 1;
1119
- }
1120
 
1121
- if (!settings.loop && settings.center) {
1122
- maximum = this._items.length - 1;
1123
- } else if (!settings.loop && !settings.center) {
1124
- maximum = this._items.length - settings.items;
1125
- } else if (settings.loop || settings.center) {
1126
- maximum = this._items.length + settings.items;
1127
  } else if (settings.autoWidth || settings.merge) {
1128
- revert = settings.rtl ? 1 : -1;
1129
- width = this.$stage.width() - this.$element.width();
1130
- while (coordinate = this.coordinates(i)) {
1131
- if (coordinate * revert >= width) {
1132
- break;
1133
- }
1134
- maximum = ++i;
1135
  }
 
 
1136
  } else {
1137
- throw 'Can not detect maximum absolute position.'
1138
  }
1139
 
1140
- return maximum;
 
 
 
 
1141
  };
1142
 
1143
  /**
1144
- * Gets the minimum position for an item.
1145
  * @public
1146
  * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
1147
  * @returns {Number}
1148
  */
1149
  Owl.prototype.minimum = function(relative) {
1150
- if (relative) {
1151
- return 0;
1152
- }
1153
-
1154
- return this._clones.length / 2;
1155
  };
1156
 
1157
  /**
@@ -1261,30 +1152,38 @@
1261
  * @param {Number} [speed] - The time in milliseconds for the transition.
1262
  */
1263
  Owl.prototype.to = function(position, speed) {
 
 
 
 
 
 
 
 
1264
  if (this.settings.loop) {
1265
- var distance = position - this.relative(this.current()),
1266
- revert = this.current(),
1267
- before = this.current(),
1268
- after = this.current() + distance,
1269
- direction = before - after < 0 ? true : false,
1270
- items = this._clones.length + this._items.length;
1271
-
1272
- if (after < this.settings.items && direction === false) {
1273
- revert = before + this._items.length;
1274
- this.reset(revert);
1275
- } else if (after >= items - this.settings.items && direction === true) {
1276
- revert = before - this._items.length;
1277
- this.reset(revert);
1278
  }
1279
- window.clearTimeout(this.e._goToLoop);
1280
- this.e._goToLoop = window.setTimeout($.proxy(function() {
1281
- this.speed(this.duration(this.current(), revert + distance, speed));
1282
- this.current(revert + distance);
1283
- this.update();
1284
- }, this), 30);
1285
  } else {
1286
- this.speed(this.duration(this.current(), position, speed));
1287
- this.current(position);
 
 
 
 
 
1288
  this.update();
1289
  }
1290
  };
@@ -1314,7 +1213,7 @@
1314
  * @protected
1315
  * @param {Event} event - The event arguments.
1316
  */
1317
- Owl.prototype.transitionEnd = function(event) {
1318
 
1319
  // if css2 animation then event object is undefined
1320
  if (event !== undefined) {
@@ -1326,7 +1225,7 @@
1326
  }
1327
  }
1328
 
1329
- this.state.inMotion = false;
1330
  this.trigger('translated');
1331
  };
1332
 
@@ -1388,12 +1287,18 @@
1388
  * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end.
1389
  */
1390
  Owl.prototype.add = function(content, position) {
 
 
1391
  position = position === undefined ? this._items.length : this.normalize(position, true);
 
1392
 
1393
  this.trigger('add', { content: content, position: position });
1394
 
 
 
1395
  if (this._items.length === 0 || position === this._items.length) {
1396
- this.$stage.append(content);
 
1397
  this._items.push(content);
1398
  this._mergers.push(content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
1399
  } else {
@@ -1402,6 +1307,8 @@
1402
  this._mergers.splice(position, 0, content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
1403
  }
1404
 
 
 
1405
  this.invalidate('items');
1406
 
1407
  this.trigger('added', { content: content, position: position });
@@ -1432,87 +1339,21 @@
1432
  };
1433
 
1434
  /**
1435
- * Adds triggerable events.
 
1436
  * @protected
1437
  */
1438
- Owl.prototype.addTriggerableEvents = function() {
1439
- var handler = $.proxy(function(callback, event) {
1440
- return $.proxy(function(e) {
1441
- if (e.relatedTarget !== this) {
1442
- this.suppress([ event ]);
1443
- callback.apply(this, [].slice.call(arguments, 1));
1444
- this.release([ event ]);
1445
- }
1446
- }, this);
1447
- }, this);
1448
-
1449
- $.each({
1450
- 'next': this.next,
1451
- 'prev': this.prev,
1452
- 'to': this.to,
1453
- 'destroy': this.destroy,
1454
- 'refresh': this.refresh,
1455
- 'replace': this.replace,
1456
- 'add': this.add,
1457
- 'remove': this.remove
1458
- }, $.proxy(function(event, callback) {
1459
- this.$element.on(event + '.owl.carousel', handler(callback, event + '.owl.carousel'));
1460
  }, this));
1461
-
1462
- };
1463
-
1464
- /**
1465
- * Watches the visibility of the carousel element.
1466
- * @protected
1467
- */
1468
- Owl.prototype.watchVisibility = function() {
1469
-
1470
- // test on zepto
1471
- if (!isElVisible(this.$element.get(0))) {
1472
- this.$element.addClass('owl-hidden');
1473
- window.clearInterval(this.e._checkVisibile);
1474
- this.e._checkVisibile = window.setInterval($.proxy(checkVisible, this), 500);
1475
- }
1476
-
1477
- function isElVisible(el) {
1478
- return el.offsetWidth > 0 && el.offsetHeight > 0;
1479
- }
1480
-
1481
- function checkVisible() {
1482
- if (isElVisible(this.$element.get(0))) {
1483
- this.$element.removeClass('owl-hidden');
1484
- this.refresh();
1485
- window.clearInterval(this.e._checkVisibile);
1486
- }
1487
- }
1488
- };
1489
-
1490
- /**
1491
- * Preloads images with auto width.
1492
- * @protected
1493
- * @todo Still to test
1494
- */
1495
- Owl.prototype.preloadAutoWidthImages = function(imgs) {
1496
- var loaded, that, $el, img;
1497
-
1498
- loaded = 0;
1499
- that = this;
1500
- imgs.each(function(i, el) {
1501
- $el = $(el);
1502
- img = new Image();
1503
-
1504
- img.onload = function() {
1505
- loaded++;
1506
- $el.attr('src', img.src);
1507
- $el.css('opacity', 1);
1508
- if (loaded >= imgs.length) {
1509
- that.state.imagesLoaded = true;
1510
- that.initialize();
1511
- }
1512
- };
1513
-
1514
- img.src = $el.attr('src') || $el.attr('data-src') || $el.attr('data-src-retina');
1515
- });
1516
  };
1517
 
1518
  /**
@@ -1521,39 +1362,34 @@
1521
  */
1522
  Owl.prototype.destroy = function() {
1523
 
1524
- if (this.$element.hasClass(this.settings.themeClass)) {
1525
- this.$element.removeClass(this.settings.themeClass);
1526
- }
1527
 
1528
  if (this.settings.responsive !== false) {
1529
- $(window).off('resize.owl.carousel');
1530
- }
1531
-
1532
- if (this.transitionEndVendor) {
1533
- this.off(this.$stage.get(0), this.transitionEndVendor, this.e._transitionEnd);
1534
  }
1535
 
1536
- for ( var i in this._plugins) {
1537
  this._plugins[i].destroy();
1538
  }
1539
 
1540
- if (this.settings.mouseDrag || this.settings.touchDrag) {
1541
- this.$stage.off('mousedown touchstart touchcancel');
1542
- $(document).off('.owl.dragEvents');
1543
- this.$stage.get(0).onselectstart = function() {};
1544
- this.$stage.off('dragstart', function() { return false });
1545
- }
1546
-
1547
- // remove event handlers in the ".owl.carousel" namespace
1548
- this.$element.off('.owl');
1549
-
1550
  this.$stage.children('.cloned').remove();
1551
- this.e = null;
1552
- this.$element.removeData('owlCarousel');
1553
 
 
1554
  this.$stage.children().contents().unwrap();
1555
  this.$stage.children().unwrap();
1556
- this.$stage.unwrap();
 
 
 
 
 
 
 
 
 
1557
  };
1558
 
1559
  /**
@@ -1612,14 +1448,17 @@
1612
  };
1613
 
1614
  /**
1615
- * Triggers an public event.
 
1616
  * @protected
1617
  * @param {String} name - The event name.
1618
  * @param {*} [data=null] - The event data.
1619
- * @param {String} [namespace=.owl.carousel] - The event namespace.
 
 
1620
  * @returns {Event} - The event arguments.
1621
  */
1622
- Owl.prototype.trigger = function(name, data, namespace) {
1623
  var status = {
1624
  item: { count: this._items.length, index: this.current() }
1625
  }, handler = $.camelCase(
@@ -1637,16 +1476,75 @@
1637
  }
1638
  });
1639
 
 
1640
  this.$element.trigger(event);
1641
 
1642
  if (this.settings && typeof this.settings[handler] === 'function') {
1643
- this.settings[handler].apply(this, event);
1644
  }
1645
  }
1646
 
1647
  return event;
1648
  };
1649
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1650
  /**
1651
  * Suppresses events.
1652
  * @protected
@@ -1656,7 +1554,7 @@
1656
  $.each(events, $.proxy(function(index, event) {
1657
  this._supress[event] = true;
1658
  }, this));
1659
- }
1660
 
1661
  /**
1662
  * Releases suppressed events.
@@ -1667,143 +1565,202 @@
1667
  $.each(events, $.proxy(function(index, event) {
1668
  delete this._supress[event];
1669
  }, this));
1670
- }
1671
 
1672
  /**
1673
- * Checks the availability of some browser features.
 
1674
  * @protected
 
 
1675
  */
1676
- Owl.prototype.browserSupport = function() {
1677
- this.support3d = isPerspective();
1678
 
1679
- if (this.support3d) {
1680
- this.transformVendor = isTransform();
1681
 
1682
- // take transitionend event name by detecting transition
1683
- var endVendors = [ 'transitionend', 'webkitTransitionEnd', 'transitionend', 'oTransitionEnd' ];
1684
- this.transitionEndVendor = endVendors[isTransition()];
1685
 
1686
- // take vendor name from transform name
1687
- this.vendorName = this.transformVendor.replace(/Transform/i, '');
1688
- this.vendorName = this.vendorName !== '' ? '-' + this.vendorName.toLowerCase() + '-' : '';
 
 
 
1689
  }
1690
 
1691
- this.state.orientation = window.orientation;
1692
  };
1693
 
1694
  /**
1695
- * Get touch/drag coordinats.
1696
- * @private
1697
- * @param {event} - mousedown/touchstart event
1698
- * @returns {object} - Contains X and Y of current mouse/touch position
1699
- */
 
 
 
 
 
 
 
 
1700
 
1701
- function getTouches(event) {
1702
- if (event.touches !== undefined) {
1703
- return {
1704
- x: event.touches[0].pageX,
1705
- y: event.touches[0].pageY
1706
- };
1707
- }
1708
 
1709
- if (event.touches === undefined) {
1710
- if (event.pageX !== undefined) {
1711
- return {
1712
- x: event.pageX,
1713
- y: event.pageY
1714
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1715
  }
1716
 
1717
- if (event.pageX === undefined) {
1718
- return {
1719
- x: event.clientX,
1720
- y: event.clientY
1721
- };
1722
  }
1723
- }
1724
- }
1725
 
1726
  /**
1727
- * Checks for CSS support.
1728
- * @private
1729
- * @param {Array} array - The CSS properties to check for.
1730
- * @returns {Array} - Contains the supported CSS property name and its index or `false`.
1731
  */
1732
- function isStyleSupported(array) {
1733
- var p, s, fake = document.createElement('div'), list = array;
1734
- for (p in list) {
1735
- s = list[p];
1736
- if (typeof fake.style[s] !== 'undefined') {
1737
- fake = null;
1738
- return [ s, p ];
1739
- }
1740
- }
1741
- return [ false ];
1742
- }
1743
 
1744
- /**
1745
- * Checks for CSS transition support.
1746
- * @private
1747
- * @todo Realy bad design
1748
- * @returns {Number}
1749
- */
1750
- function isTransition() {
1751
- return isStyleSupported([ 'transition', 'WebkitTransition', 'MozTransition', 'OTransition' ])[1];
1752
- }
1753
 
1754
- /**
1755
- * Checks for CSS transform support.
1756
- * @private
1757
- * @returns {String} The supported property name or false.
1758
- */
1759
- function isTransform() {
1760
- return isStyleSupported([ 'transform', 'WebkitTransform', 'MozTransform', 'OTransform', 'msTransform' ])[0];
1761
- }
1762
 
1763
  /**
1764
- * Checks for CSS perspective support.
1765
- * @private
1766
- * @returns {String} The supported property name or false.
1767
  */
1768
- function isPerspective() {
1769
- return isStyleSupported([ 'perspective', 'webkitPerspective', 'MozPerspective', 'OPerspective', 'MsPerspective' ])[0];
1770
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1771
 
1772
  /**
1773
- * Checks wether touch is supported or not.
1774
- * @private
1775
- * @returns {Boolean}
1776
  */
1777
- function isTouchSupport() {
1778
- return 'ontouchstart' in window || !!(navigator.msMaxTouchPoints);
1779
- }
 
1780
 
1781
  /**
1782
- * Checks wether touch is supported or not for IE.
1783
- * @private
1784
- * @returns {Boolean}
1785
  */
1786
- function isTouchSupportIE() {
1787
- return window.navigator.msPointerEnabled;
1788
- }
 
 
 
 
 
1789
 
1790
  /**
1791
- * The jQuery Plugin for the Owl Carousel
1792
- * @public
1793
  */
1794
- $.fn.owlCarousel = function(options) {
1795
- return this.each(function() {
1796
- if (!$(this).data('owlCarousel')) {
1797
- $(this).data('owlCarousel', new Owl(this, options));
1798
- }
1799
- });
 
 
 
 
1800
  };
1801
 
1802
  /**
1803
- * The constructor for the jQuery Plugin
1804
- * @public
1805
  */
1806
- $.fn.owlCarousel.Constructor = Owl;
 
 
 
 
 
 
 
 
 
 
 
 
 
1807
 
1808
  })(window.Zepto || window.jQuery, window, document);
1809
 
@@ -1861,7 +1818,8 @@
1861
 
1862
  while (i++ < n) {
1863
  this.load(clones / 2 + this._core.relative(position));
1864
- clones && $.each(this._core.clones(this._core.relative(position++)), load);
 
1865
  }
1866
  }
1867
  }, this)
@@ -1935,7 +1893,7 @@
1935
  for (property in Object.getOwnPropertyNames(this)) {
1936
  typeof this[property] != 'function' && (this[property] = null);
1937
  }
1938
- }
1939
 
1940
  $.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy;
1941
 
@@ -1968,19 +1926,19 @@
1968
  * @type {Object}
1969
  */
1970
  this._handlers = {
1971
- 'initialized.owl.carousel': $.proxy(function() {
1972
- if (this._core.settings.autoHeight) {
1973
  this.update();
1974
  }
1975
  }, this),
1976
  'changed.owl.carousel': $.proxy(function(e) {
1977
- if (this._core.settings.autoHeight && e.property.name == 'position'){
1978
  this.update();
1979
  }
1980
  }, this),
1981
  'loaded.owl.lazy': $.proxy(function(e) {
1982
- if (this._core.settings.autoHeight && e.element.closest('.' + this._core.settings.itemClass)
1983
- === this._core.$stage.children().eq(this._core.current())) {
1984
  this.update();
1985
  }
1986
  }, this)
@@ -2006,8 +1964,20 @@
2006
  * Updates the view.
2007
  */
2008
  AutoHeight.prototype.update = function() {
 
 
 
 
 
 
 
 
 
 
 
 
2009
  this._core.$stage.parent()
2010
- .height(this._core.$stage.children().eq(this._core.current()).height())
2011
  .addClass(this._core.settings.autoHeightClass);
2012
  };
2013
 
@@ -2061,31 +2031,40 @@
2061
  */
2062
  this._playing = null;
2063
 
2064
- /**
2065
- * Whether this is in fullscreen or not.
2066
- * @protected
2067
- * @type {Boolean}
2068
- */
2069
- this._fullscreen = false;
2070
-
2071
  /**
2072
  * All event handlers.
 
2073
  * @protected
2074
  * @type {Object}
2075
  */
2076
  this._handlers = {
 
 
 
 
 
2077
  'resize.owl.carousel': $.proxy(function(e) {
2078
- if (this._core.settings.video && !this.isInFullScreen()) {
2079
  e.preventDefault();
2080
  }
2081
  }, this),
2082
- 'refresh.owl.carousel changed.owl.carousel': $.proxy(function(e) {
2083
- if (this._playing) {
 
 
 
 
 
2084
  this.stop();
2085
  }
2086
  }, this),
2087
  'prepared.owl.carousel': $.proxy(function(e) {
 
 
 
 
2088
  var $element = $(e.content).find('.owl-video');
 
2089
  if ($element.length) {
2090
  $element.css('display', 'none');
2091
  this.fetch($element, $(e.content));
@@ -2121,7 +2100,6 @@
2121
  * @param {jQuery} item - The item containing the video.
2122
  */
2123
  Video.prototype.fetch = function(target, item) {
2124
-
2125
  var type = target.attr('data-vimeo-id') ? 'vimeo' : 'youtube',
2126
  id = target.attr('data-vimeo-id') || target.attr('data-youtube-id'),
2127
  width = target.attr('data-width') || this._core.settings.videoWidth,
@@ -2163,7 +2141,6 @@
2163
  * @see `fetch`
2164
  */
2165
  Video.prototype.thumbnail = function(target, video) {
2166
-
2167
  var tnLink,
2168
  icon,
2169
  path,
@@ -2225,42 +2202,46 @@
2225
  this._playing.find('.owl-video-frame').remove();
2226
  this._playing.removeClass('owl-video-playing');
2227
  this._playing = null;
 
 
2228
  };
2229
 
2230
  /**
2231
  * Starts the current video.
2232
  * @public
2233
- * @param {Event} ev - The event arguments.
2234
  */
2235
- Video.prototype.play = function(ev) {
2236
- this._core.trigger('play', null, 'video');
2237
-
2238
- if (this._playing) {
2239
- this.stop();
2240
- }
2241
-
2242
- var target = $(ev.target || ev.srcElement),
2243
  item = target.closest('.' + this._core.settings.itemClass),
2244
  video = this._videos[item.attr('data-video')],
2245
  width = video.width || '100%',
2246
  height = video.height || this._core.$stage.height(),
2247
- html, wrap;
 
 
 
 
 
 
 
 
 
 
 
2248
 
2249
  if (video.type === 'youtube') {
2250
- html = '<iframe width="' + width + '" height="' + height + '" src="http://www.youtube.com/embed/'
2251
- + video.id + '?autoplay=1&v=' + video.id + '" frameborder="0" allowfullscreen></iframe>';
2252
  } else if (video.type === 'vimeo') {
2253
- html = '<iframe src="http://player.vimeo.com/video/' + video.id + '?autoplay=1" width="' + width
2254
- + '" height="' + height
2255
- + '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
2256
  }
2257
 
2258
- item.addClass('owl-video-playing');
2259
- this._playing = item;
2260
 
2261
- wrap = $('<div style="height:' + height + 'px; width:' + width + 'px" class="owl-video-frame">'
2262
- + html + '</div>');
2263
- target.after(wrap);
2264
  };
2265
 
2266
  /**
@@ -2270,35 +2251,10 @@
2270
  * @returns {Boolean}
2271
  */
2272
  Video.prototype.isInFullScreen = function() {
 
 
2273
 
2274
- // if Vimeo Fullscreen mode
2275
- var element = document.fullscreenElement || document.mozFullScreenElement
2276
- || document.webkitFullscreenElement;
2277
-
2278
- if (element && $(element).parent().hasClass('owl-video-frame')) {
2279
- this._core.speed(0);
2280
- this._fullscreen = true;
2281
- }
2282
-
2283
- if (element && this._fullscreen && this._playing) {
2284
- return false;
2285
- }
2286
-
2287
- // comming back from fullscreen
2288
- if (this._fullscreen) {
2289
- this._fullscreen = false;
2290
- return false;
2291
- }
2292
-
2293
- // check full screen mode and window orientation
2294
- if (this._playing) {
2295
- if (this._core.state.orientation !== window.orientation) {
2296
- this._core.state.orientation = window.orientation;
2297
- return false;
2298
- }
2299
- }
2300
-
2301
- return true;
2302
  };
2303
 
2304
  /**
@@ -2343,16 +2299,18 @@
2343
 
2344
  this.handlers = {
2345
  'change.owl.carousel': $.proxy(function(e) {
2346
- if (e.property.name == 'position') {
2347
  this.previous = this.core.current();
2348
  this.next = e.property.value;
2349
  }
2350
  }, this),
2351
  'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) {
2352
- this.swapping = e.type == 'translated';
 
 
2353
  }, this),
2354
  'translate.owl.carousel': $.proxy(function(e) {
2355
- if (this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) {
2356
  this.swap();
2357
  }
2358
  }, this)
@@ -2377,7 +2335,11 @@
2377
  */
2378
  Animate.prototype.swap = function() {
2379
 
2380
- if (this.core.settings.items !== 1 || !this.core.support3d) {
 
 
 
 
2381
  return;
2382
  }
2383
 
@@ -2396,16 +2358,16 @@
2396
 
2397
  if (outgoing) {
2398
  left = this.core.coordinates(this.previous) - this.core.coordinates(this.next);
2399
- previous.css( { 'left': left + 'px' } )
 
2400
  .addClass('animated owl-animated-out')
2401
- .addClass(outgoing)
2402
- .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', clear);
2403
  }
2404
 
2405
  if (incoming) {
2406
- next.addClass('animated owl-animated-in')
2407
- .addClass(incoming)
2408
- .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', clear);
2409
  }
2410
  };
2411
 
@@ -2414,8 +2376,8 @@
2414
  .removeClass('animated owl-animated-out owl-animated-in')
2415
  .removeClass(this.core.settings.animateIn)
2416
  .removeClass(this.core.settings.animateOut);
2417
- this.core.transitionEnd();
2418
- }
2419
 
2420
  /**
2421
  * Destroys the plugin.
@@ -2440,6 +2402,7 @@
2440
  * Autoplay Plugin
2441
  * @version 2.0.0
2442
  * @author Bartosz Wojciechowski
 
2443
  * @license The MIT License (MIT)
2444
  */
2445
  ;(function($, window, document, undefined) {
@@ -2449,33 +2412,73 @@
2449
  * @class The Autoplay Plugin
2450
  * @param {Owl} scope - The Owl Carousel
2451
  */
2452
- var Autoplay = function(scope) {
2453
- this.core = scope;
2454
- this.core.options = $.extend({}, Autoplay.Defaults, this.core.options);
 
 
 
 
2455
 
2456
- this.handlers = {
2457
- 'translated.owl.carousel refreshed.owl.carousel': $.proxy(function() {
2458
- this.autoplay();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2459
  }, this),
2460
  'play.owl.autoplay': $.proxy(function(e, t, s) {
2461
- this.play(t, s);
 
 
2462
  }, this),
2463
- 'stop.owl.autoplay': $.proxy(function() {
2464
- this.stop();
 
 
2465
  }, this),
2466
  'mouseover.owl.autoplay': $.proxy(function() {
2467
- if (this.core.settings.autoplayHoverPause) {
2468
  this.pause();
2469
  }
2470
  }, this),
2471
  'mouseleave.owl.autoplay': $.proxy(function() {
2472
- if (this.core.settings.autoplayHoverPause) {
2473
- this.autoplay();
2474
  }
2475
  }, this)
2476
  };
2477
 
2478
- this.core.$element.on(this.handlers);
 
 
 
 
2479
  };
2480
 
2481
  /**
@@ -2489,47 +2492,27 @@
2489
  autoplaySpeed: false
2490
  };
2491
 
2492
- /**
2493
- * @protected
2494
- * @todo Must be documented.
2495
- */
2496
- Autoplay.prototype.autoplay = function() {
2497
- if (this.core.settings.autoplay && !this.core.state.videoPlay) {
2498
- window.clearInterval(this.interval);
2499
-
2500
- this.interval = window.setInterval($.proxy(function() {
2501
- this.play();
2502
- }, this), this.core.settings.autoplayTimeout);
2503
- } else {
2504
- window.clearInterval(this.interval);
2505
- }
2506
- };
2507
-
2508
  /**
2509
  * Starts the autoplay.
2510
  * @public
2511
- * @param {Number} [timeout] - ...
2512
- * @param {Number} [speed] - ...
2513
- * @returns {Boolean|undefined} - ...
2514
- * @todo Must be documented.
2515
  */
2516
  Autoplay.prototype.play = function(timeout, speed) {
2517
- // if tab is inactive - doesnt work in <IE10
2518
- if (document.hidden === true) {
2519
- return;
2520
- }
2521
 
2522
- if (this.core.state.isTouch || this.core.state.isScrolling
2523
- || this.core.state.isSwiping || this.core.state.inMotion) {
2524
  return;
2525
  }
2526
 
2527
- if (this.core.settings.autoplay === false) {
2528
- window.clearInterval(this.interval);
2529
- return;
2530
- }
2531
 
2532
- this.core.next(this.core.settings.autoplaySpeed);
 
 
 
 
 
2533
  };
2534
 
2535
  /**
@@ -2537,15 +2520,24 @@
2537
  * @public
2538
  */
2539
  Autoplay.prototype.stop = function() {
2540
- window.clearInterval(this.interval);
 
 
 
 
 
2541
  };
2542
 
2543
  /**
2544
- * Pauses the autoplay.
2545
  * @public
2546
  */
2547
  Autoplay.prototype.pause = function() {
2548
- window.clearInterval(this.interval);
 
 
 
 
2549
  };
2550
 
2551
  /**
@@ -2554,10 +2546,10 @@
2554
  Autoplay.prototype.destroy = function() {
2555
  var handler, property;
2556
 
2557
- window.clearInterval(this.interval);
2558
 
2559
- for (handler in this.handlers) {
2560
- this.core.$element.off(handler, this.handlers[handler]);
2561
  }
2562
  for (property in Object.getOwnPropertyNames(this)) {
2563
  typeof this[property] != 'function' && (this[property] = null);
@@ -2642,46 +2634,43 @@
2642
  */
2643
  this._handlers = {
2644
  'prepared.owl.carousel': $.proxy(function(e) {
2645
- if (this._core.settings.dotsData) {
2646
- this._templates.push($(e.content).find('[data-dot]').andSelf('[data-dot]').attr('data-dot'));
 
2647
  }
2648
  }, this),
2649
- 'add.owl.carousel': $.proxy(function(e) {
2650
- if (this._core.settings.dotsData) {
2651
- this._templates.splice(e.position, 0, $(e.content).find('[data-dot]').andSelf('[data-dot]').attr('data-dot'));
2652
  }
2653
  }, this),
2654
- 'remove.owl.carousel prepared.owl.carousel': $.proxy(function(e) {
2655
- if (this._core.settings.dotsData) {
2656
  this._templates.splice(e.position, 1);
2657
  }
2658
  }, this),
2659
- 'change.owl.carousel': $.proxy(function(e) {
2660
- if (e.property.name == 'position') {
2661
- if (!this._core.state.revert && !this._core.settings.loop && this._core.settings.navRewind) {
2662
- var current = this._core.current(),
2663
- maximum = this._core.maximum(),
2664
- minimum = this._core.minimum();
2665
- e.data = e.property.value > maximum
2666
- ? current >= maximum ? minimum : maximum
2667
- : e.property.value < minimum ? maximum : e.property.value;
2668
- }
2669
- }
2670
- }, this),
2671
  'changed.owl.carousel': $.proxy(function(e) {
2672
- if (e.property.name == 'position') {
2673
  this.draw();
2674
  }
2675
  }, this),
2676
- 'refreshed.owl.carousel': $.proxy(function() {
2677
- if (!this._initialized) {
 
2678
  this.initialize();
 
 
2679
  this._initialized = true;
 
 
 
 
 
 
 
 
 
2680
  }
2681
- this._core.trigger('refresh', null, 'navigation');
2682
- this.update();
2683
- this.draw();
2684
- this._core.trigger('refreshed', null, 'navigation');
2685
  }, this)
2686
  };
2687
 
@@ -2690,7 +2679,7 @@
2690
 
2691
  // register event handlers
2692
  this.$element.on(this._handlers);
2693
- }
2694
 
2695
  /**
2696
  * Default options.
@@ -2699,7 +2688,6 @@
2699
  */
2700
  Navigation.Defaults = {
2701
  nav: false,
2702
- navRewind: true,
2703
  navText: [ 'prev', 'next' ],
2704
  navSpeed: false,
2705
  navElement: 'div',
@@ -2711,77 +2699,63 @@
2711
  dotsClass: 'owl-dots',
2712
  dots: true,
2713
  dotsEach: false,
2714
- dotData: false,
2715
  dotsSpeed: false,
2716
- dotsContainer: false,
2717
- controlsClass: 'owl-controls'
2718
- }
2719
 
2720
  /**
2721
  * Initializes the layout of the plugin and extends the carousel.
2722
  * @protected
2723
  */
2724
  Navigation.prototype.initialize = function() {
2725
- var $container, override,
2726
- options = this._core.settings;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2727
 
2728
- // create the indicator template
2729
- if (!options.dotsData) {
2730
  this._templates = [ $('<div>')
2731
- .addClass(options.dotClass)
2732
  .append($('<span>'))
2733
  .prop('outerHTML') ];
2734
  }
2735
 
2736
- // create controls container if needed
2737
- if (!options.navContainer || !options.dotsContainer) {
2738
- this._controls.$container = $('<div>')
2739
- .addClass(options.controlsClass)
2740
- .appendTo(this.$element);
2741
- }
2742
-
2743
- // create DOM structure for absolute navigation
2744
- this._controls.$indicators = options.dotsContainer ? $(options.dotsContainer)
2745
- : $('<div>').hide().addClass(options.dotsClass).appendTo(this._controls.$container);
2746
 
2747
- this._controls.$indicators.on('click', 'div', $.proxy(function(e) {
2748
- var index = $(e.target).parent().is(this._controls.$indicators)
2749
  ? $(e.target).index() : $(e.target).parent().index();
2750
 
2751
  e.preventDefault();
2752
 
2753
- this.to(index, options.dotsSpeed);
2754
  }, this));
2755
 
2756
- // create DOM structure for relative navigation
2757
- $container = options.navContainer ? $(options.navContainer)
2758
- : $('<div>').addClass(options.navContainerClass).prependTo(this._controls.$container);
2759
-
2760
- this._controls.$next = $('<' + options.navElement + '>');
2761
- this._controls.$previous = this._controls.$next.clone();
2762
-
2763
- this._controls.$previous
2764
- .addClass(options.navClass[0])
2765
- .html(options.navText[0])
2766
- .hide()
2767
- .prependTo($container)
2768
- .on('click', $.proxy(function(e) {
2769
- this.prev(options.navSpeed);
2770
- }, this));
2771
- this._controls.$next
2772
- .addClass(options.navClass[1])
2773
- .html(options.navText[1])
2774
- .hide()
2775
- .appendTo($container)
2776
- .on('click', $.proxy(function(e) {
2777
- this.next(options.navSpeed);
2778
- }, this));
2779
-
2780
  // override public methods of the carousel
2781
  for (override in this._overrides) {
2782
  this._core[override] = $.proxy(this[override], this);
2783
  }
2784
- }
2785
 
2786
  /**
2787
  * Destroys the plugin.
@@ -2802,7 +2776,7 @@
2802
  for (property in Object.getOwnPropertyNames(this)) {
2803
  typeof this[property] != 'function' && (this[property] = null);
2804
  }
2805
- }
2806
 
2807
  /**
2808
  * Updates the internal state.
@@ -2810,72 +2784,72 @@
2810
  */
2811
  Navigation.prototype.update = function() {
2812
  var i, j, k,
2813
- options = this._core.settings,
2814
  lower = this._core.clones().length / 2,
2815
  upper = lower + this._core.items().length,
2816
- size = options.center || options.autoWidth || options.dotData
2817
- ? 1 : options.dotsEach || options.items;
 
 
2818
 
2819
- if (options.slideBy !== 'page') {
2820
- options.slideBy = Math.min(options.slideBy, options.items);
2821
  }
2822
 
2823
- if (options.dots || options.slideBy == 'page') {
2824
  this._pages = [];
2825
 
2826
  for (i = lower, j = 0, k = 0; i < upper; i++) {
2827
  if (j >= size || j === 0) {
2828
  this._pages.push({
2829
- start: i - lower,
2830
  end: i - lower + size - 1
2831
  });
 
 
 
2832
  j = 0, ++k;
2833
  }
2834
  j += this._core.mergers(this._core.relative(i));
2835
  }
2836
  }
2837
- }
2838
 
2839
  /**
2840
  * Draws the user interface.
2841
- * @todo The option `dotData` wont work.
2842
  * @protected
2843
  */
2844
  Navigation.prototype.draw = function() {
2845
- var difference, i, html = '',
2846
- options = this._core.settings,
2847
- $items = this._core.$stage.children(),
2848
- index = this._core.relative(this._core.current());
 
2849
 
2850
- if (options.nav && !options.loop && !options.navRewind) {
2851
- this._controls.$previous.toggleClass('disabled', index <= 0);
2852
- this._controls.$next.toggleClass('disabled', index >= this._core.maximum());
 
 
2853
  }
2854
 
2855
- this._controls.$previous.toggle(options.nav);
2856
- this._controls.$next.toggle(options.nav);
2857
 
2858
- if (options.dots) {
2859
- difference = this._pages.length - this._controls.$indicators.children().length;
2860
 
2861
- if (options.dotData && difference !== 0) {
2862
- for (i = 0; i < this._controls.$indicators.children().length; i++) {
2863
- html += this._templates[this._core.relative(i)];
2864
- }
2865
- this._controls.$indicators.html(html);
2866
  } else if (difference > 0) {
2867
- html = new Array(difference + 1).join(this._templates[0]);
2868
- this._controls.$indicators.append(html);
2869
  } else if (difference < 0) {
2870
- this._controls.$indicators.children().slice(difference).remove();
2871
  }
2872
 
2873
- this._controls.$indicators.find('.active').removeClass('active');
2874
- this._controls.$indicators.children().eq($.inArray(this.current(), this._pages)).addClass('active');
2875
  }
2876
-
2877
- this._controls.$indicators.toggle(options.dots);
2878
- }
2879
 
2880
  /**
2881
  * Extends event data.
@@ -2888,10 +2862,10 @@
2888
  event.page = {
2889
  index: $.inArray(this.current(), this._pages),
2890
  count: this._pages.length,
2891
- size: settings && (settings.center || settings.autoWidth || settings.dotData
2892
  ? 1 : settings.dotsEach || settings.items)
2893
  };
2894
- }
2895
 
2896
  /**
2897
  * Gets the current page position of the carousel.
@@ -2899,11 +2873,11 @@
2899
  * @returns {Number}
2900
  */
2901
  Navigation.prototype.current = function() {
2902
- var index = this._core.relative(this._core.current());
2903
- return $.grep(this._pages, function(o) {
2904
- return o.start <= index && o.end >= index;
2905
- }).pop();
2906
- }
2907
 
2908
  /**
2909
  * Gets the current succesor/predecessor position.
@@ -2912,9 +2886,9 @@
2912
  */
2913
  Navigation.prototype.getPosition = function(successor) {
2914
  var position, length,
2915
- options = this._core.settings;
2916
 
2917
- if (options.slideBy == 'page') {
2918
  position = $.inArray(this.current(), this._pages);
2919
  length = this._pages.length;
2920
  successor ? ++position : --position;
@@ -2922,10 +2896,11 @@
2922
  } else {
2923
  position = this._core.relative(this._core.current());
2924
  length = this._core.items().length;
2925
- successor ? position += options.slideBy : position -= options.slideBy;
2926
  }
 
2927
  return position;
2928
- }
2929
 
2930
  /**
2931
  * Slides to the next item or page.
@@ -2934,7 +2909,7 @@
2934
  */
2935
  Navigation.prototype.next = function(speed) {
2936
  $.proxy(this._overrides.to, this._core)(this.getPosition(true), speed);
2937
- }
2938
 
2939
  /**
2940
  * Slides to the previous item or page.
@@ -2943,7 +2918,7 @@
2943
  */
2944
  Navigation.prototype.prev = function(speed) {
2945
  $.proxy(this._overrides.to, this._core)(this.getPosition(false), speed);
2946
- }
2947
 
2948
  /**
2949
  * Slides to the specified item or page.
@@ -2961,7 +2936,7 @@
2961
  } else {
2962
  $.proxy(this._overrides.to, this._core)(position, speed);
2963
  }
2964
- }
2965
 
2966
  $.fn.owlCarousel.Constructor.Plugins.Navigation = Navigation;
2967
 
@@ -2990,7 +2965,7 @@
2990
  this._core = carousel;
2991
 
2992
  /**
2993
- * Hash table for the hashes.
2994
  * @protected
2995
  * @type {Object}
2996
  */
@@ -3008,14 +2983,35 @@
3008
  * @type {Object}
3009
  */
3010
  this._handlers = {
3011
- 'initialized.owl.carousel': $.proxy(function() {
3012
- if (this._core.settings.startPosition == 'URLHash') {
3013
  $(window).trigger('hashchange.owl.navigation');
3014
  }
3015
  }, this),
3016
  'prepared.owl.carousel': $.proxy(function(e) {
3017
- var hash = $(e.content).find('[data-hash]').andSelf('[data-hash]').attr('data-hash');
3018
- this._hashes[hash] = e.content;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3019
  }, this)
3020
  };
3021
 
@@ -3026,18 +3022,18 @@
3026
  this.$element.on(this._handlers);
3027
 
3028
  // register event listener for hash navigation
3029
- $(window).on('hashchange.owl.navigation', $.proxy(function() {
3030
  var hash = window.location.hash.substring(1),
3031
  items = this._core.$stage.children(),
3032
- position = this._hashes[hash] && items.index(this._hashes[hash]) || 0;
3033
 
3034
- if (!hash) {
3035
- return false;
3036
  }
3037
 
3038
- this._core.to(position, false, true);
3039
  }, this));
3040
- }
3041
 
3042
  /**
3043
  * Default options.
@@ -3045,7 +3041,7 @@
3045
  */
3046
  Hash.Defaults = {
3047
  URLhashListener: false
3048
- }
3049
 
3050
  /**
3051
  * Destroys the plugin.
@@ -3062,8 +3058,91 @@
3062
  for (property in Object.getOwnPropertyNames(this)) {
3063
  typeof this[property] != 'function' && (this[property] = null);
3064
  }
3065
- }
3066
 
3067
  $.fn.owlCarousel.Constructor.Plugins.Hash = Hash;
3068
 
3069
  })(window.Zepto || window.jQuery, window, document);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  */
12
  ;(function($, window, document, undefined) {
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  /**
15
  * Creates a carousel.
16
  * @class The Owl Carousel.
39
  this.$element = $(element);
40
 
41
  /**
42
+ * Proxied event handlers.
 
 
 
 
 
 
 
 
 
 
43
  * @protected
 
44
  */
45
+ this._handlers = {};
46
 
47
  /**
48
  * References to the running plugins of this carousel.
106
  */
107
  this._mergers = [];
108
 
109
+ /**
110
+ * Widths of all items.
111
+ */
112
+ this._widths = [];
113
+
114
  /**
115
  * Invalidated parts within the update process.
116
  * @protected
123
  */
124
  this._pipe = [];
125
 
126
+ /**
127
+ * Current state information for the drag operation.
128
+ * @todo #261
129
+ * @protected
130
+ */
131
+ this._drag = {
132
+ time: null,
133
+ target: null,
134
+ pointer: null,
135
+ stage: {
136
+ start: null,
137
+ current: null
138
+ },
139
+ direction: null
140
+ };
141
+
142
+ /**
143
+ * Current state information and their tags.
144
+ * @type {Object}
145
+ * @protected
146
+ */
147
+ this._states = {
148
+ current: {},
149
+ tags: {
150
+ 'initializing': [ 'busy' ],
151
+ 'animating': [ 'busy' ],
152
+ 'dragging': [ 'interacting' ]
153
+ }
154
+ };
155
+
156
+ $.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler) {
157
+ this._handlers[handler] = $.proxy(this[handler], this);
158
+ }, this));
159
+
160
  $.each(Owl.Plugins, $.proxy(function(key, plugin) {
161
+ this._plugins[key.charAt(0).toLowerCase() + key.slice(1)]
162
  = new plugin(this);
163
  }, this));
164
 
165
+ $.each(Owl.Workers, $.proxy(function(priority, worker) {
166
  this._pipe.push({
167
  'filter': worker.filter,
168
  'run': $.proxy(worker.run, this)
181
  items: 3,
182
  loop: false,
183
  center: false,
184
+ rewind: false,
185
 
186
  mouseDrag: true,
187
  touchDrag: true,
205
  responsive: {},
206
  responsiveRefreshRate: 200,
207
  responsiveBaseElement: window,
 
208
 
209
  fallbackEasing: 'swing',
210
 
214
  itemElement: 'div',
215
  stageElement: 'div',
216
 
217
+ refreshClass: 'owl-refresh',
218
+ loadedClass: 'owl-loaded',
219
+ loadingClass: 'owl-loading',
220
+ rtlClass: 'owl-rtl',
221
+ responsiveClass: 'owl-responsive',
222
+ dragClass: 'owl-drag',
223
  itemClass: 'owl-item',
224
+ stageClass: 'owl-stage',
225
+ stageOuterClass: 'owl-stage-outer',
226
+ grabClass: 'owl-grab'
227
  };
228
 
229
  /**
238
  Outer: 'outer'
239
  };
240
 
241
+ /**
242
+ * Enumeration for types.
243
+ * @public
244
+ * @readonly
245
+ * @enum {String}
246
+ */
247
+ Owl.Type = {
248
+ Event: 'event',
249
+ State: 'state'
250
+ };
251
+
252
  /**
253
  * Contains all registered plugins.
254
  * @public
256
  Owl.Plugins = {};
257
 
258
  /**
259
+ * List of workers involved in the update process.
260
  */
261
+ Owl.Workers = [ {
262
+ filter: [ 'width', 'settings' ],
263
+ run: function() {
264
+ this._width = this.$element.width();
265
+ }
266
+ }, {
267
  filter: [ 'width', 'items', 'settings' ],
268
  run: function(cache) {
269
  cache.current = this._items && this._items[this.relative(this._current)];
271
  }, {
272
  filter: [ 'items', 'settings' ],
273
  run: function() {
274
+ this.$stage.children('.cloned').remove();
275
+ }
276
+ }, {
277
+ filter: [ 'width', 'items', 'settings' ],
278
+ run: function(cache) {
279
+ var margin = this.settings.margin || '',
280
+ grid = !this.settings.autoWidth,
281
+ rtl = this.settings.rtl,
282
+ css = {
283
+ 'width': 'auto',
284
+ 'margin-left': rtl ? margin : '',
285
+ 'margin-right': rtl ? '' : margin
286
+ };
287
+
288
+ !grid && this.$stage.children().css(css);
289
+
290
+ cache.css = css;
291
+ }
292
+ }, {
293
+ filter: [ 'width', 'items', 'settings' ],
294
+ run: function(cache) {
295
+ var width = (this.width() / this.settings.items).toFixed(3) - this.settings.margin,
296
+ merge = null,
297
+ iterator = this._items.length,
298
+ grid = !this.settings.autoWidth,
299
+ widths = [];
300
+
301
+ cache.items = {
302
+ merge: false,
303
+ width: width
304
+ };
305
+
306
+ while (iterator--) {
307
+ merge = this._mergers[iterator];
308
+ merge = this.settings.mergeFit && Math.min(merge, this.settings.items) || merge;
309
 
310
+ cache.items.merge = merge > 1 || cache.items.merge;
311
+
312
+ widths[iterator] = !grid ? this._items[iterator].width() : width * merge;
313
  }
314
+
315
+ this._widths = widths;
316
  }
317
  }, {
318
  filter: [ 'items', 'settings' ],
319
  run: function() {
320
+ var clones = [],
 
321
  items = this._items,
322
+ settings = this.settings,
323
+ view = Math.max(settings.items * 2, 4),
324
+ size = Math.ceil(items.length / 2) * 2,
325
+ repeat = settings.loop && items.length ? settings.rewind ? view : Math.max(view, size) : 0,
326
+ append = '',
327
+ prepend = '';
328
+
329
+ repeat /= 2;
330
+
331
+ while (repeat--) {
332
+ clones.push(this.normalize(clones.length / 2, true));
333
+ append = append + items[clones[clones.length - 1]][0].outerHTML;
334
+ clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));
335
+ prepend = items[clones[clones.length - 1]][0].outerHTML + prepend;
336
  }
337
+
338
+ this._clones = clones;
339
+
340
+ $(append).addClass('cloned').appendTo(this.$stage);
341
+ $(prepend).addClass('cloned').prependTo(this.$stage);
342
  }
343
  }, {
344
  filter: [ 'width', 'items', 'settings' ],
345
  run: function() {
346
+ var rtl = this.settings.rtl ? 1 : -1,
347
+ size = this._clones.length + this._items.length,
348
+ iterator = -1,
349
+ previous = 0,
350
+ current = 0,
351
+ coordinates = [];
352
+
353
+ while (++iterator < size) {
354
+ previous = coordinates[iterator - 1] || 0;
355
+ current = this._widths[this.relative(iterator)] + this.settings.margin;
356
+ coordinates.push(previous + current * rtl);
357
  }
358
+
359
+ this._coordinates = coordinates;
360
  }
361
  }, {
362
  filter: [ 'width', 'items', 'settings' ],
363
  run: function() {
364
+ var padding = this.settings.stagePadding,
365
+ coordinates = this._coordinates,
366
+ css = {
367
+ 'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2,
368
+ 'padding-left': padding || '',
369
+ 'padding-right': padding || ''
370
+ };
371
 
372
  this.$stage.css(css);
373
+ }
374
+ }, {
375
+ filter: [ 'width', 'items', 'settings' ],
376
+ run: function(cache) {
377
+ var iterator = this._coordinates.length,
378
+ grid = !this.settings.autoWidth,
379
+ items = this.$stage.children();
380
+
381
+ if (grid && cache.items.merge) {
382
+ while (iterator--) {
383
+ cache.css.width = this._widths[this.relative(iterator)];
384
+ items.eq(iterator).css(cache.css);
385
  }
386
+ } else if (grid) {
387
+ cache.css.width = cache.items.width;
388
+ items.css(cache.css);
389
  }
390
  }
391
+ }, {
392
+ filter: [ 'items' ],
393
+ run: function() {
394
+ this._coordinates.length < 1 && this.$stage.removeAttr('style');
395
+ }
396
  }, {
397
  filter: [ 'width', 'items', 'settings' ],
398
  run: function(cache) {
399
+ cache.current = cache.current ? this.$stage.children().index(cache.current) : 0;
400
+ cache.current = Math.max(this.minimum(), Math.min(this.maximum(), cache.current));
401
+ this.reset(cache.current);
402
  }
403
  }, {
404
  filter: [ 'position' ],
424
  }
425
  }
426
 
427
+ this.$stage.children('.active').removeClass('active');
428
+ this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active');
429
 
430
  if (this.settings.center) {
431
+ this.$stage.children('.center').removeClass('center');
432
+ this.$stage.children().eq(this.current()).addClass('center');
433
  }
434
  }
435
  } ];
439
  * @protected
440
  */
441
  Owl.prototype.initialize = function() {
442
+ this.enter('initializing');
443
  this.trigger('initialize');
444
 
445
+ this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl);
 
 
 
 
 
 
446
 
447
+ if (this.settings.autoWidth && !this.is('pre-loading')) {
448
  var imgs, nestedSelector, width;
449
  imgs = this.$element.find('img');
450
  nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined;
452
 
453
  if (imgs.length && width <= 0) {
454
  this.preloadAutoWidthImages(imgs);
 
455
  }
456
  }
457
 
458
+ this.$element.addClass(this.options.loadingClass);
459
 
460
  // create stage
461
+ this.$stage = $('<' + this.settings.stageElement + ' class="' + this.settings.stageClass + '"/>')
462
+ .wrap('<div class="' + this.settings.stageOuterClass + '"/>');
463
 
464
  // append stage
465
  this.$element.append(this.$stage.parent());
467
  // append content
468
  this.replace(this.$element.children().not(this.$stage.parent()));
469
 
470
+ // check visibility
471
+ if (this.$element.is(':visible')) {
472
+ // update view
473
+ this.refresh();
474
+ } else {
475
+ // invalidate width
476
+ this.invalidate('width');
477
+ }
 
 
478
 
479
+ this.$element
480
+ .removeClass(this.options.loadingClass)
481
+ .addClass(this.options.loadedClass);
482
 
483
+ // register event handlers
484
+ this.registerEventHandlers();
485
 
486
+ this.leave('initializing');
487
  this.trigger('initialized');
488
  };
489
 
513
 
514
  // responsive class
515
  if (settings.responsiveClass) {
516
+ this.$element.attr('class',
517
+ this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match)
518
+ );
519
  }
520
  }
521
 
533
  * @protected
534
  */
535
  Owl.prototype.optionsLogic = function() {
 
 
 
 
 
 
 
 
536
  if (this.settings.autoWidth) {
537
  this.settings.stagePadding = false;
538
  this.settings.merge = false;
550
 
551
  if (!event.data) {
552
  event.data = $('<' + this.settings.itemElement + '/>')
553
+ .addClass(this.options.itemClass).append(item)
554
  }
555
 
556
  this.trigger('prepared', { content: event.data });
576
  }
577
 
578
  this._invalidated = {};
579
+
580
+ !this.is('valid') && this.enter('valid');
581
  };
582
 
583
  /**
602
  * @public
603
  */
604
  Owl.prototype.refresh = function() {
605
+ this.enter('refreshing');
 
 
 
 
 
606
  this.trigger('refresh');
607
 
608
  this.setup();
609
 
610
  this.optionsLogic();
611
 
612
+ this.$element.addClass(this.options.refreshClass);
 
 
613
 
614
  this.update();
615
 
616
+ this.$element.removeClass(this.options.refreshClass);
 
 
 
 
617
 
618
+ this.leave('refreshing');
619
  this.trigger('refreshed');
620
  };
621
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
622
  /**
623
  * Checks window `resize` event.
624
  * @protected
625
  */
626
  Owl.prototype.onThrottledResize = function() {
627
  window.clearTimeout(this.resizeTimer);
628
+ this.resizeTimer = window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate);
629
  };
630
 
631
  /**
641
  return false;
642
  }
643
 
644
+ if (!this.$element.is(':visible')) {
645
  return false;
646
  }
647
 
648
+ this.enter('resizing');
649
+
650
+ if (this.trigger('resize').isDefaultPrevented()) {
651
+ this.leave('resizing');
652
+ return false;
653
+ }
654
 
655
  this.invalidate('width');
656
 
657
  this.refresh();
658
 
659
+ this.leave('resizing');
660
  this.trigger('resized');
661
  };
662
 
663
  /**
664
+ * Registers event handlers.
665
+ * @todo Check `msPointerEnabled`
666
+ * @todo #261
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
667
  * @protected
668
  */
669
+ Owl.prototype.registerEventHandlers = function() {
670
+ if ($.support.transition) {
671
+ this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this));
 
 
 
 
 
 
 
672
  }
673
 
674
+ if (this.settings.responsive !== false) {
675
+ this.on(window, 'resize', this._handlers.onThrottledResize);
676
  }
677
 
678
+ if (this.settings.mouseDrag) {
679
+ this.$element.addClass(this.options.dragClass);
680
+ this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this));
681
+ this.$stage.on('dragstart.owl.core selectstart.owl.core', function() { return false });
682
  }
683
 
684
+ if (this.settings.touchDrag){
685
+ this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this));
686
+ this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this));
687
  }
688
  };
689
 
690
  /**
691
+ * Handles `touchstart` and `mousedown` events.
692
+ * @todo Horizontal swipe threshold as option
693
+ * @todo #261
694
  * @protected
695
  * @param {Event} event - The event arguments.
696
  */
697
  Owl.prototype.onDragStart = function(event) {
698
+ var stage = null;
699
 
700
+ if (event.which === 3) {
701
+ return;
702
+ }
703
 
704
+ if ($.support.transform) {
705
+ stage = this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(',');
706
+ stage = {
707
+ x: stage[stage.length === 16 ? 12 : 4],
708
+ y: stage[stage.length === 16 ? 13 : 5]
709
+ };
710
+ } else {
711
+ stage = this.$stage.position();
712
+ stage = {
713
+ x: this.settings.rtl ?
714
+ stage.left + this.$stage.width() - this.width() + this.settings.margin :
715
+ stage.left,
716
+ y: stage.top
717
+ };
718
  }
719
 
720
+ if (this.is('animating')) {
721
+ $.support.transform ? this.animate(stage.x) : this.$stage.stop()
722
+ this.invalidate('position');
723
  }
724
 
725
+ this.$element.toggleClass(this.options.grabClass, event.type === 'mousedown');
726
+
727
  this.speed(0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
728
 
729
+ this._drag.time = new Date().getTime();
730
+ this._drag.target = $(event.target);
731
+ this._drag.stage.start = stage;
732
+ this._drag.stage.current = stage;
733
+ this._drag.pointer = this.pointer(event);
734
 
735
+ $(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this));
 
 
736
 
737
+ $(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event) {
738
+ var delta = this.difference(this._drag.pointer, this.pointer(event));
739
+
740
+ $(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this));
 
741
 
742
+ if (Math.abs(delta.x) < Math.abs(delta.y) && this.is('valid')) {
743
+ return;
744
+ }
745
+
746
+ event.preventDefault();
747
+
748
+ this.enter('dragging');
749
+ this.trigger('drag');
750
+ }, this));
751
  };
752
 
753
  /**
754
+ * Handles the `touchmove` and `mousemove` events.
755
+ * @todo #261
756
  * @protected
757
  * @param {Event} event - The event arguments.
758
  */
759
  Owl.prototype.onDragMove = function(event) {
760
+ var minimum = null,
761
+ maximum = null,
762
+ pull = null,
763
+ delta = this.difference(this._drag.pointer, this.pointer(event)),
764
+ stage = this.difference(this._drag.stage.start, delta);
765
 
766
+ if (!this.is('dragging')) {
767
  return;
768
  }
769
 
770
+ event.preventDefault();
 
 
771
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
772
  if (this.settings.loop) {
773
+ minimum = this.coordinates(this.minimum());
774
+ maximum = this.coordinates(this.maximum() + 1) - minimum;
775
+ stage.x = (((stage.x - minimum) % maximum + maximum) % maximum) + minimum;
 
 
776
  } else {
777
+ minimum = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum());
778
+ maximum = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum());
779
+ pull = this.settings.pullDrag ? -1 * delta.x / 5 : 0;
780
+ stage.x = Math.max(Math.min(stage.x, minimum + pull), maximum + pull);
 
 
 
 
 
 
 
 
 
 
 
 
781
  }
782
 
783
+ this._drag.stage.current = stage;
 
 
 
 
 
 
784
 
785
+ this.animate(stage.x);
786
  };
787
 
788
  /**
789
+ * Handles the `touchend` and `mouseup` events.
790
+ * @todo #261
791
+ * @todo Threshold for click event
792
  * @protected
793
+ * @param {Event} event - The event arguments.
794
  */
795
  Owl.prototype.onDragEnd = function(event) {
796
+ var delta = this.difference(this._drag.pointer, this.pointer(event)),
797
+ stage = this._drag.stage.current,
798
+ direction = delta.x > 0 ^ this.settings.rtl ? 'left' : 'right';
 
 
 
 
 
 
799
 
800
+ $(document).off('.owl.core');
 
 
 
 
 
801
 
802
+ this.$element.removeClass(this.options.grabClass);
 
 
 
 
 
 
 
 
803
 
804
+ if (delta.x !== 0 && this.is('dragging') || !this.is('valid')) {
805
+ this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed);
806
+ this.current(this.closest(stage.x, delta.x !== 0 ? direction : this._drag.direction));
807
+ this.invalidate('position');
808
+ this.update();
 
 
 
 
 
 
 
809
 
810
+ this._drag.direction = direction;
 
 
 
811
 
812
+ if (Math.abs(delta.x) > 3 || new Date().getTime() - this._drag.time > 300) {
813
+ this._drag.target.one('click.owl.core', function() { return false; });
814
+ }
 
815
  }
816
 
817
+ if (!this.is('dragging')) {
818
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
819
  }
 
 
820
 
821
+ this.leave('dragging');
822
+ this.trigger('dragged');
 
 
 
 
 
 
 
 
 
 
 
 
823
  };
824
 
825
  /**
827
  * @todo Setting `freeDrag` makes `closest` not reusable. See #165.
828
  * @protected
829
  * @param {Number} coordinate - The coordinate in pixel.
830
+ * @param {String} direction - The direction to check for the closest item. Ether `left` or `right`.
831
  * @return {Number} - The absolute position of the closest item.
832
  */
833
+ Owl.prototype.closest = function(coordinate, direction) {
834
+ var position = -1,
835
+ pull = 30,
836
+ width = this.width(),
837
+ coordinates = this.coordinates();
838
 
839
  if (!this.settings.freeDrag) {
840
  // check closest item
843
  position = index;
844
  } else if (this.op(coordinate, '<', value)
845
  && this.op(coordinate, '>', coordinates[index + 1] || value - width)) {
846
+ position = direction === 'left' ? index + 1 : index;
847
  }
848
  return position === -1;
849
  }, this));
863
 
864
  /**
865
  * Animates the stage.
866
+ * @todo #270
867
  * @public
868
  * @param {Number} coordinate - The coordinate in pixels.
869
  */
870
  Owl.prototype.animate = function(coordinate) {
871
+ var animate = this.speed() > 0;
 
872
 
873
+ this.is('animating') && this.onTransitionEnd();
874
+
875
+ if (animate) {
876
+ this.enter('animating');
877
+ this.trigger('translate');
878
+ }
879
+
880
+ if ($.support.transform3d && $.support.transition) {
881
  this.$stage.css({
882
+ transform: 'translate3d(' + coordinate + 'px,0px,0px)',
883
  transition: (this.speed() / 1000) + 's'
884
  });
885
+ } else if (animate) {
886
+ this.$stage.animate({
887
+ left: coordinate + 'px'
888
+ }, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this));
889
+ } else {
890
  this.$stage.css({
891
  left: coordinate + 'px'
892
  });
 
 
 
 
 
 
 
 
893
  }
894
  };
895
 
896
+ /**
897
+ * Checks whether the carousel is in a specific state or not.
898
+ * @param {String} state - The state to check.
899
+ * @returns {Boolean} - The flag which indicates if the carousel is busy.
900
+ */
901
+ Owl.prototype.is = function(state) {
902
+ return this._states.current[state] && this._states.current[state] > 0;
903
+ };
904
+
905
  /**
906
  * Sets the absolute position of the current item.
907
  * @public
938
 
939
  /**
940
  * Invalidates the given part of the update routine.
941
+ * @param {String} [part] - The part to invalidate.
942
+ * @returns {Array.<String>} - The invalidated parts.
943
  */
944
  Owl.prototype.invalidate = function(part) {
945
+ if ($.type(part) === 'string') {
946
+ this._invalidated[part] = true;
947
+ this.is('valid') && this.leave('valid');
948
+ }
949
+ return $.map(this._invalidated, function(v, i) { return i });
950
+ };
951
 
952
  /**
953
  * Resets the absolute position of the current item.
972
  };
973
 
974
  /**
975
+ * Normalizes an absolute or a relative position of an item.
976
  * @public
977
  * @param {Number} position - The absolute or relative position to normalize.
978
  * @param {Boolean} [relative=false] - Whether the given position is relative or not.
979
  * @returns {Number} - The normalized position.
980
  */
981
  Owl.prototype.normalize = function(position, relative) {
982
+ var n = this._items.length,
983
+ m = relative ? 0 : this._clones.length;
984
 
985
  if (!$.isNumeric(position) || n < 1) {
986
+ position = undefined;
987
+ } else if (position < 0 || position >= n + m) {
988
+ position = ((position - m / 2) % n + n) % n + m / 2;
 
 
 
 
989
  }
990
 
991
  return position;
992
  };
993
 
994
  /**
995
+ * Converts an absolute position of an item into a relative one.
996
  * @public
997
  * @param {Number} position - The absolute position to convert.
998
  * @returns {Number} - The converted position.
999
  */
1000
  Owl.prototype.relative = function(position) {
1001
+ position -= this._clones.length / 2;
 
1002
  return this.normalize(position, true);
1003
  };
1004
 
1005
  /**
1006
+ * Gets the maximum position for the current item.
1007
  * @public
1008
  * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
1009
  * @returns {Number}
1010
  */
1011
  Owl.prototype.maximum = function(relative) {
1012
+ var settings = this.settings,
1013
+ maximum = this._coordinates.length,
1014
+ boundary = Math.abs(this._coordinates[maximum - 1]) - this._width,
1015
+ i = -1, j;
 
 
1016
 
1017
+ if (settings.loop) {
1018
+ maximum = this._clones.length / 2 + this._items.length - 1;
 
 
 
 
1019
  } else if (settings.autoWidth || settings.merge) {
1020
+ // binary search
1021
+ while (maximum - i > 1) {
1022
+ Math.abs(this._coordinates[j = maximum + i >> 1]) < boundary
1023
+ ? i = j : maximum = j;
 
 
 
1024
  }
1025
+ } else if (settings.center) {
1026
+ maximum = this._items.length - 1;
1027
  } else {
1028
+ maximum = this._items.length - settings.items;
1029
  }
1030
 
1031
+ if (relative) {
1032
+ maximum -= this._clones.length / 2;
1033
+ }
1034
+
1035
+ return Math.max(maximum, 0);
1036
  };
1037
 
1038
  /**
1039
+ * Gets the minimum position for the current item.
1040
  * @public
1041
  * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
1042
  * @returns {Number}
1043
  */
1044
  Owl.prototype.minimum = function(relative) {
1045
+ return relative ? 0 : this._clones.length / 2;
 
 
 
 
1046
  };
1047
 
1048
  /**
1152
  * @param {Number} [speed] - The time in milliseconds for the transition.
1153
  */
1154
  Owl.prototype.to = function(position, speed) {
1155
+ var current = this.current(),
1156
+ revert = null,
1157
+ distance = position - this.relative(current),
1158
+ direction = (distance > 0) - (distance < 0),
1159
+ items = this._items.length,
1160
+ minimum = this.minimum(),
1161
+ maximum = this.maximum();
1162
+
1163
  if (this.settings.loop) {
1164
+ if (!this.settings.rewind && Math.abs(distance) > items / 2) {
1165
+ distance += direction * -1 * items;
1166
+ }
1167
+
1168
+ position = current + distance;
1169
+ revert = ((position - minimum) % items + items) % items + minimum;
1170
+
1171
+ if (revert !== position && revert - distance <= maximum && revert - distance > 0) {
1172
+ current = revert - distance;
1173
+ position = revert;
1174
+ this.reset(current);
 
 
1175
  }
1176
+ } else if (this.settings.rewind) {
1177
+ maximum += 1;
1178
+ position = (position % maximum + maximum) % maximum;
 
 
 
1179
  } else {
1180
+ position = Math.max(minimum, Math.min(maximum, position));
1181
+ }
1182
+
1183
+ this.speed(this.duration(current, position, speed));
1184
+ this.current(position);
1185
+
1186
+ if (this.$element.is(':visible')) {
1187
  this.update();
1188
  }
1189
  };
1213
  * @protected
1214
  * @param {Event} event - The event arguments.
1215
  */
1216
+ Owl.prototype.onTransitionEnd = function(event) {
1217
 
1218
  // if css2 animation then event object is undefined
1219
  if (event !== undefined) {
1225
  }
1226
  }
1227
 
1228
+ this.leave('animating');
1229
  this.trigger('translated');
1230
  };
1231
 
1287
  * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end.
1288
  */
1289
  Owl.prototype.add = function(content, position) {
1290
+ var current = this.relative(this._current);
1291
+
1292
  position = position === undefined ? this._items.length : this.normalize(position, true);
1293
+ content = content instanceof jQuery ? content : $(content);
1294
 
1295
  this.trigger('add', { content: content, position: position });
1296
 
1297
+ content = this.prepare(content);
1298
+
1299
  if (this._items.length === 0 || position === this._items.length) {
1300
+ this._items.length === 0 && this.$stage.append(content);
1301
+ this._items.length !== 0 && this._items[position - 1].after(content);
1302
  this._items.push(content);
1303
  this._mergers.push(content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
1304
  } else {
1307
  this._mergers.splice(position, 0, content.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
1308
  }
1309
 
1310
+ this._items[current] && this.reset(this._items[current].index());
1311
+
1312
  this.invalidate('items');
1313
 
1314
  this.trigger('added', { content: content, position: position });
1339
  };
1340
 
1341
  /**
1342
+ * Preloads images with auto width.
1343
+ * @todo Replace by a more generic approach
1344
  * @protected
1345
  */
1346
+ Owl.prototype.preloadAutoWidthImages = function(images) {
1347
+ images.each($.proxy(function(i, element) {
1348
+ this.enter('pre-loading');
1349
+ element = $(element);
1350
+ $(new Image()).one('load', $.proxy(function(e) {
1351
+ element.attr('src', e.target.src);
1352
+ element.css('opacity', 1);
1353
+ this.leave('pre-loading');
1354
+ !this.is('pre-loading') && !this.is('initializing') && this.refresh();
1355
+ }, this)).attr('src', element.attr('src') || element.attr('data-src') || element.attr('data-src-retina'));
 
 
 
 
 
 
 
 
 
 
 
 
1356
  }, this));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1357
  };
1358
 
1359
  /**
1362
  */
1363
  Owl.prototype.destroy = function() {
1364
 
1365
+ this.$element.off('.owl.core');
1366
+ this.$stage.off('.owl.core');
1367
+ $(document).off('.owl.core');
1368
 
1369
  if (this.settings.responsive !== false) {
1370
+ window.clearTimeout(this.resizeTimer);
1371
+ this.off(window, 'resize', this._handlers.onThrottledResize);
 
 
 
1372
  }
1373
 
1374
+ for (var i in this._plugins) {
1375
  this._plugins[i].destroy();
1376
  }
1377
 
 
 
 
 
 
 
 
 
 
 
1378
  this.$stage.children('.cloned').remove();
 
 
1379
 
1380
+ this.$stage.unwrap();
1381
  this.$stage.children().contents().unwrap();
1382
  this.$stage.children().unwrap();
1383
+
1384
+ this.$element
1385
+ .removeClass(this.options.refreshClass)
1386
+ .removeClass(this.options.loadingClass)
1387
+ .removeClass(this.options.loadedClass)
1388
+ .removeClass(this.options.rtlClass)
1389
+ .removeClass(this.options.dragClass)
1390
+ .removeClass(this.options.grabClass)
1391
+ .attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), ''))
1392
+ .removeData('owl.carousel');
1393
  };
1394
 
1395
  /**
1448
  };
1449
 
1450
  /**
1451
+ * Triggers a public event.
1452
+ * @todo Remove `status`, `relatedTarget` should be used instead.
1453
  * @protected
1454
  * @param {String} name - The event name.
1455
  * @param {*} [data=null] - The event data.
1456
+ * @param {String} [namespace=carousel] - The event namespace.
1457
+ * @param {String} [state] - The state which is associated with the event.
1458
+ * @param {Boolean} [enter=false] - Indicates if the call enters the specified state or not.
1459
  * @returns {Event} - The event arguments.
1460
  */
1461
+ Owl.prototype.trigger = function(name, data, namespace, state, enter) {
1462
  var status = {
1463
  item: { count: this._items.length, index: this.current() }
1464
  }, handler = $.camelCase(
1476
  }
1477
  });
1478
 
1479
+ this.register({ type: Owl.Type.Event, name: name });
1480
  this.$element.trigger(event);
1481
 
1482
  if (this.settings && typeof this.settings[handler] === 'function') {
1483
+ this.settings[handler].call(this, event);
1484
  }
1485
  }
1486
 
1487
  return event;
1488
  };
1489
 
1490
+ /**
1491
+ * Enters a state.
1492
+ * @param name - The state name.
1493
+ */
1494
+ Owl.prototype.enter = function(name) {
1495
+ $.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
1496
+ if (this._states.current[name] === undefined) {
1497
+ this._states.current[name] = 0;
1498
+ }
1499
+
1500
+ this._states.current[name]++;
1501
+ }, this));
1502
+ };
1503
+
1504
+ /**
1505
+ * Leaves a state.
1506
+ * @param name - The state name.
1507
+ */
1508
+ Owl.prototype.leave = function(name) {
1509
+ $.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
1510
+ this._states.current[name]--;
1511
+ }, this));
1512
+ };
1513
+
1514
+ /**
1515
+ * Registers an event or state.
1516
+ * @public
1517
+ * @param {Object} object - The event or state to register.
1518
+ */
1519
+ Owl.prototype.register = function(object) {
1520
+ if (object.type === Owl.Type.Event) {
1521
+ if (!$.event.special[object.name]) {
1522
+ $.event.special[object.name] = {};
1523
+ }
1524
+
1525
+ if (!$.event.special[object.name].owl) {
1526
+ var _default = $.event.special[object.name]._default;
1527
+ $.event.special[object.name]._default = function(e) {
1528
+ if (_default && _default.apply && (!e.namespace || e.namespace.indexOf('owl') === -1)) {
1529
+ return _default.apply(this, arguments);
1530
+ }
1531
+ return e.namespace && e.namespace.indexOf('owl') > -1;
1532
+ };
1533
+ $.event.special[object.name].owl = true;
1534
+ }
1535
+ } else if (object.type === Owl.Type.State) {
1536
+ if (!this._states.tags[object.name]) {
1537
+ this._states.tags[object.name] = object.tags;
1538
+ } else {
1539
+ this._states.tags[object.name] = this._states.tags[object.name].concat(object.tags);
1540
+ }
1541
+
1542
+ this._states.tags[object.name] = $.grep(this._states.tags[object.name], $.proxy(function(tag, i) {
1543
+ return $.inArray(tag, this._states.tags[object.name]) === i;
1544
+ }, this));
1545
+ }
1546
+ };
1547
+
1548
  /**
1549
  * Suppresses events.
1550
  * @protected
1554
  $.each(events, $.proxy(function(index, event) {
1555
  this._supress[event] = true;
1556
  }, this));
1557
+ };
1558
 
1559
  /**
1560
  * Releases suppressed events.
1565
  $.each(events, $.proxy(function(index, event) {
1566
  delete this._supress[event];
1567
  }, this));
1568
+ };
1569
 
1570
  /**
1571
+ * Gets unified pointer coordinates from event.
1572
+ * @todo #261
1573
  * @protected
1574
+ * @param {Event} - The `mousedown` or `touchstart` event.
1575
+ * @returns {Object} - Contains `x` and `y` coordinates of current pointer position.
1576
  */
1577
+ Owl.prototype.pointer = function(event) {
1578
+ var result = { x: null, y: null };
1579
 
1580
+ event = event.originalEvent || event || window.event;
 
1581
 
1582
+ event = event.touches && event.touches.length ?
1583
+ event.touches[0] : event.changedTouches && event.changedTouches.length ?
1584
+ event.changedTouches[0] : event;
1585
 
1586
+ if (event.pageX) {
1587
+ result.x = event.pageX;
1588
+ result.y = event.pageY;
1589
+ } else {
1590
+ result.x = event.clientX;
1591
+ result.y = event.clientY;
1592
  }
1593
 
1594
+ return result;
1595
  };
1596
 
1597
  /**
1598
+ * Gets the difference of two vectors.
1599
+ * @todo #261
1600
+ * @protected
1601
+ * @param {Object} - The first vector.
1602
+ * @param {Object} - The second vector.
1603
+ * @returns {Object} - The difference.
1604
+ */
1605
+ Owl.prototype.difference = function(first, second) {
1606
+ return {
1607
+ x: first.x - second.x,
1608
+ y: first.y - second.y
1609
+ };
1610
+ };
1611
 
1612
+ /**
1613
+ * The jQuery Plugin for the Owl Carousel
1614
+ * @todo Navigation plugin `next` and `prev`
1615
+ * @public
1616
+ */
1617
+ $.fn.owlCarousel = function(option) {
1618
+ var args = Array.prototype.slice.call(arguments, 1);
1619
 
1620
+ return this.each(function() {
1621
+ var $this = $(this),
1622
+ data = $this.data('owl.carousel');
1623
+
1624
+ if (!data) {
1625
+ data = new Owl(this, typeof option == 'object' && option);
1626
+ $this.data('owl.carousel', data);
1627
+
1628
+ $.each([
1629
+ 'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove'
1630
+ ], function(i, event) {
1631
+ data.register({ type: Owl.Type.Event, name: event });
1632
+ data.$element.on(event + '.owl.carousel.core', $.proxy(function(e) {
1633
+ if (e.namespace && e.relatedTarget !== this) {
1634
+ this.suppress([ event ]);
1635
+ data[event].apply(this, [].slice.call(arguments, 1));
1636
+ this.release([ event ]);
1637
+ }
1638
+ }, data));
1639
+ });
1640
  }
1641
 
1642
+ if (typeof option == 'string' && option.charAt(0) !== '_') {
1643
+ data[option].apply(data, args);
 
 
 
1644
  }
1645
+ });
1646
+ };
1647
 
1648
  /**
1649
+ * The constructor for the jQuery Plugin
1650
+ * @public
 
 
1651
  */
1652
+ $.fn.owlCarousel.Constructor = Owl;
 
 
 
 
 
 
 
 
 
 
1653
 
1654
+ })(window.Zepto || window.jQuery, window, document);
 
 
 
 
 
 
 
 
1655
 
1656
+ /**
1657
+ * AutoRefresh Plugin
1658
+ * @version 2.0.0
1659
+ * @author Artus Kolanowski
1660
+ * @license The MIT License (MIT)
1661
+ */
1662
+ ;(function($, window, document, undefined) {
 
1663
 
1664
  /**
1665
+ * Creates the auto refresh plugin.
1666
+ * @class The Auto Refresh Plugin
1667
+ * @param {Owl} carousel - The Owl Carousel
1668
  */
1669
+ var AutoRefresh = function(carousel) {
1670
+ /**
1671
+ * Reference to the core.
1672
+ * @protected
1673
+ * @type {Owl}
1674
+ */
1675
+ this._core = carousel;
1676
+
1677
+ /**
1678
+ * Refresh interval.
1679
+ * @protected
1680
+ * @type {number}
1681
+ */
1682
+ this._interval = null;
1683
+
1684
+ /**
1685
+ * Whether the element is currently visible or not.
1686
+ * @protected
1687
+ * @type {Boolean}
1688
+ */
1689
+ this._visible = null;
1690
+
1691
+ /**
1692
+ * All event handlers.
1693
+ * @protected
1694
+ * @type {Object}
1695
+ */
1696
+ this._handlers = {
1697
+ 'initialized.owl.carousel': $.proxy(function(e) {
1698
+ if (e.namespace && this._core.settings.autoRefresh) {
1699
+ this.watch();
1700
+ }
1701
+ }, this)
1702
+ };
1703
+
1704
+ // set default options
1705
+ this._core.options = $.extend({}, AutoRefresh.Defaults, this._core.options);
1706
+
1707
+ // register event handlers
1708
+ this._core.$element.on(this._handlers);
1709
+ };
1710
 
1711
  /**
1712
+ * Default options.
1713
+ * @public
 
1714
  */
1715
+ AutoRefresh.Defaults = {
1716
+ autoRefresh: true,
1717
+ autoRefreshInterval: 500
1718
+ };
1719
 
1720
  /**
1721
+ * Watches the element.
 
 
1722
  */
1723
+ AutoRefresh.prototype.watch = function() {
1724
+ if (this._interval) {
1725
+ return;
1726
+ }
1727
+
1728
+ this._visible = this._core.$element.is(':visible');
1729
+ this._interval = window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval);
1730
+ };
1731
 
1732
  /**
1733
+ * Refreshes the element.
 
1734
  */
1735
+ AutoRefresh.prototype.refresh = function() {
1736
+ if (this._core.$element.is(':visible') === this._visible) {
1737
+ return;
1738
+ }
1739
+
1740
+ this._visible = !this._visible;
1741
+
1742
+ this._core.$element.toggleClass('owl-hidden', !this._visible);
1743
+
1744
+ this._visible && (this._core.invalidate('width') && this._core.refresh());
1745
  };
1746
 
1747
  /**
1748
+ * Destroys the plugin.
 
1749
  */
1750
+ AutoRefresh.prototype.destroy = function() {
1751
+ var handler, property;
1752
+
1753
+ window.clearInterval(this._interval);
1754
+
1755
+ for (handler in this._handlers) {
1756
+ this._core.$element.off(handler, this._handlers[handler]);
1757
+ }
1758
+ for (property in Object.getOwnPropertyNames(this)) {
1759
+ typeof this[property] != 'function' && (this[property] = null);
1760
+ }
1761
+ };
1762
+
1763
+ $.fn.owlCarousel.Constructor.Plugins.AutoRefresh = AutoRefresh;
1764
 
1765
  })(window.Zepto || window.jQuery, window, document);
1766
 
1818
 
1819
  while (i++ < n) {
1820
  this.load(clones / 2 + this._core.relative(position));
1821
+ clones && $.each(this._core.clones(this._core.relative(position)), load);
1822
+ position++;
1823
  }
1824
  }
1825
  }, this)
1893
  for (property in Object.getOwnPropertyNames(this)) {
1894
  typeof this[property] != 'function' && (this[property] = null);
1895
  }
1896
+ };
1897
 
1898
  $.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy;
1899
 
1926
  * @type {Object}
1927
  */
1928
  this._handlers = {
1929
+ 'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e) {
1930
+ if (e.namespace && this._core.settings.autoHeight) {
1931
  this.update();
1932
  }
1933
  }, this),
1934
  'changed.owl.carousel': $.proxy(function(e) {
1935
+ if (e.namespace && this._core.settings.autoHeight && e.property.name == 'position'){
1936
  this.update();
1937
  }
1938
  }, this),
1939
  'loaded.owl.lazy': $.proxy(function(e) {
1940
+ if (e.namespace && this._core.settings.autoHeight
1941
+ && e.element.closest('.' + this._core.settings.itemClass).index() === this._core.current()) {
1942
  this.update();
1943
  }
1944
  }, this)
1964
  * Updates the view.
1965
  */
1966
  AutoHeight.prototype.update = function() {
1967
+ var start = this._core._current,
1968
+ end = start + this._core.settings.items,
1969
+ visible = this._core.$stage.children().toArray().slice(start, end);
1970
+ heights = [],
1971
+ maxheight = 0;
1972
+
1973
+ $.each(visible, function(index, item) {
1974
+ heights.push($(item).height());
1975
+ });
1976
+
1977
+ maxheight = Math.max.apply(null, heights);
1978
+
1979
  this._core.$stage.parent()
1980
+ .height(maxheight)
1981
  .addClass(this._core.settings.autoHeightClass);
1982
  };
1983
 
2031
  */
2032
  this._playing = null;
2033
 
 
 
 
 
 
 
 
2034
  /**
2035
  * All event handlers.
2036
+ * @todo The cloned content removale is too late
2037
  * @protected
2038
  * @type {Object}
2039
  */
2040
  this._handlers = {
2041
+ 'initialized.owl.carousel': $.proxy(function(e) {
2042
+ if (e.namespace) {
2043
+ this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] });
2044
+ }
2045
+ }, this),
2046
  'resize.owl.carousel': $.proxy(function(e) {
2047
+ if (e.namespace && this._core.settings.video && this.isInFullScreen()) {
2048
  e.preventDefault();
2049
  }
2050
  }, this),
2051
+ 'refreshed.owl.carousel': $.proxy(function(e) {
2052
+ if (e.namespace && this._core.is('resizing')) {
2053
+ this._core.$stage.find('.cloned .owl-video-frame').remove();
2054
+ }
2055
+ }, this),
2056
+ 'changed.owl.carousel': $.proxy(function(e) {
2057
+ if (e.namespace && e.property.name === 'position' && this._playing) {
2058
  this.stop();
2059
  }
2060
  }, this),
2061
  'prepared.owl.carousel': $.proxy(function(e) {
2062
+ if (!e.namespace) {
2063
+ return;
2064
+ }
2065
+
2066
  var $element = $(e.content).find('.owl-video');
2067
+
2068
  if ($element.length) {
2069
  $element.css('display', 'none');
2070
  this.fetch($element, $(e.content));
2100
  * @param {jQuery} item - The item containing the video.
2101
  */
2102
  Video.prototype.fetch = function(target, item) {
 
2103
  var type = target.attr('data-vimeo-id') ? 'vimeo' : 'youtube',
2104
  id = target.attr('data-vimeo-id') || target.attr('data-youtube-id'),
2105
  width = target.attr('data-width') || this._core.settings.videoWidth,
2141
  * @see `fetch`
2142
  */
2143
  Video.prototype.thumbnail = function(target, video) {
 
2144
  var tnLink,
2145
  icon,
2146
  path,
2202
  this._playing.find('.owl-video-frame').remove();
2203
  this._playing.removeClass('owl-video-playing');
2204
  this._playing = null;
2205
+ this._core.leave('playing');
2206
+ this._core.trigger('stopped', null, 'video');
2207
  };
2208
 
2209
  /**
2210
  * Starts the current video.
2211
  * @public
2212
+ * @param {Event} event - The event arguments.
2213
  */
2214
+ Video.prototype.play = function(event) {
2215
+ var target = $(event.target),
 
 
 
 
 
 
2216
  item = target.closest('.' + this._core.settings.itemClass),
2217
  video = this._videos[item.attr('data-video')],
2218
  width = video.width || '100%',
2219
  height = video.height || this._core.$stage.height(),
2220
+ html;
2221
+
2222
+ if (this._playing) {
2223
+ return;
2224
+ }
2225
+
2226
+ this._core.enter('playing');
2227
+ this._core.trigger('play', null, 'video');
2228
+
2229
+ item = this._core.items(this._core.relative(item.index()));
2230
+
2231
+ this._core.reset(item.index());
2232
 
2233
  if (video.type === 'youtube') {
2234
+ html = '<iframe width="' + width + '" height="' + height + '" src="http://www.youtube.com/embed/' +
2235
+ video.id + '?autoplay=1&v=' + video.id + '" frameborder="0" allowfullscreen></iframe>';
2236
  } else if (video.type === 'vimeo') {
2237
+ html = '<iframe src="http://player.vimeo.com/video/' + video.id +
2238
+ '?autoplay=1" width="' + width + '" height="' + height +
2239
+ '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
2240
  }
2241
 
2242
+ $('<div class="owl-video-frame">' + html + '</div>').insertAfter(item.find('.owl-video'));
 
2243
 
2244
+ this._playing = item.addClass('owl-video-playing');
 
 
2245
  };
2246
 
2247
  /**
2251
  * @returns {Boolean}
2252
  */
2253
  Video.prototype.isInFullScreen = function() {
2254
+ var element = document.fullscreenElement || document.mozFullScreenElement ||
2255
+ document.webkitFullscreenElement;
2256
 
2257
+ return element && $(element).parent().hasClass('owl-video-frame');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2258
  };
2259
 
2260
  /**
2299
 
2300
  this.handlers = {
2301
  'change.owl.carousel': $.proxy(function(e) {
2302
+ if (e.namespace && e.property.name == 'position') {
2303
  this.previous = this.core.current();
2304
  this.next = e.property.value;
2305
  }
2306
  }, this),
2307
  'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) {
2308
+ if (e.namespace) {
2309
+ this.swapping = e.type == 'translated';
2310
+ }
2311
  }, this),
2312
  'translate.owl.carousel': $.proxy(function(e) {
2313
+ if (e.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) {
2314
  this.swap();
2315
  }
2316
  }, this)
2335
  */
2336
  Animate.prototype.swap = function() {
2337
 
2338
+ if (this.core.settings.items !== 1) {
2339
+ return;
2340
+ }
2341
+
2342
+ if (!$.support.animation || !$.support.transition) {
2343
  return;
2344
  }
2345
 
2358
 
2359
  if (outgoing) {
2360
  left = this.core.coordinates(this.previous) - this.core.coordinates(this.next);
2361
+ previous.one($.support.animation.end, clear)
2362
+ .css( { 'left': left + 'px' } )
2363
  .addClass('animated owl-animated-out')
2364
+ .addClass(outgoing);
 
2365
  }
2366
 
2367
  if (incoming) {
2368
+ next.one($.support.animation.end, clear)
2369
+ .addClass('animated owl-animated-in')
2370
+ .addClass(incoming);
2371
  }
2372
  };
2373
 
2376
  .removeClass('animated owl-animated-out owl-animated-in')
2377
  .removeClass(this.core.settings.animateIn)
2378
  .removeClass(this.core.settings.animateOut);
2379
+ this.core.onTransitionEnd();
2380
+ };
2381
 
2382
  /**
2383
  * Destroys the plugin.
2402
  * Autoplay Plugin
2403
  * @version 2.0.0
2404
  * @author Bartosz Wojciechowski
2405
+ * @author Artus Kolanowski
2406
  * @license The MIT License (MIT)
2407
  */
2408
  ;(function($, window, document, undefined) {
2412
  * @class The Autoplay Plugin
2413
  * @param {Owl} scope - The Owl Carousel
2414
  */
2415
+ var Autoplay = function(carousel) {
2416
+ /**
2417
+ * Reference to the core.
2418
+ * @protected
2419
+ * @type {Owl}
2420
+ */
2421
+ this._core = carousel;
2422
 
2423
+ /**
2424
+ * The autoplay interval.
2425
+ * @type {Number}
2426
+ */
2427
+ this._interval = null;
2428
+
2429
+ /**
2430
+ * Indicates whenever the autoplay is paused.
2431
+ * @type {Boolean}
2432
+ */
2433
+ this._paused = false;
2434
+
2435
+ /**
2436
+ * All event handlers.
2437
+ * @protected
2438
+ * @type {Object}
2439
+ */
2440
+ this._handlers = {
2441
+ 'changed.owl.carousel': $.proxy(function(e) {
2442
+ if (e.namespace && e.property.name === 'settings') {
2443
+ if (this._core.settings.autoplay) {
2444
+ this.play();
2445
+ } else {
2446
+ this.stop();
2447
+ }
2448
+ }
2449
+ }, this),
2450
+ 'initialized.owl.carousel': $.proxy(function(e) {
2451
+ if (e.namespace && this._core.settings.autoplay) {
2452
+ this.play();
2453
+ }
2454
  }, this),
2455
  'play.owl.autoplay': $.proxy(function(e, t, s) {
2456
+ if (e.namespace) {
2457
+ this.play(t, s);
2458
+ }
2459
  }, this),
2460
+ 'stop.owl.autoplay': $.proxy(function(e) {
2461
+ if (e.namespace) {
2462
+ this.stop();
2463
+ }
2464
  }, this),
2465
  'mouseover.owl.autoplay': $.proxy(function() {
2466
+ if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {
2467
  this.pause();
2468
  }
2469
  }, this),
2470
  'mouseleave.owl.autoplay': $.proxy(function() {
2471
+ if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {
2472
+ this.play();
2473
  }
2474
  }, this)
2475
  };
2476
 
2477
+ // register event handlers
2478
+ this._core.$element.on(this._handlers);
2479
+
2480
+ // set default options
2481
+ this._core.options = $.extend({}, Autoplay.Defaults, this._core.options);
2482
  };
2483
 
2484
  /**
2492
  autoplaySpeed: false
2493
  };
2494
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2495
  /**
2496
  * Starts the autoplay.
2497
  * @public
2498
+ * @param {Number} [timeout] - The interval before the next animation starts.
2499
+ * @param {Number} [speed] - The animation speed for the animations.
 
 
2500
  */
2501
  Autoplay.prototype.play = function(timeout, speed) {
2502
+ this._paused = false;
 
 
 
2503
 
2504
+ if (this._core.is('rotating')) {
 
2505
  return;
2506
  }
2507
 
2508
+ this._core.enter('rotating');
 
 
 
2509
 
2510
+ this._interval = window.setInterval($.proxy(function() {
2511
+ if (this._paused || this._core.is('busy') || this._core.is('interacting') || document.hidden) {
2512
+ return;
2513
+ }
2514
+ this._core.next(speed || this._core.settings.autoplaySpeed);
2515
+ }, this), timeout || this._core.settings.autoplayTimeout);
2516
  };
2517
 
2518
  /**
2520
  * @public
2521
  */
2522
  Autoplay.prototype.stop = function() {
2523
+ if (!this._core.is('rotating')) {
2524
+ return;
2525
+ }
2526
+
2527
+ window.clearInterval(this._interval);
2528
+ this._core.leave('rotating');
2529
  };
2530
 
2531
  /**
2532
+ * Stops the autoplay.
2533
  * @public
2534
  */
2535
  Autoplay.prototype.pause = function() {
2536
+ if (!this._core.is('rotating')) {
2537
+ return;
2538
+ }
2539
+
2540
+ this._paused = true;
2541
  };
2542
 
2543
  /**
2546
  Autoplay.prototype.destroy = function() {
2547
  var handler, property;
2548
 
2549
+ this.stop();
2550
 
2551
+ for (handler in this._handlers) {
2552
+ this._core.$element.off(handler, this._handlers[handler]);
2553
  }
2554
  for (property in Object.getOwnPropertyNames(this)) {
2555
  typeof this[property] != 'function' && (this[property] = null);
2634
  */
2635
  this._handlers = {
2636
  'prepared.owl.carousel': $.proxy(function(e) {
2637
+ if (e.namespace && this._core.settings.dotsData) {
2638
+ this._templates.push('<div class="' + this._core.settings.dotClass + '">' +
2639
+ $(e.content).find('[data-dot]').andSelf('[data-dot]').attr('data-dot') + '</div>');
2640
  }
2641
  }, this),
2642
+ 'added.owl.carousel': $.proxy(function(e) {
2643
+ if (e.namespace && this._core.settings.dotsData) {
2644
+ this._templates.splice(e.position, 0, this._templates.pop());
2645
  }
2646
  }, this),
2647
+ 'remove.owl.carousel': $.proxy(function(e) {
2648
+ if (e.namespace && this._core.settings.dotsData) {
2649
  this._templates.splice(e.position, 1);
2650
  }
2651
  }, this),
 
 
 
 
 
 
 
 
 
 
 
 
2652
  'changed.owl.carousel': $.proxy(function(e) {
2653
+ if (e.namespace && e.property.name == 'position') {
2654
  this.draw();
2655
  }
2656
  }, this),
2657
+ 'initialized.owl.carousel': $.proxy(function(e) {
2658
+ if (e.namespace && !this._initialized) {
2659
+ this._core.trigger('initialize', null, 'navigation');
2660
  this.initialize();
2661
+ this.update();
2662
+ this.draw();
2663
  this._initialized = true;
2664
+ this._core.trigger('initialized', null, 'navigation');
2665
+ }
2666
+ }, this),
2667
+ 'refreshed.owl.carousel': $.proxy(function(e) {
2668
+ if (e.namespace && this._initialized) {
2669
+ this._core.trigger('refresh', null, 'navigation');
2670
+ this.update();
2671
+ this.draw();
2672
+ this._core.trigger('refreshed', null, 'navigation');
2673
  }
 
 
 
 
2674
  }, this)
2675
  };
2676
 
2679
 
2680
  // register event handlers
2681
  this.$element.on(this._handlers);
2682
+ };
2683
 
2684
  /**
2685
  * Default options.
2688
  */
2689
  Navigation.Defaults = {
2690
  nav: false,
 
2691
  navText: [ 'prev', 'next' ],
2692
  navSpeed: false,
2693
  navElement: 'div',
2699
  dotsClass: 'owl-dots',
2700
  dots: true,
2701
  dotsEach: false,
2702
+ dotsData: false,
2703
  dotsSpeed: false,
2704
+ dotsContainer: false
2705
+ };
 
2706
 
2707
  /**
2708
  * Initializes the layout of the plugin and extends the carousel.
2709
  * @protected
2710
  */
2711
  Navigation.prototype.initialize = function() {
2712
+ var override,
2713
+ settings = this._core.settings;
2714
+
2715
+ // create DOM structure for relative navigation
2716
+ this._controls.$relative = (settings.navContainer ? $(settings.navContainer)
2717
+ : $('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');
2718
+
2719
+ this._controls.$previous = $('<' + settings.navElement + '>')
2720
+ .addClass(settings.navClass[0])
2721
+ .html(settings.navText[0])
2722
+ .prependTo(this._controls.$relative)
2723
+ .on('click', $.proxy(function(e) {
2724
+ this.prev(settings.navSpeed);
2725
+ }, this));
2726
+ this._controls.$next = $('<' + settings.navElement + '>')
2727
+ .addClass(settings.navClass[1])
2728
+ .html(settings.navText[1])
2729
+ .appendTo(this._controls.$relative)
2730
+ .on('click', $.proxy(function(e) {
2731
+ this.next(settings.navSpeed);
2732
+ }, this));
2733
 
2734
+ // create DOM structure for absolute navigation
2735
+ if (!settings.dotsData) {
2736
  this._templates = [ $('<div>')
2737
+ .addClass(settings.dotClass)
2738
  .append($('<span>'))
2739
  .prop('outerHTML') ];
2740
  }
2741
 
2742
+ this._controls.$absolute = (settings.dotsContainer ? $(settings.dotsContainer)
2743
+ : $('<div>').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled');
 
 
 
 
 
 
 
 
2744
 
2745
+ this._controls.$absolute.on('click', 'div', $.proxy(function(e) {
2746
+ var index = $(e.target).parent().is(this._controls.$absolute)
2747
  ? $(e.target).index() : $(e.target).parent().index();
2748
 
2749
  e.preventDefault();
2750
 
2751
+ this.to(index, settings.dotsSpeed);
2752
  }, this));
2753
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2754
  // override public methods of the carousel
2755
  for (override in this._overrides) {
2756
  this._core[override] = $.proxy(this[override], this);
2757
  }
2758
+ };
2759
 
2760
  /**
2761
  * Destroys the plugin.
2776
  for (property in Object.getOwnPropertyNames(this)) {
2777
  typeof this[property] != 'function' && (this[property] = null);
2778
  }
2779
+ };
2780
 
2781
  /**
2782
  * Updates the internal state.
2784
  */
2785
  Navigation.prototype.update = function() {
2786
  var i, j, k,
 
2787
  lower = this._core.clones().length / 2,
2788
  upper = lower + this._core.items().length,
2789
+ maximum = this._core.maximum(true),
2790
+ settings = this._core.settings,
2791
+ size = settings.center || settings.autoWidth || settings.dotsData
2792
+ ? 1 : settings.dotsEach || settings.items;
2793
 
2794
+ if (settings.slideBy !== 'page') {
2795
+ settings.slideBy = Math.min(settings.slideBy, settings.items);
2796
  }
2797
 
2798
+ if (settings.dots || settings.slideBy == 'page') {
2799
  this._pages = [];
2800
 
2801
  for (i = lower, j = 0, k = 0; i < upper; i++) {
2802
  if (j >= size || j === 0) {
2803
  this._pages.push({
2804
+ start: Math.min(maximum, i - lower),
2805
  end: i - lower + size - 1
2806
  });
2807
+ if (Math.min(maximum, i - lower) === maximum) {
2808
+ break;
2809
+ }
2810
  j = 0, ++k;
2811
  }
2812
  j += this._core.mergers(this._core.relative(i));
2813
  }
2814
  }
2815
+ };
2816
 
2817
  /**
2818
  * Draws the user interface.
2819
+ * @todo The option `dotsData` wont work.
2820
  * @protected
2821
  */
2822
  Navigation.prototype.draw = function() {
2823
+ var difference,
2824
+ settings = this._core.settings,
2825
+ disabled = this._core.items().length <= settings.items,
2826
+ index = this._core.relative(this._core.current()),
2827
+ loop = settings.loop || settings.rewind;
2828
 
2829
+ this._controls.$relative.toggleClass('disabled', !settings.nav || disabled);
2830
+
2831
+ if (settings.nav) {
2832
+ this._controls.$previous.toggleClass('disabled', !loop && index <= this._core.minimum(true));
2833
+ this._controls.$next.toggleClass('disabled', !loop && index >= this._core.maximum(true));
2834
  }
2835
 
2836
+ this._controls.$absolute.toggleClass('disabled', !settings.dots || disabled);
 
2837
 
2838
+ if (settings.dots) {
2839
+ difference = this._pages.length - this._controls.$absolute.children().length;
2840
 
2841
+ if (settings.dotsData && difference !== 0) {
2842
+ this._controls.$absolute.html(this._templates.join(''));
 
 
 
2843
  } else if (difference > 0) {
2844
+ this._controls.$absolute.append(new Array(difference + 1).join(this._templates[0]));
 
2845
  } else if (difference < 0) {
2846
+ this._controls.$absolute.children().slice(difference).remove();
2847
  }
2848
 
2849
+ this._controls.$absolute.find('.active').removeClass('active');
2850
+ this._controls.$absolute.children().eq($.inArray(this.current(), this._pages)).addClass('active');
2851
  }
2852
+ };
 
 
2853
 
2854
  /**
2855
  * Extends event data.
2862
  event.page = {
2863
  index: $.inArray(this.current(), this._pages),
2864
  count: this._pages.length,
2865
+ size: settings && (settings.center || settings.autoWidth || settings.dotsData
2866
  ? 1 : settings.dotsEach || settings.items)
2867
  };
2868
+ };
2869
 
2870
  /**
2871
  * Gets the current page position of the carousel.
2873
  * @returns {Number}
2874
  */
2875
  Navigation.prototype.current = function() {
2876
+ var current = this._core.relative(this._core.current());
2877
+ return $.grep(this._pages, $.proxy(function(page, index) {
2878
+ return page.start <= current && page.end >= current;
2879
+ }, this)).pop();
2880
+ };
2881
 
2882
  /**
2883
  * Gets the current succesor/predecessor position.
2886
  */
2887
  Navigation.prototype.getPosition = function(successor) {
2888
  var position, length,
2889
+ settings = this._core.settings;
2890
 
2891
+ if (settings.slideBy == 'page') {
2892
  position = $.inArray(this.current(), this._pages);
2893
  length = this._pages.length;
2894
  successor ? ++position : --position;
2896
  } else {
2897
  position = this._core.relative(this._core.current());
2898
  length = this._core.items().length;
2899
+ successor ? position += settings.slideBy : position -= settings.slideBy;
2900
  }
2901
+
2902
  return position;
2903
+ };
2904
 
2905
  /**
2906
  * Slides to the next item or page.
2909
  */
2910
  Navigation.prototype.next = function(speed) {
2911
  $.proxy(this._overrides.to, this._core)(this.getPosition(true), speed);
2912
+ };
2913
 
2914
  /**
2915
  * Slides to the previous item or page.
2918
  */
2919
  Navigation.prototype.prev = function(speed) {
2920
  $.proxy(this._overrides.to, this._core)(this.getPosition(false), speed);
2921
+ };
2922
 
2923
  /**
2924
  * Slides to the specified item or page.
2936
  } else {
2937
  $.proxy(this._overrides.to, this._core)(position, speed);
2938
  }
2939
+ };
2940
 
2941
  $.fn.owlCarousel.Constructor.Plugins.Navigation = Navigation;
2942
 
2965
  this._core = carousel;
2966
 
2967
  /**
2968
+ * Hash index for the items.
2969
  * @protected
2970
  * @type {Object}
2971
  */
2983
  * @type {Object}
2984
  */
2985
  this._handlers = {
2986
+ 'initialized.owl.carousel': $.proxy(function(e) {
2987
+ if (e.namespace && this._core.settings.startPosition === 'URLHash') {
2988
  $(window).trigger('hashchange.owl.navigation');
2989
  }
2990
  }, this),
2991
  'prepared.owl.carousel': $.proxy(function(e) {
2992
+ if (e.namespace) {
2993
+ var hash = $(e.content).find('[data-hash]').andSelf('[data-hash]').attr('data-hash');
2994
+
2995
+ if (!hash) {
2996
+ return;
2997
+ }
2998
+
2999
+ this._hashes[hash] = e.content;
3000
+ }
3001
+ }, this),
3002
+ 'changed.owl.carousel': $.proxy(function(e) {
3003
+ if (e.namespace && e.property.name === 'position') {
3004
+ var current = this._core.items(this._core.relative(this._core.current())),
3005
+ hash = $.map(this._hashes, function(item, hash) {
3006
+ return item === current ? hash : null;
3007
+ }).join();
3008
+
3009
+ if (!hash || window.location.hash.slice(1) === hash) {
3010
+ return;
3011
+ }
3012
+
3013
+ window.location.hash = hash;
3014
+ }
3015
  }, this)
3016
  };
3017
 
3022
  this.$element.on(this._handlers);
3023
 
3024
  // register event listener for hash navigation
3025
+ $(window).on('hashchange.owl.navigation', $.proxy(function(e) {
3026
  var hash = window.location.hash.substring(1),
3027
  items = this._core.$stage.children(),
3028
+ position = this._hashes[hash] && items.index(this._hashes[hash]);
3029
 
3030
+ if (position === undefined || position === this._core.current()) {
3031
+ return;
3032
  }
3033
 
3034
+ this._core.to(this._core.relative(position), false, true);
3035
  }, this));
3036
+ };
3037
 
3038
  /**
3039
  * Default options.
3041
  */
3042
  Hash.Defaults = {
3043
  URLhashListener: false
3044
+ };
3045
 
3046
  /**
3047
  * Destroys the plugin.
3058
  for (property in Object.getOwnPropertyNames(this)) {
3059
  typeof this[property] != 'function' && (this[property] = null);
3060
  }
3061
+ };
3062
 
3063
  $.fn.owlCarousel.Constructor.Plugins.Hash = Hash;
3064
 
3065
  })(window.Zepto || window.jQuery, window, document);
3066
+
3067
+ /**
3068
+ * Support Plugin
3069
+ *
3070
+ * @version 2.0.0
3071
+ * @author Vivid Planet Software GmbH
3072
+ * @author Artus Kolanowski
3073
+ * @license The MIT License (MIT)
3074
+ */
3075
+ ;(function($, window, document, undefined) {
3076
+
3077
+ var style = $('<support>').get(0).style,
3078
+ prefixes = 'Webkit Moz O ms'.split(' '),
3079
+ events = {
3080
+ transition: {
3081
+ end: {
3082
+ WebkitTransition: 'webkitTransitionEnd',
3083
+ MozTransition: 'transitionend',
3084
+ OTransition: 'oTransitionEnd',
3085
+ transition: 'transitionend'
3086
+ }
3087
+ },
3088
+ animation: {
3089
+ end: {
3090
+ WebkitAnimation: 'webkitAnimationEnd',
3091
+ MozAnimation: 'animationend',
3092
+ OAnimation: 'oAnimationEnd',
3093
+ animation: 'animationend'
3094
+ }
3095
+ }
3096
+ },
3097
+ tests = {
3098
+ csstransforms: function() {
3099
+ return !!test('transform');
3100
+ },
3101
+ csstransforms3d: function() {
3102
+ return !!test('perspective');
3103
+ },
3104
+ csstransitions: function() {
3105
+ return !!test('transition');
3106
+ },
3107
+ cssanimations: function() {
3108
+ return !!test('animation');
3109
+ }
3110
+ };
3111
+
3112
+ function test(property, prefixed) {
3113
+ var result = false,
3114
+ upper = property.charAt(0).toUpperCase() + property.slice(1);
3115
+
3116
+ $.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property) {
3117
+ if (style[property] !== undefined) {
3118
+ result = prefixed ? property : true;
3119
+ return false;
3120
+ }
3121
+ });
3122
+
3123
+ return result;
3124
+ }
3125
+
3126
+ function prefixed(property) {
3127
+ return test(property, true);
3128
+ }
3129
+
3130
+ if (tests.csstransitions()) {
3131
+ /* jshint -W053 */
3132
+ $.support.transition = new String(prefixed('transition'))
3133
+ $.support.transition.end = events.transition.end[ $.support.transition ];
3134
+ }
3135
+
3136
+ if (tests.cssanimations()) {
3137
+ /* jshint -W053 */
3138
+ $.support.animation = new String(prefixed('animation'))
3139
+ $.support.animation.end = events.animation.end[ $.support.animation ];
3140
+ }
3141
+
3142
+ if (tests.csstransforms()) {
3143
+ /* jshint -W053 */
3144
+ $.support.transform = new String(prefixed('transform'));
3145
+ $.support.transform3d = tests.csstransforms3d();
3146
+ }
3147
+
3148
+ })(window.Zepto || window.jQuery, window, document);
includes/vendors/owlcarousel/owl.carousel.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ !function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g--;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var b,c,e;b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&0>=e&&this.preloadAutoWidthImages(b)}this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this.$element.is(":visible")?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){b>=a&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),(null===this.settings||this._breakpoint!==d)&&(this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}}))},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};c>b;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.$element.is(":visible")?(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized"))):!1:!1},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),this.settings.responsive!==!1&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.coordinates(this.settings.rtl?this.maximum():this.minimum()),c=this.coordinates(this.settings.rtl?this.minimum():this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var d=-1,e=30,f=this.width(),g=this.coordinates();return this.settings.freeDrag||a.each(g,a.proxy(function(a,h){return b>h-e&&h+e>b?d=a:this.op(b,"<",h)&&this.op(b,">",g[a+1]||h-f)&&(d="left"===c?a+1:a),-1===d},this)),this.settings.loop||(this.op(b,">",g[this.minimum()])?d=b=this.minimum():this.op(b,"<",g[this.maximum()])&&(d=b=this.maximum())),d},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(b,c){var e=this._items.length,f=c?0:this._clones.length;return!a.isNumeric(b)||1>e?b=d:(0>b||b>=e+f)&&(b=((b-f/2)%e+e)%e+f/2),b},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c=this.settings,d=this._coordinates.length,e=Math.abs(this._coordinates[d-1])-this._width,f=-1;if(c.loop)d=this._clones.length/2+this._items.length-1;else if(c.autoWidth||c.merge)for(;d-f>1;)Math.abs(this._coordinates[b=d+f>>1])<e?f=b:d=b;else d=c.center?this._items.length-1:this._items.length-c.items;return a&&(d-=this._clones.length/2),Math.max(d,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c=null;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[b-1]||0))/2*(this.settings.rtl?-1:1)):c=this._coordinates[b-1]||0,c)},e.prototype.duration=function(a,b,c){return Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(0>e),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,d=((a-h)%g+g)%g+h,d!==a&&i>=d-e&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.$element.is(":visible")&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){return a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))?!1:(this.leave("animating"),void this.trigger("translated"))},e.prototype.viewport=function(){var d;if(this.options.responsiveBaseElement!==b)d=a(this.options.responsiveBaseElement).width();else if(b.innerWidth)d=b.innerWidth;else{if(!c.documentElement||!c.documentElement.clientWidth)throw"Can not detect viewport width.";d=c.documentElement.clientWidth}return d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)},this)),this.reset(a.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),this.settings.responsive!==!1&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:c>a;case">":return d?c>a:a>c;case">=":return d?c>=a:a>=c;case"<=":return d?a>=c:c>=a}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.$element.is(":visible")!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,d=c.center&&Math.ceil(c.items/2)||c.items,e=c.center&&-1*d||0,f=(b.property&&b.property.value||this._core.current())+e,g=this._core.clones().length,h=a.proxy(function(a,b){this.load(b)},this);e++<d;)this.load(g/2+this._core.relative(f)),g&&a.each(this._core.clones(this._core.relative(f)),h),f++},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":"url("+g+")",opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.$stage.children().toArray().slice(b,c);heights=[],maxheight=0,a.each(d,function(b,c){heights.push(a(c).height())}),maxheight=Math.max.apply(null,heights),this._core.$stage.parent().height(maxheight).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=a.attr("data-vimeo-id")?"vimeo":"youtube",d=a.attr("data-vimeo-id")||a.attr("data-youtube-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else{if(!(d[3].indexOf("vimeo")>-1))throw new Error("Video URL not supported.");c="vimeo"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};return b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(l(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(f="http://img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type&&a.ajax({type:"GET",url:"http://vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}))},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),"youtube"===f.type?c='<iframe width="'+g+'" height="'+h+'" src="http://www.youtube.com/embed/'+f.id+"?autoplay=1&v="+f.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===f.type&&(c='<iframe src="http://player.vimeo.com/video/'+f.id+'?autoplay=1" width="'+g+'" height="'+h+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),a('<div class="owl-video-frame">'+c+"</div>").insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._paused=!1,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name&&(this._core.settings.autoplay?this.play():this.stop())},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){
2
+ this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype.play=function(d,e){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._interval=b.setInterval(a.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||c.hidden||this._core.next(e||this._core.settings.autoplaySpeed)},this),d||this._core.settings.autoplayTimeout))},e.prototype.stop=function(){this._core.is("rotating")&&(b.clearInterval(this._interval),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a("<div>").addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;e>a;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):0>b&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;d?a.proxy(this._overrides.to,this._core)(b,c):(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c))},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){return g[b]!==d?(e=c?b:!0,!1):void 0}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);
readme.txt CHANGED
@@ -46,6 +46,19 @@ Insert a gallery through your dashboard. You will see extra dropdown settings wh
46
 
47
  == Changelog ==
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  = Version 1.40 =
50
 
51
  * Updated images loaded library to 3.1.8
46
 
47
  == Changelog ==
48
 
49
+ = Version 1.43 =
50
+
51
+ * Masonry gallery items now loads in series when each image is loaded
52
+ * Removed text from nav buttons in owl carousel.
53
+ * Moved flexslider and owl carousel to vendors folder
54
+ * Wait for images to load before calling flexslider.
55
+
56
+ = Version 1.41 =
57
+
58
+ * Updated Owl Carousel
59
+ * Updated Flexslider
60
+ * Fixed bug with bottom image links not responding correctly on mobile devices
61
+
62
  = Version 1.40 =
63
 
64
  * Updated images loaded library to 3.1.8
wc-gallery.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://wordpresscanvas.com/features/gallery/
5
  Description: Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
- Version: 1.40
9
  License: GPLv2 or later
10
  */
11
 
@@ -13,7 +13,7 @@ function wc_gallery_using_woocommerce() {
13
  return in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
14
  }
15
 
16
- define( 'WC_GALLERY_VERSION', '1.40' );
17
  define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
18
  define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
19
  define( 'WC_GALLERY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
5
  Description: Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
+ Version: 1.43
9
  License: GPLv2 or later
10
  */
11
 
13
  return in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
14
  }
15
 
16
+ define( 'WC_GALLERY_VERSION', '1.43' );
17
  define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
18
  define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
19
  define( 'WC_GALLERY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );