Galleries by Angie Makes - Version 1.34

Version Description

Download this release

Release Info

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

Code changes from version 1.29 to 1.34

README.md CHANGED
@@ -46,6 +46,17 @@ Insert a gallery through your dashboard. You will see extra dropdown settings wh
46
 
47
  ## Changelog ##
48
 
 
 
 
 
 
 
 
 
 
 
 
49
  ### Version 1.29
50
 
51
  * Added Image size identifier for easy reference
46
 
47
  ## Changelog ##
48
 
49
+ ### Version 1.30
50
+
51
+ * Fixed bug with captions displaying when there are not any
52
+ * Updated magnific popup gallery
53
+ * Fixed bug with update in settings framework
54
+ * Code clean up
55
+ * Updated owl carousel
56
+ * Rearranged gallery options
57
+ * enabled smooth height
58
+ * Updated flexslider library
59
+
60
  ### Version 1.29
61
 
62
  * Added Image size identifier for easy reference
includes/css/magnific-popup.css CHANGED
@@ -83,7 +83,7 @@
83
  display: none !important; }
84
 
85
  .mfp-preloader {
86
- color: #cccccc;
87
  position: absolute;
88
  top: 50%;
89
  width: auto;
@@ -93,9 +93,9 @@
93
  right: 8px;
94
  z-index: 1044; }
95
  .mfp-preloader a {
96
- color: #cccccc; }
97
  .mfp-preloader a:hover {
98
- color: white; }
99
 
100
  .mfp-s-ready .mfp-preloader {
101
  display: none; }
@@ -131,7 +131,7 @@ button::-moz-focus-inner {
131
  opacity: 0.65;
132
  filter: alpha(opacity=65);
133
  padding: 0 0 18px 10px;
134
- color: white;
135
  font-style: normal;
136
  font-size: 28px;
137
  font-family: Arial, Baskerville, monospace; }
@@ -142,10 +142,10 @@ button::-moz-focus-inner {
142
  top: 1px; }
143
 
144
  .mfp-close-btn-in .mfp-close {
145
- color: #333333; }
146
 
147
  .mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close {
148
- color: white;
149
  right: -6px;
150
  text-align: right;
151
  padding-right: 6px;
@@ -155,7 +155,7 @@ button::-moz-focus-inner {
155
  position: absolute;
156
  top: 0;
157
  right: 0;
158
- color: #cccccc;
159
  font-size: 12px;
160
  line-height: 18px;
161
  white-space: nowrap; }
@@ -199,19 +199,19 @@ button::-moz-focus-inner {
199
  .mfp-arrow-left {
200
  left: 0; }
201
  .mfp-arrow-left:after, .mfp-arrow-left .mfp-a {
202
- border-right: 17px solid white;
203
  margin-left: 31px; }
204
  .mfp-arrow-left:before, .mfp-arrow-left .mfp-b {
205
  margin-left: 25px;
206
- border-right: 27px solid #3f3f3f; }
207
 
208
  .mfp-arrow-right {
209
  right: 0; }
210
  .mfp-arrow-right:after, .mfp-arrow-right .mfp-a {
211
- border-left: 17px solid white;
212
  margin-left: 39px; }
213
  .mfp-arrow-right:before, .mfp-arrow-right .mfp-b {
214
- border-left: 27px solid #3f3f3f; }
215
 
216
  .mfp-iframe-holder {
217
  padding-top: 40px;
@@ -236,7 +236,7 @@ button::-moz-focus-inner {
236
  width: 100%;
237
  height: 100%;
238
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
239
- background: black; }
240
 
241
  /* Main image in popup */
242
  img.mfp-img {
@@ -266,9 +266,9 @@ img.mfp-img {
266
  height: auto;
267
  z-index: -1;
268
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
269
- background: #444444; }
270
  .mfp-figure small {
271
- color: #bdbdbd;
272
  display: block;
273
  font-size: 12px;
274
  line-height: 14px; }
@@ -286,7 +286,7 @@ img.mfp-img {
286
  .mfp-title {
287
  text-align: left;
288
  line-height: 18px;
289
- color: #f3f3f3;
290
  word-wrap: break-word;
291
  padding-right: 36px; }
292
 
@@ -335,21 +335,26 @@ img.mfp-img {
335
  background: rgba(0, 0, 0, 0.6);
336
  position: fixed;
337
  text-align: center;
338
- padding: 0; } }
 
339
 
340
  @media all and (max-width: 900px) {
341
  .mfp-arrow {
342
  -webkit-transform: scale(0.75);
343
  transform: scale(0.75); }
 
344
  .mfp-arrow-left {
345
  -webkit-transform-origin: 0;
346
  transform-origin: 0; }
 
347
  .mfp-arrow-right {
348
  -webkit-transform-origin: 100%;
349
  transform-origin: 100%; }
 
350
  .mfp-container {
351
  padding-left: 6px;
352
- padding-right: 6px; } }
 
353
 
354
  .mfp-ie7 .mfp-img {
355
  padding: 0; }
83
  display: none !important; }
84
 
85
  .mfp-preloader {
86
+ color: #CCC;
87
  position: absolute;
88
  top: 50%;
89
  width: auto;
93
  right: 8px;
94
  z-index: 1044; }
95
  .mfp-preloader a {
96
+ color: #CCC; }
97
  .mfp-preloader a:hover {
98
+ color: #FFF; }
99
 
100
  .mfp-s-ready .mfp-preloader {
101
  display: none; }
131
  opacity: 0.65;
132
  filter: alpha(opacity=65);
133
  padding: 0 0 18px 10px;
134
+ color: #FFF;
135
  font-style: normal;
136
  font-size: 28px;
137
  font-family: Arial, Baskerville, monospace; }
142
  top: 1px; }
143
 
144
  .mfp-close-btn-in .mfp-close {
145
+ color: #333; }
146
 
147
  .mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close {
148
+ color: #FFF;
149
  right: -6px;
150
  text-align: right;
151
  padding-right: 6px;
155
  position: absolute;
156
  top: 0;
157
  right: 0;
158
+ color: #CCC;
159
  font-size: 12px;
160
  line-height: 18px;
161
  white-space: nowrap; }
199
  .mfp-arrow-left {
200
  left: 0; }
201
  .mfp-arrow-left:after, .mfp-arrow-left .mfp-a {
202
+ border-right: 17px solid #FFF;
203
  margin-left: 31px; }
204
  .mfp-arrow-left:before, .mfp-arrow-left .mfp-b {
205
  margin-left: 25px;
206
+ border-right: 27px solid #3F3F3F; }
207
 
208
  .mfp-arrow-right {
209
  right: 0; }
210
  .mfp-arrow-right:after, .mfp-arrow-right .mfp-a {
211
+ border-left: 17px solid #FFF;
212
  margin-left: 39px; }
213
  .mfp-arrow-right:before, .mfp-arrow-right .mfp-b {
214
+ border-left: 27px solid #3F3F3F; }
215
 
216
  .mfp-iframe-holder {
217
  padding-top: 40px;
236
  width: 100%;
237
  height: 100%;
238
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
239
+ background: #000; }
240
 
241
  /* Main image in popup */
242
  img.mfp-img {
266
  height: auto;
267
  z-index: -1;
268
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
269
+ background: #444; }
270
  .mfp-figure small {
271
+ color: #BDBDBD;
272
  display: block;
273
  font-size: 12px;
274
  line-height: 14px; }
286
  .mfp-title {
287
  text-align: left;
288
  line-height: 18px;
289
+ color: #F3F3F3;
290
  word-wrap: break-word;
291
  padding-right: 36px; }
292
 
335
  background: rgba(0, 0, 0, 0.6);
336
  position: fixed;
337
  text-align: center;
338
+ padding: 0; }
339
+ }
340
 
341
  @media all and (max-width: 900px) {
342
  .mfp-arrow {
343
  -webkit-transform: scale(0.75);
344
  transform: scale(0.75); }
345
+
346
  .mfp-arrow-left {
347
  -webkit-transform-origin: 0;
348
  transform-origin: 0; }
349
+
350
  .mfp-arrow-right {
351
  -webkit-transform-origin: 100%;
352
  transform-origin: 100%; }
353
+
354
  .mfp-container {
355
  padding-left: 6px;
356
+ padding-right: 6px; }
357
+ }
358
 
359
  .mfp-ie7 .mfp-img {
360
  padding: 0; }
includes/css/style.css CHANGED
@@ -14,6 +14,7 @@
14
  margin-bottom: 0px;
15
  margin-left: 0px;
16
  margin-right: 0px;
 
17
  }
18
  .wc-gallery .gallery.gallery-masonry {
19
  visibility: hidden;
14
  margin-bottom: 0px;
15
  margin-left: 0px;
16
  margin-right: 0px;
17
+ overflow: hidden;
18
  }
19
  .wc-gallery .gallery.gallery-masonry {
20
  visibility: hidden;
includes/functions.php CHANGED
@@ -206,54 +206,56 @@ function wc_gallery_shortcode($blank, $attr) {
206
  $output .= "</ul></div>\n";
207
  // End of Flex Slider
208
 
209
- // Begin Links
210
- $size = 'wccarousel';
211
- $size_class = sanitize_html_class( $size );
 
212
 
213
- $class = array();
214
- $class[] = 'wc-image-links';
215
- $class[] = 'wc-gallery-clear';
216
- $class[] = 'wc-image-links-' . str_replace( array( 'slider3', 'slider4' ), '', $display );
217
- $class[] = 'wc-image-links-' . $display;
218
- $class[] = 'wc-image-links-gutter-space-' . $gutterwidth;
219
-
220
- $output .= "<div class='".implode( ' ', $class )."'>";
221
 
222
- $i = 1;
223
- foreach ( $links as $key => $attachment ) {
224
- $id = $attachment->ID;
225
- $image_output = wc_gallery_get_attachment_link( $id, $size, false, false, false, $targetsize, true, $link_target );
226
 
227
- $image_meta = wp_get_attachment_metadata( $id );
 
 
 
228
 
229
- $orientation = '';
230
- if ( isset( $image_meta['height'], $image_meta['width'] ) )
231
- $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
232
 
233
- $output .= "<div class='gallery-item gallery-item-".$i." gallery-item-position-".$pos." gallery-item-attachment-".$id."'>";
234
- $output .= "<div class='gallery-block'>";
235
- $output .= "
236
- <div class='gallery-icon {$orientation}'>
237
- $image_output
238
- </div>";
239
- $caption_text = trim($attachment->post_excerpt);
240
 
241
- if ( ! empty( $caption_text ) ) {
 
242
  $output .= "
243
- <div class='wp-caption-text gallery-caption'>
244
- <h3>
245
- " . wptexturize($caption_text) . "
246
- </h3>
247
  </div>";
248
- }
 
 
 
 
 
 
 
 
 
 
249
  $output .= "</div>";
250
- $output .= "</div>";
251
- $i++;
252
- $pos++;
253
- }
254
 
255
- $output .= "</div>\n";
256
- // End of Links
 
257
 
258
  $output .= "</div>\n";
259
  }
@@ -481,15 +483,6 @@ function wc_gallery_print_media_templates() {
481
  );
482
  ?>
483
  <script type="text/html" id="tmpl-wc-gallery-settings">
484
- <label class="setting">
485
- <span><?php _e( 'Display', 'wc_gallery' ); ?></span>
486
- <select class="display" name="display" data-setting="display">
487
- <?php foreach ( $display_types as $key => $value ) : ?>
488
- <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, 'default' ); ?>><?php echo esc_html( $value ); ?></option>
489
- <?php endforeach; ?>
490
- </select>
491
- </label>
492
-
493
  <label class="setting">
494
  <span><?php _e( 'Popup Size', 'wc_gallery' ); ?></span>
495
  <select class="targetsize" name="targetsize" data-setting="targetsize">
@@ -508,6 +501,15 @@ function wc_gallery_print_media_templates() {
508
  </select>
509
  </label>
510
 
 
 
 
 
 
 
 
 
 
511
  <?php
512
  $captions = array(
513
  'onhover' => __( 'On Image Hover', 'wc_gallery' ),
206
  $output .= "</ul></div>\n";
207
  // End of Flex Slider
208
 
209
+ if ( ! empty( $links ) ) {
210
+ // Begin Links
211
+ $size = 'wccarousel';
212
+ $size_class = sanitize_html_class( $size );
213
 
214
+ $class = array();
215
+ $class[] = 'wc-image-links';
216
+ $class[] = 'wc-gallery-clear';
217
+ $class[] = 'wc-image-links-' . str_replace( array( 'slider3', 'slider4' ), '', $display );
218
+ $class[] = 'wc-image-links-' . $display;
219
+ $class[] = 'wc-image-links-gutter-space-' . $gutterwidth;
 
 
220
 
221
+ $output .= "<div class='".implode( ' ', $class )."'>";
 
 
 
222
 
223
+ $i = 1;
224
+ foreach ( $links as $key => $attachment ) {
225
+ $id = $attachment->ID;
226
+ $image_output = wc_gallery_get_attachment_link( $id, $size, false, false, false, $targetsize, true, $link_target );
227
 
228
+ $image_meta = wp_get_attachment_metadata( $id );
 
 
229
 
230
+ $orientation = '';
231
+ if ( isset( $image_meta['height'], $image_meta['width'] ) )
232
+ $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
 
 
 
 
233
 
234
+ $output .= "<div class='gallery-item gallery-item-".$i." gallery-item-position-".$pos." gallery-item-attachment-".$id."'>";
235
+ $output .= "<div class='gallery-block'>";
236
  $output .= "
237
+ <div class='gallery-icon {$orientation}'>
238
+ $image_output
 
 
239
  </div>";
240
+ $caption_text = trim($attachment->post_excerpt);
241
+
242
+ if ( ! empty( $caption_text ) ) {
243
+ $output .= "
244
+ <div class='wp-caption-text gallery-caption'>
245
+ <h3>
246
+ " . wptexturize($caption_text) . "
247
+ </h3>
248
+ </div>";
249
+ }
250
+ $output .= "</div>";
251
  $output .= "</div>";
252
+ $i++;
253
+ $pos++;
254
+ }
 
255
 
256
+ $output .= "</div>\n";
257
+ // End of Links
258
+ }
259
 
260
  $output .= "</div>\n";
261
  }
483
  );
484
  ?>
485
  <script type="text/html" id="tmpl-wc-gallery-settings">
 
 
 
 
 
 
 
 
 
486
  <label class="setting">
487
  <span><?php _e( 'Popup Size', 'wc_gallery' ); ?></span>
488
  <select class="targetsize" name="targetsize" data-setting="targetsize">
501
  </select>
502
  </label>
503
 
504
+ <label class="setting">
505
+ <span><?php _e( 'Display', 'wc_gallery' ); ?></span>
506
+ <select class="display" name="display" data-setting="display">
507
+ <?php foreach ( $display_types as $key => $value ) : ?>
508
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, 'default' ); ?>><?php echo esc_html( $value ); ?></option>
509
+ <?php endforeach; ?>
510
+ </select>
511
+ </label>
512
+
513
  <?php
514
  $captions = array(
515
  'onhover' => __( 'On Image Hover', 'wc_gallery' ),
includes/js/flexslider/flexslider.css CHANGED
@@ -1,108 +1,279 @@
1
  /*
2
- * jQuery FlexSlider v2.2.0
3
- * http://www.woothemes.com/flexslider/
4
  *
5
  * Copyright 2012 WooThemes
6
- * Free to use under the GPLv2 license.
7
  * http://www.gnu.org/licenses/gpl-2.0.html
8
  *
9
  * Contributing author: Tyler Smith (@mbmufffin)
 
10
  */
11
-
12
-
13
- /* Browser Resets
14
- *********************************/
15
- .wcflex-container a:active,
16
- .wcflexslider a:active,
 
 
 
 
 
 
 
 
 
17
  .wcflex-container a:focus,
18
- .wcflexslider a:focus {outline: none;}
 
 
19
  .slides,
 
20
  .wcflex-control-nav,
21
- .wcflex-direction-nav {margin: 0; padding: 0; list-style: none;}
22
-
23
- /* Icon Fonts
24
- *********************************/
25
- /* Font-face Icons */
26
- /* @font-face {
27
- font-family: 'flexslider-icon';
28
- src:url('fonts/flexslider-icon.eot');
29
- src:url('fonts/flexslider-icon.eot?#iefix') format('embedded-opentype'),
30
- url('fonts/flexslider-icon.woff') format('woff'),
31
- url('fonts/flexslider-icon.ttf') format('truetype'),
32
- url('fonts/flexslider-icon.svg#flexslider-icon') format('svg');
33
- font-weight: normal;
34
- font-style: normal;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  } */
36
-
37
- /* FlexSlider Necessary Styles
38
- *********************************/
39
- .wcflexslider {margin: 0; padding: 0;}
40
- .wcflexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
41
- .wcflexslider .slides img {/*width: 100%;*/ margin-left: auto; margin-right: auto; display: block;}
42
- .wcflex-pauseplay span {text-transform: capitalize;}
43
-
44
- /* Clearfix for the .slides element */
45
- .slides:after {content: "\0020"; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
46
- html[xmlns] .slides {display: block;}
47
- * html .slides {height: 1%;}
48
-
49
- /* No JavaScript Fallback */
50
- /* If you are not using another script, such as Modernizr, make sure you
51
- * include js that eliminates this class on page load */
52
- .no-js .slides > li:first-child {display: block;}
53
-
54
- /* FlexSlider Default Theme
55
- *********************************/
56
- .wcflexslider { margin: 0 0 60px; background: #fff; border: 4px solid #fff; position: relative; -webkit-border-radius: 4px; -moz-border-radius: 4px; -o-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.2); -moz-box-shadow: 0 1px 4px rgba(0,0,0,.2); -o-box-shadow: 0 1px 4px rgba(0,0,0,.2); box-shadow: 0 1px 4px rgba(0,0,0,.2); zoom: 1; }
57
- .wcflex-viewport { max-height: 2000px; }
58
- .loading .wcflex-viewport { max-height: 300px; }
59
- /* .wcflex-viewport { max-height: 2000px; -webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease; transition: all 0.5s ease; } */
60
- .wcflexslider .slides { zoom: 1; }
61
- .wccarousel li { margin-right: 5px; }
62
-
63
- /* Direction Nav */
64
- .wcflex-direction-nav {*height: 0;}
65
- .wcflex-direction-nav a { display: block; width: 50px; height: 50px; margin: -25px 0 0; position: absolute; top: 50%; z-index: 10; overflow: hidden; opacity: 0; cursor: pointer; /*-webkit-transition: all .3s ease; -moz-transition: all .3s ease; transition: all .3s ease;*/ }
66
- .wcflex-direction-nav .wcflex-prev { background: url("images/slide-arrow-left.png") no-repeat center center !important; left: 0; }
67
- .wcflex-direction-nav .wcflex-next { background: url("images/slide-arrow-right.png") no-repeat center center !important; right: 0; text-align: right; }
68
- .wcflexslider:hover .wcflex-prev { opacity: 1; left: 0px; }
69
- .wcflexslider:hover .wcflex-next { opacity: 1; right: 0px; }
70
- .wcflexslider:hover .wcflex-next:hover, .wcflexslider:hover .wcflex-prev:hover { opacity: 1; }
71
- .wcflex-direction-nav .wcflex-disabled { /*opacity: 0!important; filter:alpha(opacity=0); cursor: default;*/ }
72
- /* .wcflex-direction-nav a:before { display: inline-block; background-image:url("images/leftarrow.png"); } */
73
- /* .wcflex-direction-nav a.wcflex-next:before { background-image:url("images/rightarrow.png"); } */
74
-
75
- /* Pause/Play */
76
- .wcflex-pauseplay a { display: block; width: 20px; height: 20px; position: absolute; bottom: 5px; left: 10px; opacity: 0.8; z-index: 10; overflow: hidden; cursor: pointer; color: #000; }
77
- /* .wcflex-pauseplay a:before { font-family: "flexslider-icon"; font-size: 20px; display: inline-block; content: '\f004'; } */
78
- /* .wcflex-pauseplay a:hover { opacity: 1; } */
79
- /* .wcflex-pauseplay a.wcflex-play:before { content: '\f003'; } */
80
-
81
- /* Control Nav */
82
- .wcflex-control-nav {font-size: 11px; line-height: 11px; width: 100%; position: relative; text-align: center; padding-top: 20px;}
83
- .wcflex-control-nav li {margin: 0 6px; display: inline-block; zoom: 1; *display: inline;}
84
- .wcflex-control-paging li a {width: 11px; height: 11px; display: block; background: #666; background: rgba(0,0,0,0.5); cursor: pointer; text-indent: -9999px; -webkit-border-radius: 20px; -moz-border-radius: 20px; -o-border-radius: 20px; border-radius: 20px; -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); -moz-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); -o-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); box-shadow: inset 0 0 3px rgba(0,0,0,0.3); }
85
- .wcflex-control-paging li a:hover { background: #333; background: rgba(0,0,0,0.7); }
86
- .wcflex-control-paging li a.wcflex-active { background: #000; background: rgba(0,0,0,0.9); cursor: default; }
87
-
88
- .wcflex-control-thumbs {margin: 5px 0 0; position: static; overflow: hidden;}
89
- .wcflex-control-thumbs li {width: 25%; float: left; margin: 0;}
90
- .wcflex-control-thumbs img {width: 100%; display: block; opacity: .7; cursor: pointer;}
91
- .wcflex-control-thumbs img:hover {opacity: 1;}
92
- .wcflex-control-thumbs .wcflex-active {opacity: 1; cursor: default;}
93
-
94
- .wcflexslider-hidecontrols .wcflex-control-paging {
95
- display: none;
96
- }
97
- .wcflexslider-hidecontrols .wcflex-direction-nav a {
98
- margin-top: -25px;
99
- }
100
-
101
- /* @media screen and (max-width: 860px) {
102
- .wcflex-direction-nav .wcflex-prev { opacity: 1; left: 10px;}
103
- .wcflex-direction-nav .wcflex-next { opacity: 1; right: 10px;}
104
  } */
105
- /* @media screen and (max-width: 480px) {
106
- .wcflex-direction-nav .wcflex-prev { background: none; }
107
- .wcflex-direction-nav .wcflex-next { background: none; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  } */
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
+ }
53
+ .wcflexslider .slides img {
54
+ /* width: 100%; */
55
+ display: block;
56
+ margin-left: auto;
57
+ margin-right: auto;
58
+ }
59
+ .wcflexslider .slides:after {
60
+ /* content: "\0020"; [> not loading fonts <] */
61
+ display: block;
62
+ clear: both;
63
+ visibility: hidden;
64
+ line-height: 0;
65
+ height: 0;
66
+ }
67
+ html[xmlns] .wcflexslider .slides {
68
+ display: block;
69
+ }
70
+ * html .wcflexslider .slides {
71
+ height: 1%;
72
+ }
73
+ .no-js .wcflexslider .slides > li:first-child {
74
+ display: block;
75
+ }
76
+ /* ====================================================================================================================
77
+ * DEFAULT THEME
78
+ * ====================================================================================================================*/
79
+ .wcflexslider {
80
+ margin: 0 0 60px;
81
+ background: #ffffff;
82
+ border: 4px solid #ffffff;
83
+ position: relative;
84
+ zoom: 1;
85
+ /* -webkit-border-radius: 4px; */
86
+ /* -moz-border-radius: 4px; */
87
+ /* border-radius: 4px; */
88
+ /* -webkit-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); */
89
+ /* -moz-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); */
90
+ /* -o-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); */
91
+ /* box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); */
92
+ }
93
+ .wcflexslider .slides {
94
+ zoom: 1;
95
+ }
96
+ .wcflexslider .slides img {
97
+ height: auto;
98
+ }
99
+ /* comment below except for max height if problems occur */
100
+ .wcflex-viewport {
101
+ max-height: 2000px;
102
+ -webkit-transition: all 1s ease;
103
+ -moz-transition: all 1s ease;
104
+ -ms-transition: all 1s ease;
105
+ -o-transition: all 1s ease;
106
+ transition: all 1s ease;
107
+ }
108
+ .loading .wcflex-viewport {
109
+ max-height: 300px;
110
+ }
111
+ .carousel li {
112
+ margin-right: 5px;
113
+ }
114
+ .wcflex-direction-nav {
115
+ *height: 0;
116
+ }
117
+ .wcflex-direction-nav a {
118
+ text-decoration: none;
119
+ display: block;
120
+ width: 50px;
121
+ height: 50px;
122
+ margin: -25px 0 0;
123
+ position: absolute;
124
+ top: 50%;
125
+ z-index: 10;
126
+ overflow: hidden;
127
+ opacity: 0;
128
+ cursor: pointer;
129
+ color: rgba(0, 0, 0, 0.8); /* disable possibly */
130
+ /* text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); */
131
+ -webkit-transition: all 0.3s ease-in-out;
132
+ -moz-transition: all 0.3s ease-in-out;
133
+ -ms-transition: all 0.3s ease-in-out;
134
+ -o-transition: all 0.3s ease-in-out;
135
+ transition: all 0.3s ease-in-out;
136
+ }
137
+ /* .wcflex-direction-nav a:before {
138
+ font-family: "wcflexslider-icon";
139
+ font-size: 40px;
140
+ display: inline-block;
141
+ content: '\f001';
142
+ color: rgba(0, 0, 0, 0.8);
143
+ text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
144
+ }
145
+ .wcflex-direction-nav a.wcflex-next:before {
146
+ content: '\f002';
147
  } */
148
+ .wcflex-direction-nav .wcflex-prev {
149
+ background: url("images/slide-arrow-left.png") no-repeat center center !important;
150
+ left: 0;
151
+ }
152
+ .wcflex-direction-nav .wcflex-next {
153
+ background: url("images/slide-arrow-right.png") no-repeat center center !important;
154
+ right: 0;
155
+ text-align: right;
156
+ }
157
+ .wcflexslider:hover .wcflex-direction-nav .wcflex-prev {
158
+ opacity: 1;
159
+ /* left: 10px; */
160
+ }
161
+ .wcflexslider:hover .wcflex-direction-nav .wcflex-prev:hover {
162
+ /* opacity: 1; */
163
+ }
164
+ .wcflexslider:hover .wcflex-direction-nav .wcflex-next {
165
+ opacity: 1;
166
+ /* right: 10px; */
167
+ }
168
+ .wcflexslider:hover .wcflex-direction-nav .wcflex-next:hover {
169
+ opacity: 1;
170
+ }
171
+ /* .wcflex-direction-nav .wcflex-disabled {
172
+ opacity: 0!important;
173
+ filter: alpha(opacity=0);
174
+ cursor: default;
175
+ } */
176
+ /* .wcflex-pauseplay a {
177
+ display: block;
178
+ width: 20px;
179
+ height: 20px;
180
+ position: absolute;
181
+ bottom: 5px;
182
+ left: 10px;
183
+ opacity: 0.8;
184
+ z-index: 10;
185
+ overflow: hidden;
186
+ cursor: pointer;
187
+ color: #000;
188
+ }
189
+ .wcflex-pauseplay a:before {
190
+ font-family: "wcflexslider-icon";
191
+ font-size: 20px;
192
+ display: inline-block;
193
+ content: '\f004';
194
+ }
195
+ .wcflex-pauseplay a:hover {
196
+ opacity: 1;
197
+ }
198
+ .wcflex-pauseplay a .wcflex-play:before {
199
+ content: '\f003';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  } */
201
+ .wcflex-control-nav {
202
+ width: 100%;
203
+ position: absolute;
204
+ bottom: -40px;
205
+ text-align: center;
206
+ }
207
+ .wcflex-control-nav li {
208
+ margin: 0 6px;
209
+ display: inline-block;
210
+ zoom: 1;
211
+ *display: inline;
212
+ }
213
+ .wcflex-control-paging li a {
214
+ width: 11px;
215
+ height: 11px;
216
+ display: block;
217
+ background: #666;
218
+ background: rgba(0, 0, 0, 0.5);
219
+ cursor: pointer;
220
+ text-indent: -9999px;
221
+ /* -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); */
222
+ /* -moz-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); */
223
+ /* -o-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); */
224
+ /* box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); */
225
+ /* -webkit-border-radius: 20px; */
226
+ /* -moz-border-radius: 20px; */
227
+ /* border-radius: 20px; */
228
+ }
229
+ .wcflex-control-paging li a:hover {
230
+ background: #333;
231
+ background: rgba(0, 0, 0, 0.7);
232
+ }
233
+ .wcflex-control-paging li a.wcflex-active {
234
+ background: #000;
235
+ background: rgba(0, 0, 0, 0.9);
236
+ cursor: default;
237
+ }
238
+ .wcflex-control-thumbs {
239
+ margin: 5px 0 0;
240
+ position: static;
241
+ overflow: hidden;
242
+ }
243
+ .wcflex-control-thumbs li {
244
+ width: 25%;
245
+ float: left;
246
+ margin: 0;
247
+ }
248
+ .wcflex-control-thumbs img {
249
+ width: 100%;
250
+ height: auto;
251
+ display: block;
252
+ opacity: .7;
253
+ cursor: pointer;
254
+ -webkit-transition: all 1s ease;
255
+ -moz-transition: all 1s ease;
256
+ -ms-transition: all 1s ease;
257
+ -o-transition: all 1s ease;
258
+ transition: all 1s ease;
259
+ }
260
+ .wcflex-control-thumbs img:hover {
261
+ opacity: 1;
262
+ }
263
+ .wcflex-control-thumbs .wcflex-active {
264
+ opacity: 1;
265
+ cursor: default;
266
+ }
267
+ /* ====================================================================================================================
268
+ * RESPONSIVE
269
+ * ====================================================================================================================*/
270
+ /* @media screen and (max-width: 860px) {
271
+ .wcflex-direction-nav .wcflex-prev {
272
+ opacity: 1;
273
+ left: 10px;
274
+ }
275
+ .wcflex-direction-nav .wcflex-next {
276
+ opacity: 1;
277
+ right: 10px;
278
+ }
279
  } */
includes/js/flexslider/jquery.flexslider-min.js CHANGED
@@ -1,5 +1,5 @@
1
  /*
2
- * jQuery FlexSlider v2.2.2.1
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><a class="'+i+'prev" href="#">'+r.vars.prevText+'</a></li><li><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=p?r:r.viewport;t.css({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=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)e[t]+"Hidden"in document&&(v.pauseInvisible.visProp=e[t]+"Hidden");if(v.pauseInvisible.visProp){var n=v.pauseInvisible.visProp.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(n,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(){return document[v.pauseInvisible.visProp]||!1}},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){r.addClass(i+"loading");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"});t==="init"&&(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.removeClass(i+"loading");r.addClass(i+"dom-loaded");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);
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=p?r:r.viewport;e?t.animate({height:r.slides.eq(r.animatingTo).height()},e):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"});t==="init"&&(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 CHANGED
@@ -1,5 +1,5 @@
1
  /*
2
- * jQuery FlexSlider v2.2.2.1
3
  * Copyright 2012 WooThemes
4
  * Contributing Author: Tyler Smith
5
  */
@@ -38,7 +38,7 @@
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(' '));
@@ -48,7 +48,7 @@
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:
@@ -88,10 +88,10 @@
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)) {
@@ -114,18 +114,18 @@
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
@@ -136,13 +136,13 @@
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
 
@@ -178,8 +178,9 @@
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
  }, false);
184
  that.addEventListener("MSGestureTap", function (e){
185
  e.preventDefault();
@@ -216,7 +217,7 @@
216
  item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"/>' : '<a>' + j + '</a>';
217
  if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
218
  var captn = slide.attr( 'data-thumbcaption' );
219
- if ( '' != captn && undefined != captn ) item += '<span class="' + namespace + 'caption">' + captn + '</span>';
220
  }
221
  slider.controlNavScaffold.append('<li>' + item + '</li>');
222
  j++;
@@ -295,7 +296,7 @@
295
  },
296
  directionNav: {
297
  setup: function() {
298
- var directionNavScaffold = $('<ul class="' + namespace + 'direction-nav"><li><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>');
299
 
300
  // CONTROLSCONTAINER:
301
  if (slider.controlsContainer) {
@@ -457,7 +458,7 @@
457
  if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
458
  slider.wcflexAnimate(target, slider.vars.pauseOnAction);
459
  } else {
460
- if (!fade) slider.wcflexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true);
461
  }
462
  }
463
  el.removeEventListener('touchend', onTouchEnd, false);
@@ -542,7 +543,7 @@
542
  if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
543
  slider.wcflexAnimate(target, slider.vars.pauseOnAction);
544
  } else {
545
- if (!fade) slider.wcflexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true);
546
  }
547
  }
548
 
@@ -556,7 +557,7 @@
556
  },
557
  resize: function() {
558
  if (!slider.animating && slider.is(':visible')) {
559
- if (!carousel) slider.doMath();
560
 
561
  if (fade) {
562
  // SMOOTH HEIGHT:
@@ -571,7 +572,7 @@
571
  slider.setProps(slider.h, "setTotal");
572
  } else {
573
  // SMOOTH HEIGHT:
574
- if (slider.vars.smoothHeight) methods.smoothHeight();
575
  slider.newSlides.width(slider.computedW);
576
  slider.setProps(slider.computedW, "setTotal");
577
  }
@@ -580,8 +581,7 @@
580
  smoothHeight: function(dur) {
581
  if (!vertical || fade) {
582
  var $obj = (fade) ? slider : slider.viewport;
583
- // (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height());
584
- $obj.css({"height": slider.slides.eq(slider.animatingTo).height()});
585
  }
586
  },
587
  sync: function(action) {
@@ -605,29 +605,52 @@
605
  pauseInvisible: {
606
  visProp: null,
607
  init: function() {
608
- var prefixes = ['webkit','moz','ms','o'];
609
-
610
- if ('hidden' in document) return 'hidden';
611
- for (var i = 0; i < prefixes.length; i++) {
612
- if ((prefixes[i] + 'Hidden') in document)
613
- methods.pauseInvisible.visProp = prefixes[i] + 'Hidden';
614
- }
615
- if (methods.pauseInvisible.visProp) {
616
- var evtname = methods.pauseInvisible.visProp.replace(/[H|h]idden/,'') + 'visibilitychange';
617
  document.addEventListener(evtname, function() {
618
  if (methods.pauseInvisible.isHidden()) {
619
- if(slider.startTimeout) clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible
620
- else slider.pause(); //Or just pause
 
 
 
621
  }
622
  else {
623
- if(slider.started) slider.play(); //Initiated before, just play
624
- else (slider.vars.initDelay > 0) ? setTimeout(slider.play, slider.vars.initDelay) : slider.play(); //Didn't init before: simply init or wait for it
 
 
 
 
 
 
 
625
  }
626
  });
627
  }
628
  },
629
  isHidden: function() {
630
- return document[methods.pauseInvisible.visProp] || false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
631
  }
632
  },
633
  setToClearWatchedEvent: function() {
@@ -669,33 +692,33 @@
669
  slider.animatingTo = target;
670
 
671
  // SLIDESHOW:
672
- if (pause) slider.pause();
673
 
674
  // API: before() animation Callback
675
  slider.vars.before(slider);
676
 
677
  // SYNC:
678
- if (slider.syncExists && !fromNav) methods.sync("animate");
679
 
680
  // CONTROLNAV
681
- if (slider.vars.controlNav) methods.controlNav.active();
682
 
683
  // !CAROUSEL:
684
  // CANDIDATE: slide active class (for add/remove slide)
685
- if (!carousel) slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide');
686
 
687
  // INFINITE LOOP:
688
  // CANDIDATE: atEnd
689
  slider.atEnd = target === 0 || target === slider.last;
690
 
691
  // DIRECTIONNAV:
692
- if (slider.vars.directionNav) methods.directionNav.update();
693
 
694
  if (target === slider.last) {
695
  // API: end() of cycle Callback
696
  slider.vars.end(slider);
697
  // SLIDESHOW && !INFINITE LOOP:
698
- if (!slider.vars.animationLoop) slider.pause();
699
  }
700
 
701
  // SLIDE:
@@ -756,7 +779,7 @@
756
  }
757
  }
758
  // SMOOTH HEIGHT:
759
- if (slider.vars.smoothHeight) methods.smoothHeight(slider.vars.animationSpeed);
760
  }
761
  };
762
  slider.wrapup = function(dimension) {
@@ -776,7 +799,7 @@
776
 
777
  // SLIDESHOW:
778
  slider.animateSlides = function() {
779
- if (!slider.animating && focused ) slider.wcflexAnimate(slider.getTarget("next"));
780
  };
781
  // SLIDESHOW:
782
  slider.pause = function() {
@@ -784,19 +807,19 @@
784
  slider.animatedSlides = null;
785
  slider.playing = false;
786
  // PAUSEPLAY:
787
- if (slider.vars.pausePlay) methods.pausePlay.update("play");
788
  // SYNC:
789
- if (slider.syncExists) methods.sync("pause");
790
  };
791
  // SLIDESHOW:
792
  slider.play = function() {
793
- if (slider.playing) clearInterval(slider.animatedSlides);
794
  slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
795
  slider.started = slider.playing = true;
796
  // PAUSEPLAY:
797
- if (slider.vars.pausePlay) methods.pausePlay.update("pause");
798
  // SYNC:
799
- if (slider.syncExists) methods.sync("play");
800
  };
801
  // STOP:
802
  slider.stop = function () {
@@ -856,14 +879,12 @@
856
  }
857
 
858
  slider.args[slider.prop] = target;
859
- if (slider.transitions || dur === undefined) slider.container.css(slider.args);
860
 
861
  slider.container.css('transform',target);
862
  };
863
 
864
  slider.setup = function(type) {
865
- slider.addClass(namespace + "loading");
866
-
867
  // SLIDE:
868
  if (!fade) {
869
  var sliderOffset, arr;
@@ -885,7 +906,7 @@
885
  slider.cloneCount = 2;
886
  slider.cloneOffset = 1;
887
  // clear out old clones
888
- if (type !== "init") slider.container.find('.clone').remove();
889
  slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true'))
890
  .prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true'));
891
  }
@@ -908,7 +929,7 @@
908
  slider.doMath();
909
  slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"});
910
  // SMOOTH HEIGHT:
911
- if (slider.vars.smoothHeight) methods.smoothHeight();
912
  }, (type === "init") ? 100 : 0);
913
  }
914
  } else { // FADE:
@@ -926,14 +947,11 @@
926
  }
927
  }
928
  // SMOOTH HEIGHT:
929
- if (slider.vars.smoothHeight) methods.smoothHeight();
930
  }
931
  // !CAROUSEL:
932
  // CANDIDATE: active slide
933
- if (!carousel) slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide");
934
-
935
- slider.removeClass(namespace + "loading");
936
- slider.addClass(namespace + "dom-loaded");
937
 
938
  //FlexSlider: init() Callback
939
  slider.vars.init(slider);
@@ -998,7 +1016,7 @@
998
  }
999
  }
1000
  // update directionNav
1001
- if (slider.vars.directionNav) methods.directionNav.update();
1002
 
1003
  };
1004
 
@@ -1131,7 +1149,7 @@
1131
 
1132
  //FlexSlider: Plugin Function
1133
  $.fn.wcflexslider = function(options) {
1134
- if (options === undefined) options = {};
1135
 
1136
  if (typeof options === "object") {
1137
  return this.each(function() {
@@ -1141,7 +1159,7 @@
1141
 
1142
  if ( ( $slides.length === 1 && options.allowOneSlide === true ) || $slides.length === 0 ) {
1143
  $slides.fadeIn(400);
1144
- if (options.start) options.start($this);
1145
  } else if ($this.data('wcflexslider') === undefined) {
1146
  new $.wcflexslider(this, options);
1147
  }
@@ -1156,7 +1174,7 @@
1156
  case "next": $slider.wcflexAnimate($slider.getTarget("next"), true); break;
1157
  case "prev":
1158
  case "previous": $slider.wcflexAnimate($slider.getTarget("prev"), true); break;
1159
- default: if (typeof options === "number") $slider.wcflexAnimate(options, true);
1160
  }
1161
  }
1162
  };
1
  /*
2
+ * jQuery FlexSlider v2.4.0
3
  * Copyright 2012 WooThemes
4
  * Contributing Author: Tyler Smith
5
  */
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(' '));
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:
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)) {
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
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
 
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();
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++;
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) {
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);
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
 
557
  },
558
  resize: function() {
559
  if (!slider.animating && slider.is(':visible')) {
560
+ if (!carousel) { slider.doMath(); }
561
 
562
  if (fade) {
563
  // SMOOTH HEIGHT:
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
  }
581
  smoothHeight: function(dur) {
582
  if (!vertical || fade) {
583
  var $obj = (fade) ? slider : slider.viewport;
584
+ (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height());
 
585
  }
586
  },
587
  sync: function(action) {
605
  pauseInvisible: {
606
  visProp: null,
607
  init: function() {
608
+ var visProp = methods.pauseInvisible.getHiddenProp();
609
+ if (visProp) {
610
+ var evtname = visProp.replace(/[H|h]idden/,'') + 'visibilitychange';
 
 
 
 
 
 
611
  document.addEventListener(evtname, function() {
612
  if (methods.pauseInvisible.isHidden()) {
613
+ if(slider.startTimeout) {
614
+ clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible
615
+ } else {
616
+ slider.pause(); //Or just pause
617
+ }
618
  }
619
  else {
620
+ if(slider.started) {
621
+ slider.play(); //Initiated before, just play
622
+ } else {
623
+ if (slider.vars.initDelay > 0) {
624
+ setTimeout(slider.play, slider.vars.initDelay);
625
+ } else {
626
+ slider.play(); //Didn't init before: simply init or wait for it
627
+ }
628
+ }
629
  }
630
  });
631
  }
632
  },
633
  isHidden: function() {
634
+ var prop = methods.pauseInvisible.getHiddenProp();
635
+ if (!prop) {
636
+ return false;
637
+ }
638
+ return document[prop];
639
+ },
640
+ getHiddenProp: function() {
641
+ var prefixes = ['webkit','moz','ms','o'];
642
+ // if 'hidden' is natively supported just return it
643
+ if ('hidden' in document) {
644
+ return 'hidden';
645
+ }
646
+ // otherwise loop over all the known prefixes until we find one
647
+ for ( var i = 0; i < prefixes.length; i++ ) {
648
+ if ((prefixes[i] + 'Hidden') in document) {
649
+ return prefixes[i] + 'Hidden';
650
+ }
651
+ }
652
+ // otherwise it's not supported
653
+ return null;
654
  }
655
  },
656
  setToClearWatchedEvent: function() {
692
  slider.animatingTo = target;
693
 
694
  // SLIDESHOW:
695
+ if (pause) { slider.pause(); }
696
 
697
  // API: before() animation Callback
698
  slider.vars.before(slider);
699
 
700
  // SYNC:
701
+ if (slider.syncExists && !fromNav) { methods.sync("animate"); }
702
 
703
  // CONTROLNAV
704
+ if (slider.vars.controlNav) { methods.controlNav.active(); }
705
 
706
  // !CAROUSEL:
707
  // CANDIDATE: slide active class (for add/remove slide)
708
+ if (!carousel) { slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide'); }
709
 
710
  // INFINITE LOOP:
711
  // CANDIDATE: atEnd
712
  slider.atEnd = target === 0 || target === slider.last;
713
 
714
  // DIRECTIONNAV:
715
+ if (slider.vars.directionNav) { methods.directionNav.update(); }
716
 
717
  if (target === slider.last) {
718
  // API: end() of cycle Callback
719
  slider.vars.end(slider);
720
  // SLIDESHOW && !INFINITE LOOP:
721
+ if (!slider.vars.animationLoop) { slider.pause(); }
722
  }
723
 
724
  // SLIDE:
779
  }
780
  }
781
  // SMOOTH HEIGHT:
782
+ if (slider.vars.smoothHeight) { methods.smoothHeight(slider.vars.animationSpeed); }
783
  }
784
  };
785
  slider.wrapup = function(dimension) {
799
 
800
  // SLIDESHOW:
801
  slider.animateSlides = function() {
802
+ if (!slider.animating && focused ) { slider.wcflexAnimate(slider.getTarget("next")); }
803
  };
804
  // SLIDESHOW:
805
  slider.pause = function() {
807
  slider.animatedSlides = null;
808
  slider.playing = false;
809
  // PAUSEPLAY:
810
+ if (slider.vars.pausePlay) { methods.pausePlay.update("play"); }
811
  // SYNC:
812
+ if (slider.syncExists) { methods.sync("pause"); }
813
  };
814
  // SLIDESHOW:
815
  slider.play = function() {
816
+ if (slider.playing) { clearInterval(slider.animatedSlides); }
817
  slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
818
  slider.started = slider.playing = true;
819
  // PAUSEPLAY:
820
+ if (slider.vars.pausePlay) { methods.pausePlay.update("pause"); }
821
  // SYNC:
822
+ if (slider.syncExists) { methods.sync("play"); }
823
  };
824
  // STOP:
825
  slider.stop = function () {
879
  }
880
 
881
  slider.args[slider.prop] = target;
882
+ if (slider.transitions || dur === undefined) { slider.container.css(slider.args); }
883
 
884
  slider.container.css('transform',target);
885
  };
886
 
887
  slider.setup = function(type) {
 
 
888
  // SLIDE:
889
  if (!fade) {
890
  var sliderOffset, arr;
906
  slider.cloneCount = 2;
907
  slider.cloneOffset = 1;
908
  // clear out old clones
909
+ if (type !== "init") { slider.container.find('.clone').remove(); }
910
  slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true'))
911
  .prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true'));
912
  }
929
  slider.doMath();
930
  slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"});
931
  // SMOOTH HEIGHT:
932
+ if (slider.vars.smoothHeight) { methods.smoothHeight(); }
933
  }, (type === "init") ? 100 : 0);
934
  }
935
  } else { // FADE:
947
  }
948
  }
949
  // SMOOTH HEIGHT:
950
+ if (slider.vars.smoothHeight) { methods.smoothHeight(); }
951
  }
952
  // !CAROUSEL:
953
  // CANDIDATE: active slide
954
+ if (!carousel) { slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide"); }
 
 
 
955
 
956
  //FlexSlider: init() Callback
957
  slider.vars.init(slider);
1016
  }
1017
  }
1018
  // update directionNav
1019
+ if (slider.vars.directionNav) { methods.directionNav.update(); }
1020
 
1021
  };
1022
 
1149
 
1150
  //FlexSlider: Plugin Function
1151
  $.fn.wcflexslider = function(options) {
1152
+ if (options === undefined) { options = {}; }
1153
 
1154
  if (typeof options === "object") {
1155
  return this.each(function() {
1159
 
1160
  if ( ( $slides.length === 1 && options.allowOneSlide === true ) || $slides.length === 0 ) {
1161
  $slides.fadeIn(400);
1162
+ if (options.start) { options.start($this); }
1163
  } else if ($this.data('wcflexslider') === undefined) {
1164
  new $.wcflexslider(this, options);
1165
  }
1174
  case "next": $slider.wcflexAnimate($slider.getTarget("next"), true); break;
1175
  case "prev":
1176
  case "previous": $slider.wcflexAnimate($slider.getTarget("prev"), true); break;
1177
+ default: if (typeof options === "number") { $slider.wcflexAnimate(options, true); }
1178
  }
1179
  }
1180
  };
includes/js/gallery.js CHANGED
@@ -104,7 +104,11 @@
104
  type:'image',
105
  image: {
106
  titleSrc: function(item) {
107
- return $(item.el).parent().next('.gallery-caption').html();
 
 
 
 
108
  }
109
  }
110
  });
@@ -137,69 +141,76 @@
137
 
138
  gutterWidth = parseInt( gutterWidth );
139
 
140
- if ( $flex.hasClass('wcslider') ) {
141
- $flex.wcflexslider({
142
- prevText: "",
143
- nextText: "",
144
- smoothHeight: false,
145
- slideshow: false,
146
- animation:"fade"
147
- });
148
- }
149
- else if ( $flex.hasClass('wcslider2') ) {
150
- $flex.wcflexslider({
151
- prevText: "",
152
- nextText: "",
153
- smoothHeight: true,
154
- slideshow: false,
155
- animation:"slide"
156
- });
157
- }
158
- else if ( $flex.hasClass('wcsliderauto') ) {
159
- $flex.wcflexslider({
160
- prevText: "",
161
- nextText: "",
162
- smoothHeight: true,
163
- slideshow: true,
164
- animation:"slide"
165
- });
166
- }
167
- else if ( $flex.hasClass('wccarousel') ) {
168
- $flex.wcflexslider({
169
- prevText: "",
170
- nextText: "",
171
- smoothHeight: false,
172
- slideshow: false,
173
- animation: "slide",
174
- animationLoop: false,
175
- itemWidth: 270,
176
- itemMargin: gutterWidth
177
- });
178
- }
179
- else if ( $flex.hasClass('wcslider3bottomlinks') || $flex.hasClass('wcslider4bottomlinks') ) {
180
- $flex.wcflexslider({
181
- prevText: "",
182
- nextText: "",
183
- smoothHeight: false,
184
- slideshow: true,
185
- animation:"slide",
186
- init: function() {
187
- $this.find('.wc-image-links .gallery-item').each( function() {
188
- var $link = $(this);
189
- var $a = $link.find('.gallery-icon a');
190
- if ( 0 < $a.length ) {
191
- var href = $a.attr('href');
192
- if ( 'string' == typeof( href ) ) {
193
- var $caption = $link.find('.gallery-caption');
194
- if ( 0 < $caption.length ) {
195
- $caption.wrap('<a href="'+href+'"></a>');
 
 
 
 
 
 
 
196
  }
197
  }
198
- }
199
- });
200
- }
201
- });
202
- }
203
  });
204
  }
205
  if( jQuery().owlCarousel) {
104
  type:'image',
105
  image: {
106
  titleSrc: function(item) {
107
+ var caption = $(item.el).parent().next('.gallery-caption').html();
108
+ if ( 'string' == typeof caption && caption.length > 0 )
109
+ return caption;
110
+
111
+ return '';
112
  }
113
  }
114
  });
141
 
142
  gutterWidth = parseInt( gutterWidth );
143
 
144
+ // imagesLoaded( $flex, function() {
145
+ if ( $flex.hasClass('wcslider') ) {
146
+ $flex.wcflexslider({
147
+ prevText: "",
148
+ nextText: "",
149
+ smoothHeight: true,
150
+ slideshow: false,
151
+ directionNav: showNav,
152
+ animation:"fade"
153
+ });
154
+ }
155
+ else if ( $flex.hasClass('wcslider2') ) {
156
+ $flex.wcflexslider({
157
+ prevText: "",
158
+ nextText: "",
159
+ smoothHeight: true,
160
+ slideshow: false,
161
+ directionNav: showNav,
162
+ animation:"slide"
163
+ });
164
+ }
165
+ else if ( $flex.hasClass('wcsliderauto') ) {
166
+ $flex.wcflexslider({
167
+ prevText: "",
168
+ nextText: "",
169
+ smoothHeight: true,
170
+ slideshow: true,
171
+ directionNav: showNav,
172
+ animation:"slide"
173
+ });
174
+ }
175
+ else if ( $flex.hasClass('wccarousel') ) {
176
+ $flex.wcflexslider({
177
+ prevText: "",
178
+ nextText: "",
179
+ smoothHeight: false,
180
+ slideshow: false,
181
+ directionNav: showNav,
182
+ animation: "slide",
183
+ animationLoop: false,
184
+ itemWidth: 270,
185
+ itemMargin: gutterWidth
186
+ });
187
+ }
188
+ else if ( $flex.hasClass('wcslider3bottomlinks') || $flex.hasClass('wcslider4bottomlinks') ) {
189
+ $flex.wcflexslider({
190
+ prevText: "",
191
+ nextText: "",
192
+ smoothHeight: true,
193
+ slideshow: true,
194
+ directionNav: showNav,
195
+ animation:"slide",
196
+ init: function() {
197
+ $this.find('.wc-image-links .gallery-item').each( function() {
198
+ var $link = $(this);
199
+ var $a = $link.find('.gallery-icon a');
200
+ if ( 0 < $a.length ) {
201
+ var href = $a.attr('href');
202
+ if ( 'string' == typeof( href ) ) {
203
+ var $caption = $link.find('.gallery-caption');
204
+ if ( 0 < $caption.length ) {
205
+ $caption.wrap('<a href="'+href+'"></a>');
206
+ }
207
  }
208
  }
209
+ });
210
+ }
211
+ });
212
+ }
213
+ // });
214
  });
215
  }
216
  if( jQuery().owlCarousel) {
includes/js/jquery.magnific-popup.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Magnific Popup - v1.0.0 - 2014-12-12
2
  * http://dimsemenov.com/plugins/magnific-popup/
3
- * Copyright (c) 2014 Dmitry Semenov; */
4
- (function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery||window.Zepto)})(function(e){var t,n,i,o,r,a,s,l="Close",c="BeforeClose",d="AfterClose",u="BeforeAppend",p="MarkupParse",f="Open",m="Change",g="mfp",h="."+g,v="mfp-ready",C="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jQuery,I=e(window),x=function(e,n){t.ev.on(g+e+h,n)},k=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},T=function(n,i){t.ev.triggerHandler(g+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},E=function(n){return n===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=n),t.currTemplate.closeBtn},_=function(){e.magnificPopup.instance||(t=new w,t.init(),e.magnificPopup.instance=t)},S=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};w.prototype={constructor:w,init:function(){var n=navigator.appVersion;t.isIE7=-1!==n.indexOf("MSIE 7."),t.isIE8=-1!==n.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=S(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),o=e(document),t.popupsCache={}},open:function(n){i||(i=e(document.body));var r;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var s,l=n.items;for(r=0;l.length>r;r++)if(s=l[r],s.parsed&&(s=s.el[0]),s===n.el[0]){t.index=r;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isOpen)return t.updateItemHTML(),void 0;t.types=[],a="",t.ev=n.mainEl&&n.mainEl.length?n.mainEl.eq(0):o,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+h,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+h,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var c=e.magnificPopup.modules;for(r=0;c.length>r;r++){var d=c[r];d=d.charAt(0).toUpperCase()+d.slice(1),t["init"+d].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,n,i){n.close_replaceWith=E(i.type)}),a+=" mfp-close-btn-in"):t.wrap.append(E())),t.st.alignTop&&(a+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+h,function(e){27===e.keyCode&&t.close()}),I.on("resize"+h,function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var u=t.wH=I.height(),m={};if(t.fixedContentPos&&t._hasScrollBar(u)){var g=t._getScrollbarSize();g&&(m.marginRight=g)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):m.overflow="hidden");var C=t.st.mainClass;return t.isIE7&&(C+=" mfp-ie7"),C&&t._addClassToMFP(C),t.updateItemHTML(),T("BuildControls"),e("html").css(m),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||i),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(v),t._setFocus()):t.bgOverlay.addClass(v),o.on("focusin"+h,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(u),T(f),n},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var n=C+" "+v+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var i={marginRight:""};t.isIE7?e("body, html").css("overflow",""):i.overflow="",e("html").css(i)}o.off("keyup"+h+" focusin"+h),t.ev.off(h),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var o=t.st[i]?t.st[i].markup:!1;T("FirstMarkupParse",o),t.currTemplate[i]=o?e(o):!0}r&&r!==n.type&&t.container.removeClass("mfp-"+r+"-holder");var a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,T(m,n),r=n.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[n]===!0?t.content.find(".mfp-close").length||t.content.append(E()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var r=t.types,a=0;r.length>a;a++)if(o.el.hasClass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,T("ElementParse",o),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){var r=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(r||2!==n.which&&!n.ctrlKey&&!n.metaKey){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(a>I.width())return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};T("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(y)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?o.height():document.body.scrollHeight)>(e||I.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),T(p,[t,n,i]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(o=e.split("_"),o.length>1){var i=t.find(h+"-"+o[0]);if(i.length>0){var r=o[1];"replaceWith"===r?i[0]!==n[0]&&i.replaceWith(n):"img"===r?i.is("img")?i.attr("src",n):i.replaceWith('<img src="'+n+'" class="'+i.attr("class")+'" />'):i.attr(o[1],n)}}else t.find(h+"-"+e).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,n){return _(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(n){_();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=b?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),b?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var P,O,z,M="inline",B=function(){z&&(O.after(z.addClass(P)).detach(),z=null)};e.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(M),x(l+"."+M,function(){B()})},getInline:function(n,i){if(B(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(O||(P=o.hiddenClass,O=k(P),P="mfp-"+P),z=r.after(O).detach().removeClass(P)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("<div>");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var F,H="ajax",L=function(){F&&i.removeClass(F)},A=function(){L(),t.req&&t.req.abort()};e.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(H),F=t.st.ajax.cursor,x(l+"."+H,A),x("BeforeChange."+H,A)},getAjax:function(n){F&&i.addClass(F),t.updateStatus("loading");var o=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};T("ParseAjax",a),t.appendContent(e(a.data),H),n.finished=!0,L(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){L(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var j,N=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=t.st.image,n=".image";t.types.push("image"),x(f+n,function(){"image"===t.currItem.type&&e.cursor&&i.addClass(e.cursor)}),x(l+n,function(){e.cursor&&i.removeClass(e.cursor),I.off("resize"+h)}),x("Resize"+n,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,j&&clearInterval(j),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){j&&clearInterval(j),j=setInterval(function(){return i.naturalWidth>0?(t._onImageHasSize(e),void 0):(n>200&&clearInterval(j),n++,3===n?o(10):40===n?o(50):100===n&&o(500),void 0)},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.el&&n.el.find("img").length&&(c.alt=n.el.find("img").attr("alt")),n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),c=n.img[0],c.naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:N(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(j&&clearInterval(j),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var W,R=function(){return void 0===W&&(W=void 0!==document.createElement("p").style.MozTransform),W};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return d(),void 0;r=s(e),r.css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;r=s(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var i;i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=i.offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:i.width(),height:(b?i.innerHeight():i[0].offsetHeight)-a-r};return R()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var Z="iframe",q="//about:blank",D=function(e){if(t.currTemplate[Z]){var n=t.currTemplate[Z].find("iframe");n.length&&(e||(n[0].src=q),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(Z,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(Z),x("BeforeChange",function(e,t,n){t!==n&&(t===Z?D():n===Z&&D(!0))}),x(l+"."+Z,function(){D()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var K=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},Y=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,i=".mfp-gallery",r=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",x(f+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+i,function(e,n){n.text&&(n.text=Y(n.text,t.currItem.index,t.items.length))}),x(p+i,function(e,i,o,r){var a=t.items.length;o.counter=a>1?Y(n.tCounter,r.index,a):""}),x("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y),s=r?"mfpFastClick":"click";o[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(o.add(a))}}),x(m+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+i,function(){o.off(i),t.wrap.off("click"+i),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=K(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=K(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;(t.direction?o:i)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?i:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=K(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),T("LazyLoad",i),"image"===i.type&&(i.img=e('<img class="mfp-img" />').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,T("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var U="retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(x("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),x("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,i=function(){I.off("touchmove"+r+" touchend"+r)},o="mfpFastClick",r="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var a,s=e(this);if(n){var l,c,d,u,p,f;s.on("touchstart"+r,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+r,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,i())}).on("touchend"+r,function(e){i(),u||f>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),o())})})}s.on("click"+r,function(){a||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+r+" click"+r),n&&I.off("touchmove"+r+" touchend"+r)}}(),_()});
1
+ /*! Magnific Popup - v1.0.0 - 2015-01-03
2
  * http://dimsemenov.com/plugins/magnific-popup/
3
+ * Copyright (c) 2015 Dmitry Semenov; */
4
+ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",b.ev=c.mainEl&&c.mainEl.length?c.mainEl.eq(0):d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.wrap.css(b.fixedContentPos?{overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}:{top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),b.currTemplate[d]=f?a(f):!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()});
includes/js/owlcarousel/assets/owl.carousel.css CHANGED
@@ -131,10 +131,10 @@
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
 
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
 
includes/js/owlcarousel/owl.carousel.js CHANGED
@@ -11,68 +11,7 @@
11
  */
12
  ;(function($, window, document, undefined) {
13
 
14
- var item, dom, width, num, pos, drag, speed, state, e;
15
-
16
- /**
17
- * Template for the data of each item respectively its DOM element.
18
- * @private
19
- */
20
- item = {
21
- index: false,
22
- indexAbs: false,
23
- posLeft: false,
24
- clone: false,
25
- active: false,
26
- loaded: false,
27
- lazyLoad: false,
28
- current: false,
29
- width: false,
30
- center: false,
31
- page: false,
32
- hasVideo: false,
33
- playVideo: false
34
- };
35
-
36
- /**
37
- * Template for the references to DOM elements, those with `$` sign are `jQuery` objects.
38
- * @private
39
- */
40
- dom = {
41
- el: null, // main element
42
- $el: null, // jQuery main element
43
- stage: null, // stage
44
- $stage: null, // jQuery stage
45
- oStage: null, // outer stage
46
- $oStage: null, // $ outer stage
47
- $items: null, // all items, clones and originals included
48
- $oItems: null, // original items
49
- $cItems: null, // cloned items only
50
- $content: null
51
- };
52
-
53
- /**
54
- * Template for the widths of some elements.
55
- * @private
56
- */
57
- width = {
58
- el: 0,
59
- stage: 0,
60
- item: 0,
61
- prevWindow: 0,
62
- cloneLast: 0
63
- };
64
-
65
- /**
66
- * Template for counting to some properties.
67
- * @private
68
- */
69
- num = {
70
- items: 0,
71
- oItems: 0,
72
- cItems: 0,
73
- active: 0,
74
- merged: []
75
- };
76
 
77
  /**
78
  * Template for status information about drag and touch events.
@@ -130,105 +69,129 @@
130
  */
131
  function Owl(element, options) {
132
 
133
- // add basic Owl information to dom element
134
- element.owlCarousel = {
135
- 'name': 'Owl Carousel',
136
- 'author': 'Bartosz Wojciechowski',
137
- 'version': '2.0.0-beta.2.1'
138
- };
139
-
140
  /**
141
  * Current settings for the carousel.
142
- * @protected
143
  */
144
  this.settings = null;
145
 
146
  /**
147
- *
148
- * @protected
149
- * @todo Must be dosumented.
150
  */
151
  this.options = $.extend({}, Owl.Defaults, options);
152
 
153
  /**
154
- * Template for the data of each item.
 
 
 
 
 
 
 
 
 
 
 
155
  * @protected
156
  */
157
- this.itemData = $.extend({}, item);
158
 
159
  /**
160
- * Contains references to DOM elements, those with `$` sign are `jQuery` objects.
161
  * @protected
 
162
  */
163
- this.dom = $.extend({}, dom);
164
 
165
  /**
166
- * Caches the widths of some elements.
167
  * @protected
168
  */
169
- this.width = $.extend({}, width);
170
 
171
  /**
172
- * Caches some count informations.
173
  * @protected
174
  */
175
- this.num = $.extend({}, num);
176
 
177
  /**
178
- * Caches informations about drag and touch events.
 
179
  */
180
- this.drag = $.extend({}, drag);
181
 
182
  /**
183
- * Caches some status informations.
184
  * @protected
185
  */
186
- this.state = $.extend({}, state);
187
 
188
  /**
 
 
189
  * @protected
190
- * @todo Must be documented
191
  */
192
- this.e = $.extend({}, e);
193
 
194
  /**
195
- * References to the running plugins of this carousel.
 
196
  * @protected
197
  */
198
- this.plugins = {};
199
 
200
  /**
201
- * Currently suppressed events to prevent them from beeing retriggered.
 
 
 
 
 
202
  * @protected
203
  */
204
- this._supress = {};
205
 
206
  /**
207
- * The absolute current position.
208
  * @protected
209
  */
210
- this._current = null;
211
 
212
  /**
213
- * The animation speed in milliseconds.
 
214
  * @protected
215
  */
216
- this._speed = null;
 
 
 
 
 
 
217
 
218
  /**
219
- * The coordinates of all items in pixel.
 
220
  */
221
- this._coordinates = null;
222
 
223
- this.dom.el = element;
224
- this.dom.$el = $(element);
 
 
225
 
226
- for (var plugin in Owl.Plugins) {
227
- this.plugins[plugin[0].toLowerCase() + plugin.slice(1)]
228
- = new Owl.Plugins[plugin](this);
229
- }
 
 
230
 
231
- this.init();
 
232
  }
233
 
234
  /**
@@ -253,6 +216,7 @@
253
  autoWidth: false,
254
 
255
  startPosition: 0,
 
256
 
257
  smartSpeed: 250,
258
  fluidSpeed: false,
@@ -279,6 +243,18 @@
279
  activeClass: 'active'
280
  };
281
 
 
 
 
 
 
 
 
 
 
 
 
 
282
  /**
283
  * Contains all registered plugins.
284
  * @public
@@ -286,39 +262,144 @@
286
  Owl.Plugins = {};
287
 
288
  /**
289
- * Initializes the carousel.
290
- * @protected
291
  */
292
- Owl.prototype.init = function() {
 
 
 
 
 
 
 
 
 
293
 
294
- // Update options.items on given size
295
- this.setResponsiveOptions();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
296
 
297
- this.trigger('initialize');
 
 
 
 
298
 
299
- // Add base class
300
- if (!this.dom.$el.hasClass(this.settings.baseClass)) {
301
- this.dom.$el.addClass(this.settings.baseClass);
302
  }
 
 
 
 
 
 
 
 
 
 
303
 
304
- // Add theme class
305
- if (!this.dom.$el.hasClass(this.settings.themeClass)) {
306
- this.dom.$el.addClass(this.settings.themeClass);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
308
 
309
- // Add theme class
310
- if (this.settings.rtl) {
311
- this.dom.$el.addClass('owl-rtl');
 
 
 
 
312
  }
 
313
 
314
- // Check support
 
 
 
 
 
 
 
 
 
 
 
 
315
  this.browserSupport();
316
 
317
  if (this.settings.autoWidth && this.state.imagesLoaded !== true) {
318
  var imgs, nestedSelector, width;
319
- imgs = this.dom.$el.find('img');
320
  nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined;
321
- width = this.dom.$el.children(nestedSelector).width();
322
 
323
  if (imgs.length && width <= 0) {
324
  this.preloadAutoWidthImages(imgs);
@@ -326,15 +407,25 @@
326
  }
327
  }
328
 
329
- // Get and store window width
330
- // iOS safari likes to trigger unnecessary resize event
331
- this.width.prevWindow = this.viewport();
332
 
333
- // create stage object
334
- this.createStage();
 
335
 
336
- // Append local content
337
- this.fetchContent();
 
 
 
 
 
 
 
 
 
 
 
338
 
339
  // attach generic events
340
  this.eventsCall();
@@ -342,44 +433,51 @@
342
  // attach generic events
343
  this.internalEvents();
344
 
345
- this.dom.$el.addClass('owl-loading');
346
- this.refresh(true);
347
- this.dom.$el.removeClass('owl-loading').addClass('owl-loaded');
348
-
349
- this.trigger('initialized');
350
-
351
  // attach custom control events
352
  this.addTriggerableEvents();
 
 
353
  };
354
 
355
  /**
356
- * Sets responsive options.
357
- * @protected
 
 
358
  */
359
- Owl.prototype.setResponsiveOptions = function() {
360
- if (!this.options.responsive) {
361
- this.settings = $.extend({}, this.options);
362
- } else {
363
- var viewport = this.viewport(),
364
- overwrites = this.options.responsive,
365
- match = -1;
366
 
 
 
 
367
  $.each(overwrites, function(breakpoint) {
368
  if (breakpoint <= viewport && breakpoint > match) {
369
  match = Number(breakpoint);
370
  }
371
  });
372
 
373
- this.settings = $.extend({}, this.options, overwrites[match]);
374
- delete this.settings.responsive;
375
 
376
- // Responsive Class
377
- if (this.settings.responsiveClass) {
378
- this.dom.$el.attr('class', function(i, c) {
379
  return c.replace(/\b owl-responsive-\S+/g, '');
380
  }).addClass('owl-responsive-' + match);
381
  }
382
  }
 
 
 
 
 
 
 
 
383
  };
384
 
385
  /**
@@ -388,10 +486,10 @@
388
  */
389
  Owl.prototype.optionsLogic = function() {
390
  // Toggle Center class
391
- this.dom.$el.toggleClass('owl-center', this.settings.center);
392
 
393
  // if items number is less than in body
394
- if (this.settings.loop && this.num.oItems < this.settings.items) {
395
  this.settings.loop = false;
396
  }
397
 
@@ -402,401 +500,59 @@
402
  };
403
 
404
  /**
405
- * Creates stage and outer-stage elements.
406
- * @protected
407
- */
408
- Owl.prototype.createStage = function() {
409
- var oStage = document.createElement('div'),
410
- stage = document.createElement(this.settings.stageElement);
411
-
412
- oStage.className = 'owl-stage-outer';
413
- stage.className = 'owl-stage';
414
-
415
- oStage.appendChild(stage);
416
- this.dom.el.appendChild(oStage);
417
-
418
- this.dom.oStage = oStage;
419
- this.dom.$oStage = $(oStage);
420
- this.dom.stage = stage;
421
- this.dom.$stage = $(stage);
422
-
423
- oStage = null;
424
- stage = null;
425
- };
426
-
427
- /**
428
- * Creates an item container.
429
- * @protected
430
- * @returns {jQuery} - The item container.
431
- */
432
- Owl.prototype.createItemContainer = function() {
433
- var item = document.createElement(this.settings.itemElement);
434
- item.className = this.settings.itemClass;
435
- return $(item);
436
- };
437
-
438
- /**
439
- * Fetches the content.
440
- * @protected
441
- */
442
- Owl.prototype.fetchContent = function(extContent) {
443
- if (extContent) {
444
- this.dom.$content = (extContent instanceof jQuery) ? extContent : $(extContent);
445
- } else if (this.settings.nestedItemSelector) {
446
- this.dom.$content = this.dom.$el.find('.' + this.settings.nestedItemSelector).not('.owl-stage-outer');
447
- } else {
448
- this.dom.$content = this.dom.$el.children().not('.owl-stage-outer');
449
- }
450
- // content length
451
- this.num.oItems = this.dom.$content.length;
452
-
453
- // init Structure
454
- if (this.num.oItems !== 0) {
455
- this.initStructure();
456
- }
457
- };
458
-
459
- /**
460
- * Initializes the content struture.
461
- * @protected
462
- */
463
- Owl.prototype.initStructure = function() {
464
- this.createNormalStructure();
465
- };
466
-
467
- /**
468
- * Creates small/mid weight content structure.
469
- * @protected
470
- * @todo This results in a poor performance,
471
- * but this is due to the approach of completely
472
- * rebuild the existing DOM tree from scratch,
473
- * rather to use them. The effort to implement
474
- * this with a good performance, while maintaining
475
- * the original approach is disproportionate.
476
- */
477
- Owl.prototype.createNormalStructure = function() {
478
- var i, $item;
479
- for (i = 0; i < this.num.oItems; i++) {
480
- $item = this.createItemContainer();
481
- this.initializeItemContainer($item, this.dom.$content[i]);
482
- this.dom.$stage.append($item);
483
- }
484
- this.dom.$content = null;
485
- };
486
-
487
- /**
488
- * Creates custom content structure.
489
- * @protected
490
- */
491
- Owl.prototype.createCustomStructure = function(howManyItems) {
492
- var i, $item;
493
- for (i = 0; i < howManyItems; i++) {
494
- $item = this.createItemContainer();
495
- this.createItemContainerData($item);
496
- this.dom.$stage.append($item);
497
- }
498
- };
499
-
500
- /**
501
- * Initializes item container with provided content.
502
- * @protected
503
- * @param {jQuery} item - The item that has to be filled.
504
- * @param {HTMLElement|jQuery|string} content - The content that fills the item.
505
- */
506
- Owl.prototype.initializeItemContainer = function(item, content) {
507
- this.trigger('change', { property: { name: 'item', value: item } });
508
-
509
- this.createItemContainerData(item);
510
- item.append(content);
511
-
512
- this.trigger('changed', { property: { name: 'item', value: item } });
513
- };
514
-
515
- /**
516
- * Creates item container data.
517
- * @protected
518
- * @param {jQuery} item - The item for which the data are to be set.
519
- * @param {jQuery} [source] - The item whose data are to be copied.
520
- */
521
- Owl.prototype.createItemContainerData = function(item, source) {
522
- var data = $.extend({}, this.itemData);
523
-
524
- if (source) {
525
- $.extend(data, source.data('owl-item'));
526
- }
527
-
528
- item.data('owl-item', data);
529
- };
530
-
531
- /**
532
- * Clones an item container.
533
- * @protected
534
- * @param {jQuery} item - The item to clone.
535
- * @returns {jQuery} - The cloned item.
536
- */
537
- Owl.prototype.cloneItemContainer = function(item) {
538
- var $clone = item.clone(true, true).addClass('cloned');
539
- // somehow data references the same object
540
- this.createItemContainerData($clone, $clone);
541
- $clone.data('owl-item').clone = true;
542
- return $clone;
543
- };
544
-
545
- /**
546
- * Updates original items index data.
547
- * @protected
548
- */
549
- Owl.prototype.updateLocalContent = function() {
550
-
551
- var k, item;
552
-
553
- this.dom.$oItems = this.dom.$stage.find('.' + this.settings.itemClass).filter(function() {
554
- return $(this).data('owl-item').clone === false;
555
- });
556
-
557
- this.num.oItems = this.dom.$oItems.length;
558
- // update index on original items
559
-
560
- for (k = 0; k < this.num.oItems; k++) {
561
- item = this.dom.$oItems.eq(k);
562
- item.data('owl-item').index = k;
563
- }
564
- };
565
-
566
- /**
567
- * Creates clones for infinity loop.
568
- * @protected
569
- */
570
- Owl.prototype.loopClone = function() {
571
- if (!this.settings.loop || this.num.oItems < this.settings.items) {
572
- return false;
573
- }
574
-
575
- var append, prepend, i,
576
- items = this.settings.items,
577
- last = this.num.oItems - 1;
578
-
579
- // if neighbour margin then add one more duplicat
580
- if (this.settings.stagePadding && this.settings.items === 1) {
581
- items += 1;
582
- }
583
- this.num.cItems = items * 2;
584
-
585
- for (i = 0; i < items; i++) {
586
- append = this.cloneItemContainer(this.dom.$oItems.eq(i));
587
- prepend = this.cloneItemContainer(this.dom.$oItems.eq(last - i));
588
-
589
- this.dom.$stage.append(append);
590
- this.dom.$stage.prepend(prepend);
591
- }
592
-
593
- this.dom.$cItems = this.dom.$stage.find('.' + this.settings.itemClass).filter(function() {
594
- return $(this).data('owl-item').clone === true;
595
- });
596
- };
597
-
598
- /**
599
- * Update cloned elements.
600
- * @protected
601
- */
602
- Owl.prototype.reClone = function() {
603
- // remove cloned items
604
- if (this.dom.$cItems !== null) { // && (this.num.oItems !== 0 &&
605
- // this.num.oItems <=
606
- // this.settings.items)){
607
- this.dom.$cItems.remove();
608
- this.dom.$cItems = null;
609
- this.num.cItems = 0;
610
- }
611
-
612
- if (!this.settings.loop) {
613
- return;
614
- }
615
- // generete new elements
616
- this.loopClone();
617
- };
618
-
619
- /**
620
- * Updates all items index data.
621
  * @protected
 
622
  */
623
- Owl.prototype.calculate = function() {
624
-
625
- var i, j, elMinusMargin, dist, allItems, iWidth, mergeNumber, posLeft = 0, fullWidth = 0;
626
-
627
- // element width minus neighbour
628
- this.width.el = this.dom.$el.width() - (this.settings.stagePadding * 2);
629
-
630
- // to check
631
- this.width.view = this.dom.$el.width();
632
-
633
- // calculate width minus addition margins
634
- elMinusMargin = this.width.el - (this.settings.margin * (this.settings.items === 1 ? 0 : this.settings.items - 1));
635
-
636
- // calculate element width and item width
637
- this.width.el = this.width.el + this.settings.margin;
638
- this.width.item = ((elMinusMargin / this.settings.items) + this.settings.margin).toFixed(3);
639
-
640
- this.dom.$items = this.dom.$stage.find('.owl-item');
641
- this.num.items = this.dom.$items.length;
642
-
643
- // change to autoWidths
644
- if (this.settings.autoWidth) {
645
- this.dom.$items.css('width', '');
646
- }
647
-
648
- // Set grid array
649
- this._coordinates = [];
650
- this.num.merged = [];
651
-
652
- // item distances
653
- if (this.settings.rtl) {
654
- dist = this.settings.center ? -((this.width.el) / 2) : 0;
655
- } else {
656
- dist = this.settings.center ? (this.width.el) / 2 : 0;
657
- }
658
-
659
- this.width.mergeStage = 0;
660
-
661
- // Calculate items positions
662
- for (i = 0; i < this.num.items; i++) {
663
-
664
- // check merged items
665
-
666
- if (this.settings.merge) {
667
- mergeNumber = this.dom.$items.eq(i).find('[data-merge]').attr('data-merge') || 1;
668
- if (this.settings.mergeFit && mergeNumber > this.settings.items) {
669
- mergeNumber = this.settings.items;
670
- }
671
- this.num.merged.push(parseInt(mergeNumber));
672
- this.width.mergeStage += this.width.item * this.num.merged[i];
673
- } else {
674
- this.num.merged.push(1);
675
- }
676
-
677
- iWidth = this.width.item * this.num.merged[i];
678
-
679
- // autoWidth item size
680
- if (this.settings.autoWidth) {
681
- iWidth = this.dom.$items.eq(i).width() + this.settings.margin;
682
- if (this.settings.rtl) {
683
- this.dom.$items[i].style.marginLeft = this.settings.margin + 'px';
684
- } else {
685
- this.dom.$items[i].style.marginRight = this.settings.margin + 'px';
686
- }
687
-
688
- }
689
- // push item position into array
690
- this._coordinates.push(dist);
691
-
692
- // update item data
693
- this.dom.$items.eq(i).data('owl-item').posLeft = posLeft;
694
- this.dom.$items.eq(i).data('owl-item').width = iWidth;
695
-
696
- // dist starts from middle of stage if center
697
- // posLeft always starts from 0
698
- if (this.settings.rtl) {
699
- dist += iWidth;
700
- posLeft += iWidth;
701
- } else {
702
- dist -= iWidth;
703
- posLeft -= iWidth;
704
- }
705
-
706
- fullWidth -= Math.abs(iWidth);
707
 
708
- // update position if center
709
- if (this.settings.center) {
710
- this._coordinates[i] = !this.settings.rtl ? this._coordinates[i] - (iWidth / 2) : this._coordinates[i]
711
- + (iWidth / 2);
712
- }
713
  }
714
 
715
- if (this.settings.autoWidth) {
716
- this.width.stage = this.settings.center ? Math.abs(fullWidth) : Math.abs(dist);
717
- } else {
718
- this.width.stage = Math.abs(fullWidth);
719
- }
720
-
721
- // update indexAbs on all items
722
- allItems = this.num.oItems + this.num.cItems;
723
 
724
- for (j = 0; j < allItems; j++) {
725
- this.dom.$items.eq(j).data('owl-item').indexAbs = j;
726
- }
727
-
728
- // Recalculate grid
729
- this.setSizes();
730
  };
731
 
732
  /**
733
- * Set sizes on elements from `collectData`.
734
- * @protected
735
- * @todo CRAZY FIX!!! Doublecheck this!
736
  */
737
- Owl.prototype.setSizes = function() {
738
-
739
- // show neighbours
740
- if (this.settings.stagePadding !== false) {
741
- this.dom.oStage.style.paddingLeft = this.settings.stagePadding + 'px';
742
- this.dom.oStage.style.paddingRight = this.settings.stagePadding + 'px';
743
- }
744
-
745
- // if(this.width.stagePrev > this.width.stage){
746
- if (this.settings.rtl) {
747
- window.setTimeout($.proxy(function() {
748
- this.dom.stage.style.width = this.width.stage + 'px';
749
- }, this), 0);
750
- } else {
751
- this.dom.stage.style.width = this.width.stage + 'px';
752
- }
753
-
754
- for (var i = 0; i < this.num.items; i++) {
755
-
756
- // Set items width
757
- if (!this.settings.autoWidth) {
758
- this.dom.$items[i].style.width = this.width.item - (this.settings.margin) + 'px';
759
- }
760
- // add margin
761
- if (this.settings.rtl) {
762
- this.dom.$items[i].style.marginLeft = this.settings.margin + 'px';
763
- } else {
764
- this.dom.$items[i].style.marginRight = this.settings.margin + 'px';
765
- }
766
 
767
- if (this.num.merged[i] !== 1 && !this.settings.autoWidth) {
768
- this.dom.$items[i].style.width = (this.width.item * this.num.merged[i]) - (this.settings.margin) + 'px';
 
769
  }
 
770
  }
771
 
772
- // save prev stage size
773
- this.width.stagePrev = this.width.stage;
774
  };
775
 
776
  /**
777
- * Updates all data by calling `refresh`.
778
- * @protected
 
 
779
  */
780
- Owl.prototype.responsive = function() {
781
-
782
- if (!this.num.oItems) {
783
- return false;
784
- }
785
- // If El width hasnt change then stop responsive
786
- var elChanged = this.isElWidthChanged();
787
- if (!elChanged) {
788
- return false;
789
  }
790
-
791
- if (this.trigger('resize').isDefaultPrevented()) {
792
- return false;
793
- }
794
-
795
- this.state.responsive = true;
796
- this.refresh();
797
- this.state.responsive = false;
798
-
799
- this.trigger('resized');
800
  };
801
 
802
  /**
@@ -804,43 +560,25 @@
804
  * @public
805
  */
806
  Owl.prototype.refresh = function() {
807
- var current = this.dom.$oItems && this.dom.$oItems.eq(this.normalize(this.current(), true));
 
 
808
 
809
- this.trigger('refresh');
810
 
811
- // Update Options for given width
812
- this.setResponsiveOptions();
813
 
814
- // update info about local content
815
- this.updateLocalContent();
816
 
817
- // udpate options
818
  this.optionsLogic();
819
 
820
- // if no items then stop
821
- if (this.num.oItems === 0) {
822
- return false;
823
- }
824
 
825
- // Hide and Show methods helps here to set a proper widths.
826
- // This prevents Scrollbar to be calculated in stage width
827
- this.dom.$stage.addClass('owl-refresh');
828
 
829
- // Remove clones and generate new ones
830
- this.reClone();
831
-
832
- // calculate
833
- this.calculate();
834
-
835
- // aaaand show.
836
- this.dom.$stage.removeClass('owl-refresh');
837
-
838
- if (!current) {
839
- this.dom.oStage.scrollLeft = 0;
840
- this.reset(this.dom.$oItems.eq(0).data('owl-item').indexAbs);
841
- } else {
842
- this.reset(current.data('owl-item').indexAbs); // fix that
843
- }
844
 
845
  this.state.orientation = window.orientation;
846
 
@@ -849,81 +587,6 @@
849
  this.trigger('refreshed');
850
  };
851
 
852
- /**
853
- * Updates information about current state of items (visibile, hidden, active, etc.).
854
- * @protected
855
- */
856
- Owl.prototype.updateActiveItems = function() {
857
- this.trigger('change', { property: { name: 'items', value: this.dom.$items } });
858
-
859
- var i, j, item, ipos, iwidth, outsideView;
860
-
861
- // clear states
862
- for (i = 0; i < this.num.items; i++) {
863
- this.dom.$items.eq(i).data('owl-item').active = false;
864
- this.dom.$items.eq(i).data('owl-item').current = false;
865
- this.dom.$items.eq(i).removeClass(this.settings.activeClass).removeClass(this.settings.centerClass);
866
- }
867
-
868
- this.num.active = 0;
869
- padding = this.settings.stagePadding * 2;
870
- stageX = this.coordinates(this.current()) + padding;
871
- view = this.settings.rtl ? this.width.view : -this.width.view;
872
-
873
- for (j = 0; j < this.num.items; j++) {
874
-
875
- item = this.dom.$items.eq(j);
876
- ipos = item.data('owl-item').posLeft;
877
- iwidth = item.data('owl-item').width;
878
- outsideView = this.settings.rtl ? ipos - iwidth - padding : ipos - iwidth + padding;
879
-
880
- if ((this.op(ipos, '<=', stageX) && (this.op(ipos, '>', stageX + view)))
881
- || (this.op(outsideView, '<', stageX) && this.op(outsideView, '>', stageX + view))) {
882
-
883
- this.num.active++;
884
-
885
- item.data('owl-item').active = true;
886
- item.data('owl-item').current = true;
887
- item.addClass(this.settings.activeClass);
888
-
889
- if (!this.settings.lazyLoad) {
890
- item.data('owl-item').loaded = true;
891
- }
892
- if (this.settings.loop) {
893
- this.updateClonedItemsState(item.data('owl-item').index);
894
- }
895
- }
896
- }
897
-
898
- if (this.settings.center) {
899
- this.dom.$items.eq(this.current()).addClass(this.settings.centerClass).data('owl-item').center = true;
900
- }
901
- this.trigger('changed', { property: { name: 'items', value: this.dom.$items } });
902
- };
903
-
904
- /**
905
- * Sets current state on sibilings items for center.
906
- * @protected
907
- */
908
- Owl.prototype.updateClonedItemsState = function(activeIndex) {
909
-
910
- // find cloned center
911
- var center, $el, i;
912
- if (this.settings.center) {
913
- center = this.dom.$items.eq(this.current()).data('owl-item').index;
914
- }
915
-
916
- for (i = 0; i < this.num.items; i++) {
917
- $el = this.dom.$items.eq(i);
918
- if ($el.data('owl-item').index === activeIndex) {
919
- $el.data('owl-item').current = true;
920
- if ($el.data('owl-item').index === center) {
921
- $el.addClass(this.settings.centerClass);
922
- }
923
- }
924
- }
925
- };
926
-
927
  /**
928
  * Save internal event references and add event based functions.
929
  * @protected
@@ -939,15 +602,12 @@
939
  this.e._onDragEnd = $.proxy(function(e) {
940
  this.onDragEnd(e);
941
  }, this);
 
 
 
942
  this.e._transitionEnd = $.proxy(function(e) {
943
  this.transitionEnd(e);
944
  }, this);
945
- this.e._resizer = $.proxy(function() {
946
- this.responsiveTimer();
947
- }, this);
948
- this.e._responsiveCall = $.proxy(function() {
949
- this.responsive();
950
- }, this);
951
  this.e._preventClick = $.proxy(function(e) {
952
  this.preventClick(e);
953
  }, this);
@@ -957,14 +617,53 @@
957
  * Checks window `resize` event.
958
  * @protected
959
  */
960
- Owl.prototype.responsiveTimer = function() {
961
- if (this.viewport() === this.width.prevWindow) {
 
 
 
 
 
 
 
 
 
962
  return false;
963
  }
964
- window.clearTimeout(this.resizeTimer);
965
 
966
- this.resizeTimer = window.setTimeout(this.e._responsiveCall, this.settings.responsiveRefreshRate);
967
- this.width.prevWindow = this.viewport();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
968
  };
969
 
970
  /**
@@ -975,60 +674,26 @@
975
  var isTouch = isTouchSupport(),
976
  isTouchIE = isTouchSupportIE();
977
 
978
- if (isTouch && !isTouchIE) {
979
- this.dragType = [ 'touchstart', 'touchmove', 'touchend', 'touchcancel' ];
980
- } else if (isTouch && isTouchIE) {
981
- this.dragType = [ 'MSPointerDown', 'MSPointerMove', 'MSPointerUp', 'MSPointerCancel' ];
982
  } else {
983
- this.dragType = [ 'mousedown', 'mousemove', 'mouseup' ];
984
  }
985
 
986
- if ((isTouch || isTouchIE) && this.settings.touchDrag) {
987
- // touch cancel event
988
- this.on(document, this.dragType[3], this.e._onDragEnd);
989
-
990
- } else {
991
- // firefox startdrag fix - addeventlistener doesnt work here :/
992
- this.dom.$stage.on('dragstart', function() {
993
- return false;
994
- });
995
-
996
- if (this.settings.mouseDrag) {
997
- // disable text select
998
- this.dom.stage.onselectstart = function() {
999
- return false;
1000
- };
1001
- } else {
1002
- // enable text select
1003
- this.dom.$el.addClass('owl-text-select-on');
1004
- }
1005
  }
1006
 
1007
- // Catch transitionEnd event
1008
  if (this.transitionEndVendor) {
1009
- this.on(this.dom.stage, this.transitionEndVendor, this.e._transitionEnd, false);
1010
  }
1011
 
1012
- // Responsive
1013
  if (this.settings.responsive !== false) {
1014
- this.on(window, 'resize', this.e._resizer, false);
1015
- }
1016
-
1017
- this.dragEvents();
1018
- };
1019
-
1020
- /**
1021
- * Triggers event handlers for drag events.
1022
- * @protected
1023
- */
1024
- Owl.prototype.dragEvents = function() {
1025
-
1026
- if (this.settings.touchDrag && (this.dragType[0] === 'touchstart' || this.dragType[0] === 'MSPointerDown')) {
1027
- this.on(this.dom.stage, this.dragType[0], this.e._onDragStart, false);
1028
- } else if (this.settings.mouseDrag && this.dragType[0] === 'mousedown') {
1029
- this.on(this.dom.stage, this.dragType[0], this.e._onDragStart, false);
1030
- } else {
1031
- this.off(this.dom.stage, this.dragType[0], this.e._onDragStart);
1032
  }
1033
  };
1034
 
@@ -1043,12 +708,12 @@
1043
  ev = event.originalEvent || event || window.event;
1044
 
1045
  // prevent right click
1046
- if (ev.which === 3) {
1047
  return false;
1048
  }
1049
 
1050
- if (this.dragType[0] === 'mousedown') {
1051
- this.dom.$stage.addClass('owl-grab');
1052
  }
1053
 
1054
  this.trigger('drag');
@@ -1059,17 +724,15 @@
1059
  this.state.isSwiping = false;
1060
  this.drag.distance = 0;
1061
 
1062
- // if is 'touchstart'
1063
- isTouchEvent = ev.type === 'touchstart';
1064
- pageX = isTouchEvent ? event.targetTouches[0].pageX : (ev.pageX || ev.clientX);
1065
- pageY = isTouchEvent ? event.targetTouches[0].pageY : (ev.pageY || ev.clientY);
1066
 
1067
  // get stage position left
1068
- this.drag.offsetX = this.dom.$stage.position().left - this.settings.stagePadding;
1069
- this.drag.offsetY = this.dom.$stage.position().top;
1070
 
1071
  if (this.settings.rtl) {
1072
- this.drag.offsetX = this.dom.$stage.position().left + this.width.stage - this.width.el
1073
  + this.settings.margin;
1074
  }
1075
 
@@ -1097,8 +760,7 @@
1097
  this.drag.targetEl.draggable = false;
1098
  }
1099
 
1100
- this.on(document, this.dragType[1], this.e._onDragMove, false);
1101
- this.on(document, this.dragType[2], this.e._onDragEnd, false);
1102
  };
1103
 
1104
  /**
@@ -1120,10 +782,8 @@
1120
 
1121
  ev = event.originalEvent || event || window.event;
1122
 
1123
- // if is 'touchstart'
1124
- isTouchEvent = ev.type == 'touchmove';
1125
- pageX = isTouchEvent ? ev.targetTouches[0].pageX : (ev.pageX || ev.clientX);
1126
- pageY = isTouchEvent ? ev.targetTouches[0].pageY : (ev.pageY || ev.clientY);
1127
 
1128
  // Drag Direction
1129
  this.drag.currentX = pageX - this.drag.startX;
@@ -1139,9 +799,9 @@
1139
  // Loop
1140
  if (this.settings.loop) {
1141
  if (this.op(this.drag.currentX, '>', this.coordinates(this.minimum())) && this.state.direction === 'right') {
1142
- this.drag.currentX -= (this.settings.center && this.coordinates(0)) - this.coordinates(this.num.oItems);
1143
  } else if (this.op(this.drag.currentX, '<', this.coordinates(this.maximum())) && this.state.direction === 'left') {
1144
- this.drag.currentX += (this.settings.center && this.coordinates(0)) - this.coordinates(this.num.oItems);
1145
  }
1146
  } else {
1147
  // pull
@@ -1177,14 +837,15 @@
1177
  * Handles the touchend/mouseup events.
1178
  * @protected
1179
  */
1180
- Owl.prototype.onDragEnd = function() {
1181
  var compareTimes, distanceAbs, closest;
1182
 
1183
  if (!this.state.isTouch) {
1184
  return;
1185
  }
1186
- if (this.dragType[0] === 'mousedown') {
1187
- this.dom.$stage.removeClass('owl-grab');
 
1188
  }
1189
 
1190
  this.trigger('dragged');
@@ -1219,6 +880,8 @@
1219
 
1220
  this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed);
1221
  this.current(closest);
 
 
1222
 
1223
  // if pullDrag is off then fire transitionEnd event manually when stick
1224
  // to border
@@ -1228,8 +891,7 @@
1228
 
1229
  this.drag.distance = 0;
1230
 
1231
- this.off(document, this.dragType[1], this.e._onDragMove);
1232
- this.off(document, this.dragType[2], this.e._onDragEnd);
1233
  };
1234
 
1235
  /**
@@ -1271,8 +933,8 @@
1271
  Owl.prototype.getTransformProperty = function() {
1272
  var transform, matrix3d;
1273
 
1274
- transform = window.getComputedStyle(this.dom.stage, null).getPropertyValue(this.vendorName + 'transform');
1275
- // var transform = this.dom.$stage.css(this.vendorName + 'transform')
1276
  transform = transform.replace(/matrix(3d)?\(|\)/g, '').split(',');
1277
  matrix3d = transform.length === 16;
1278
 
@@ -1281,30 +943,32 @@
1281
 
1282
  /**
1283
  * Gets absolute position of the closest item for a coordinate.
 
1284
  * @protected
1285
  * @param {Number} coordinate - The coordinate in pixel.
1286
  * @return {Number} - The absolute position of the closest item.
1287
  */
1288
  Owl.prototype.closest = function(coordinate) {
1289
- var position = 0, pull = 30;
1290
 
1291
  if (!this.settings.freeDrag) {
1292
  // check closest item
1293
- $.each(this.coordinates(), $.proxy(function(index, value) {
1294
  if (coordinate > value - pull && coordinate < value + pull) {
1295
  position = index;
1296
  } else if (this.op(coordinate, '<', value)
1297
- && this.op(coordinate, '>', this.coordinates(index + 1) || value - this.width.el)) {
1298
  position = this.state.direction === 'left' ? index + 1 : index;
1299
  }
 
1300
  }, this));
1301
  }
1302
 
1303
  if (!this.settings.loop) {
1304
  // non loop boundries
1305
- if (this.op(coordinate, '>', this.coordinates(this.minimum()))) {
1306
  position = coordinate = this.minimum();
1307
- } else if (this.op(coordinate, '<', this.coordinates(this.maximum()))) {
1308
  position = coordinate = this.maximum();
1309
  }
1310
  }
@@ -1322,16 +986,16 @@
1322
  this.state.inMotion = this.speed() > 0;
1323
 
1324
  if (this.support3d) {
1325
- this.dom.$stage.css({
1326
  transform: 'translate3d(' + coordinate + 'px' + ',0px, 0px)',
1327
  transition: (this.speed() / 1000) + 's'
1328
  });
1329
  } else if (this.state.isTouch) {
1330
- this.dom.$stage.css({
1331
  left: coordinate + 'px'
1332
  });
1333
  } else {
1334
- this.dom.$stage.animate({
1335
  left: coordinate
1336
  }, this.speed() / 1000, this.settings.fallbackEasing, $.proxy(function() {
1337
  if (this.state.inMotion) {
@@ -1352,15 +1016,13 @@
1352
  return this._current;
1353
  }
1354
 
1355
- if (this.num.oItems === 0) {
1356
  return undefined;
1357
  }
1358
 
1359
  position = this.normalize(position);
1360
 
1361
- if (this._current === position) {
1362
- this.animate(this.coordinates(this._current));
1363
- } else {
1364
  var event = this.trigger('change', { property: { name: 'position', value: position } });
1365
 
1366
  if (event.data !== undefined) {
@@ -1369,9 +1031,7 @@
1369
 
1370
  this._current = position;
1371
 
1372
- this.animate(this.coordinates(this._current));
1373
-
1374
- this.updateActiveItems();
1375
 
1376
  this.trigger('changed', { property: { name: 'position', value: this._current } });
1377
  }
@@ -1379,84 +1039,173 @@
1379
  return this._current;
1380
  };
1381
 
 
 
 
 
 
 
 
 
1382
  /**
1383
  * Resets the absolute position of the current item.
1384
  * @public
1385
  * @param {Number} position - The absolute position of the new item.
1386
  */
1387
  Owl.prototype.reset = function(position) {
1388
- this.suppress([ 'change', 'changed' ]);
1389
- this.speed(0);
1390
- this.current(position);
1391
- this.release([ 'change', 'changed' ]);
 
 
 
 
 
 
 
 
 
 
1392
  };
1393
 
1394
  /**
1395
- * Normalizes an absolute position for an item.
1396
  * @public
1397
- * @param {Number} position - The absolute position to normalize.
1398
- * @param {Boolean} [relative=false] - Whether to return a relative position or not.
1399
- * @return {Number} - The normalized position.
1400
  */
1401
  Owl.prototype.normalize = function(position, relative) {
1402
- if (position === undefined || !this.dom.$items) {
 
 
1403
  return undefined;
1404
  }
1405
 
1406
- if (this.settings.loop) {
1407
- var n = this.dom.$items.length;
1408
  position = ((position % n) + n) % n;
1409
  } else {
1410
- position = Math.max(this.minimum(), Math.min(this.maximum(), position));
1411
  }
1412
 
1413
- return relative ? this.dom.$items.eq(position).data('owl-item').index : position;
 
 
 
 
 
 
 
 
 
 
 
 
1414
  };
1415
 
1416
  /**
1417
- * Gets the absolute maximum position for an item.
1418
  * @public
 
1419
  * @returns {Number}
1420
  */
1421
- Owl.prototype.maximum = function() {
1422
- var maximum, width,
1423
  settings = this.settings;
1424
 
 
 
 
 
1425
  if (!settings.loop && settings.center) {
1426
- maximum = this.num.oItems - 1;
1427
  } else if (!settings.loop && !settings.center) {
1428
- maximum = this.num.oItems - settings.items;
1429
  } else if (settings.loop || settings.center) {
1430
- maximum = this.num.oItems + settings.items;
1431
  } else if (settings.autoWidth || settings.merge) {
1432
  revert = settings.rtl ? 1 : -1;
1433
- width = this.dom.$stage.width() - this.$el.width();
1434
- $.each(this.coordinates(), function(index, coordinate) {
1435
  if (coordinate * revert >= width) {
1436
- return false;
1437
  }
1438
- maximum = index + 1;
1439
- });
1440
  } else {
1441
  throw 'Can not detect maximum absolute position.'
1442
  }
1443
 
1444
- return maximum;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1445
  };
1446
 
1447
  /**
1448
- * Gets the absolute minimum position for an item.
1449
  * @public
1450
- * @returns {Number}
 
1451
  */
1452
- Owl.prototype.minimum = function() {
1453
- return this.dom.$oItems.eq(0).data('owl-item').indexAbs;
 
 
 
 
 
 
 
 
1454
  };
1455
 
1456
  /**
1457
  * Sets the current animation speed.
1458
  * @public
1459
- * @param {Number} [speed] - The animation speed in millisecondsor nothing to leave it unchanged.
1460
  * @returns {Number} - The current animation speed in milliseconds.
1461
  */
1462
  Owl.prototype.speed = function(speed) {
@@ -1468,13 +1217,29 @@
1468
  };
1469
 
1470
  /**
1471
- * Gets the coordinate for an item.
 
1472
  * @public
1473
- * @param {Number} [position] - The absolute position of the item.
1474
  * @returns {Number|Array.<Number>} - The coordinate of the item in pixel or all coordinates.
1475
  */
1476
  Owl.prototype.coordinates = function(position) {
1477
- return position !== undefined ? this._coordinates[position] : this._coordinates;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1478
  };
1479
 
1480
  /**
@@ -1497,27 +1262,30 @@
1497
  */
1498
  Owl.prototype.to = function(position, speed) {
1499
  if (this.settings.loop) {
1500
- var distance = position - this.normalize(this.current(), true),
1501
  revert = this.current(),
1502
  before = this.current(),
1503
  after = this.current() + distance,
1504
- direction = before - after < 0 ? true : false;
 
1505
 
1506
  if (after < this.settings.items && direction === false) {
1507
- revert = this.num.items - (this.settings.items - before) - this.settings.items;
1508
  this.reset(revert);
1509
- } else if (after >= this.num.items - this.settings.items && direction === true) {
1510
- revert = before - this.num.oItems;
1511
  this.reset(revert);
1512
  }
1513
  window.clearTimeout(this.e._goToLoop);
1514
  this.e._goToLoop = window.setTimeout($.proxy(function() {
1515
  this.speed(this.duration(this.current(), revert + distance, speed));
1516
  this.current(revert + distance);
 
1517
  }, this), 30);
1518
  } else {
1519
  this.speed(this.duration(this.current(), position, speed));
1520
  this.current(position);
 
1521
  }
1522
  };
1523
 
@@ -1528,7 +1296,7 @@
1528
  */
1529
  Owl.prototype.next = function(speed) {
1530
  speed = speed || false;
1531
- this.to(this.normalize(this.current(), true) + 1, speed);
1532
  };
1533
 
1534
  /**
@@ -1538,7 +1306,7 @@
1538
  */
1539
  Owl.prototype.prev = function(speed) {
1540
  speed = speed || false;
1541
- this.to(this.normalize(this.current(), true) - 1, speed);
1542
  };
1543
 
1544
  /**
@@ -1553,8 +1321,7 @@
1553
  event.stopPropagation();
1554
 
1555
  // Catch only owl-stage transitionEnd event
1556
- var eventTarget = event.target || event.srcElement || event.originalTarget;
1557
- if (eventTarget !== this.dom.stage) {
1558
  return false;
1559
  }
1560
  }
@@ -1563,18 +1330,6 @@
1563
  this.trigger('translated');
1564
  };
1565
 
1566
- /**
1567
- * Checks if element width has changed
1568
- * @protected
1569
- * @returns {Booelan}
1570
- */
1571
- Owl.prototype.isElWidthChanged = function() {
1572
- var newElWidth = this.dom.$el.width() - this.settings.stagePadding, // to
1573
- // check
1574
- prevElWidth = this.width.el + this.settings.margin;
1575
- return newElWidth !== prevElWidth;
1576
- };
1577
-
1578
  /**
1579
  * Gets viewport width.
1580
  * @protected
@@ -1599,47 +1354,81 @@
1599
  * @public
1600
  * @param {HTMLElement|jQuery|String} content - The new content.
1601
  */
1602
- Owl.prototype.insertContent = function(content) {
1603
- this.dom.$stage.empty();
1604
- this.fetchContent(content);
1605
- this.refresh();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1606
  };
1607
 
1608
  /**
1609
  * Adds an item.
 
1610
  * @public
1611
  * @param {HTMLElement|jQuery|String} content - The item content to add.
1612
- * @param {Number} [position=0] - The position at which to insert the item.
1613
  */
1614
- Owl.prototype.addItem = function(content, position) {
1615
- var $item = this.createItemContainer();
1616
 
1617
- position = position || 0;
1618
- // wrap content
1619
- this.initializeItemContainer($item, content);
1620
- // if carousel is empty then append item
1621
- if (this.dom.$oItems.length === 0) {
1622
- this.dom.$stage.append($item);
1623
  } else {
1624
- // append item
1625
- if (pos !== -1) {
1626
- this.dom.$oItems.eq(position).before($item);
1627
- } else {
1628
- this.dom.$oItems.eq(position).after($item);
1629
- }
1630
  }
1631
- // update and calculate carousel
1632
- this.refresh();
 
 
1633
  };
1634
 
1635
  /**
1636
- * Removes an item.
 
1637
  * @public
1638
- * @param {Number} pos - The position of the item.
1639
  */
1640
- Owl.prototype.removeItem = function(pos) {
1641
- this.dom.$oItems.eq(pos).remove();
1642
- this.refresh();
 
 
 
 
 
 
 
 
 
 
 
 
 
1643
  };
1644
 
1645
  /**
@@ -1663,11 +1452,11 @@
1663
  'to': this.to,
1664
  'destroy': this.destroy,
1665
  'refresh': this.refresh,
1666
- 'replace': this.insertContent,
1667
- 'add': this.addItem,
1668
- 'remove': this.removeItem
1669
  }, $.proxy(function(event, callback) {
1670
- this.dom.$el.on(event + '.owl.carousel', handler(callback, event + '.owl.carousel'));
1671
  }, this));
1672
 
1673
  };
@@ -1679,8 +1468,8 @@
1679
  Owl.prototype.watchVisibility = function() {
1680
 
1681
  // test on zepto
1682
- if (!isElVisible(this.dom.el)) {
1683
- this.dom.$el.addClass('owl-hidden');
1684
  window.clearInterval(this.e._checkVisibile);
1685
  this.e._checkVisibile = window.setInterval($.proxy(checkVisible, this), 500);
1686
  }
@@ -1690,8 +1479,8 @@
1690
  }
1691
 
1692
  function checkVisible() {
1693
- if (isElVisible(this.dom.el)) {
1694
- this.dom.$el.removeClass('owl-hidden');
1695
  this.refresh();
1696
  window.clearInterval(this.e._checkVisibile);
1697
  }
@@ -1718,7 +1507,7 @@
1718
  $el.css('opacity', 1);
1719
  if (loaded >= imgs.length) {
1720
  that.state.imagesLoaded = true;
1721
- that.init();
1722
  }
1723
  };
1724
 
@@ -1732,50 +1521,39 @@
1732
  */
1733
  Owl.prototype.destroy = function() {
1734
 
1735
- if (this.dom.$el.hasClass(this.settings.themeClass)) {
1736
- this.dom.$el.removeClass(this.settings.themeClass);
1737
  }
1738
 
1739
  if (this.settings.responsive !== false) {
1740
- this.off(window, 'resize', this.e._resizer);
1741
  }
1742
 
1743
  if (this.transitionEndVendor) {
1744
- this.off(this.dom.stage, this.transitionEndVendor, this.e._transitionEnd);
1745
  }
1746
 
1747
- for ( var i in this.plugins) {
1748
- this.plugins[i].destroy();
1749
  }
1750
 
1751
  if (this.settings.mouseDrag || this.settings.touchDrag) {
1752
- this.off(this.dom.stage, this.dragType[0], this.e._onDragStart);
1753
- if (this.settings.mouseDrag) {
1754
- this.off(document, this.dragType[3], this.e._onDragStart);
1755
- }
1756
- if (this.settings.mouseDrag) {
1757
- this.dom.$stage.off('dragstart', function() {
1758
- return false;
1759
- });
1760
- this.dom.stage.onselectstart = function() {
1761
- };
1762
- }
1763
  }
1764
 
1765
- // Remove event handlers in the ".owl.carousel" namespace
1766
- this.dom.$el.off('.owl');
1767
 
1768
- if (this.dom.$cItems !== null) {
1769
- this.dom.$cItems.remove();
1770
- }
1771
  this.e = null;
1772
- this.dom.$el.data('owlCarousel', null);
1773
- delete this.dom.el.owlCarousel;
1774
 
1775
- this.dom.$stage.unwrap();
1776
- this.dom.$items.unwrap();
1777
- this.dom.$items.contents().unwrap();
1778
- this.dom = null;
1779
  };
1780
 
1781
  /**
@@ -1788,16 +1566,16 @@
1788
  Owl.prototype.op = function(a, o, b) {
1789
  var rtl = this.settings.rtl;
1790
  switch (o) {
1791
- case '<':
1792
- return rtl ? a > b : a < b;
1793
- case '>':
1794
- return rtl ? a < b : a > b;
1795
- case '>=':
1796
- return rtl ? a <= b : a >= b;
1797
- case '<=':
1798
- return rtl ? a >= b : a <= b;
1799
- default:
1800
- break;
1801
  }
1802
  };
1803
 
@@ -1843,7 +1621,7 @@
1843
  */
1844
  Owl.prototype.trigger = function(name, data, namespace) {
1845
  var status = {
1846
- item: { count: this.num.oItems, index: this.current() }
1847
  }, handler = $.camelCase(
1848
  $.grep([ 'on', name, namespace ], function(v) { return v })
1849
  .join('-').toLowerCase()
@@ -1852,16 +1630,16 @@
1852
  $.extend({ relatedTarget: this }, status, data)
1853
  );
1854
 
1855
- if (!this._supress[event.type]) {
1856
- $.each(this.plugins, function(name, plugin) {
1857
  if (plugin.onTrigger) {
1858
  plugin.onTrigger(event);
1859
  }
1860
  });
1861
 
1862
- this.dom.$el.trigger(event);
1863
 
1864
- if (typeof this.settings[handler] === 'function') {
1865
  this.settings[handler].apply(this, event);
1866
  }
1867
  }
@@ -1913,6 +1691,38 @@
1913
  this.state.orientation = window.orientation;
1914
  };
1915
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1916
  /**
1917
  * Checks for CSS support.
1918
  * @private
@@ -1998,7 +1808,7 @@
1998
  })(window.Zepto || window.jQuery, window, document);
1999
 
2000
  /**
2001
- * LazyLoad Plugin
2002
  * @version 2.0.0
2003
  * @author Bartosz Wojciechowski
2004
  * @license The MIT License (MIT)
@@ -2006,105 +1816,128 @@
2006
  ;(function($, window, document, undefined) {
2007
 
2008
  /**
2009
- * Creates the lazy load plugin.
2010
- * @class The Lazy Load Plugin
2011
- * @param {Owl} scope - The Owl Carousel
2012
  */
2013
- LazyLoad = function(scope) {
2014
- this.owl = scope;
2015
- this.owl.options = $.extend({}, LazyLoad.Defaults, this.owl.options);
2016
 
2017
- this.handlers = {
2018
- 'changed.owl.carousel': $.proxy(function(e) {
2019
- if (e.property.name == 'items' && e.property.value && !e.property.value.is(':empty')) {
2020
- this.check();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2021
  }
2022
  }, this)
2023
  };
2024
 
2025
- this.owl.dom.$el.on(this.handlers);
2026
- };
 
 
 
 
2027
 
2028
  /**
2029
  * Default options.
2030
  * @public
2031
  */
2032
- LazyLoad.Defaults = {
2033
  lazyLoad: false
2034
- };
2035
 
2036
  /**
2037
- * Checks all items and if necessary, calls `preload`.
 
2038
  * @protected
2039
  */
2040
- LazyLoad.prototype.check = function() {
2041
- var attr = window.devicePixelRatio > 1 ? 'data-src-retina' : 'data-src',
2042
- src, img, i, $item;
2043
 
2044
- for (i = 0; i < this.owl.num.items; i++) {
2045
- $item = this.owl.dom.$items.eq(i);
2046
-
2047
- if ($item.data('owl-item').current === true && $item.data('owl-item').loaded === false) {
2048
- img = $item.find('.owl-lazy');
2049
- src = img.attr(attr);
2050
- src = src || img.attr('data-src');
2051
- if (src) {
2052
- img.css('opacity', '0');
2053
- this.preload(img, $item);
2054
- }
2055
- }
2056
  }
2057
- };
2058
-
2059
- /**
2060
- * Preloads the images of an item.
2061
- * @protected
2062
- * @param {jQuery} images - The images to load.
2063
- * @param {jQuery} $item - The item for which the images are loaded.
2064
- */
2065
- LazyLoad.prototype.preload = function(images, $item) {
2066
- var $el, img, srcType;
2067
-
2068
- images.each($.proxy(function(i, el) {
2069
 
2070
- this.owl.trigger('load', null, 'lazy');
 
 
2071
 
2072
- $el = $(el);
2073
- img = new Image();
2074
- srcType = window.devicePixelRatio > 1 ? $el.attr('data-src-retina') : $el.attr('data-src');
2075
- srcType = srcType || $el.attr('data-src');
2076
-
2077
- img.onload = $.proxy(function() {
2078
- $item.data('owl-item').loaded = true;
2079
- if ($el.is('img')) {
2080
- $el.attr('src', img.src);
2081
- } else {
2082
- $el.css('background-image', 'url(' + img.src + ')');
2083
- }
2084
 
2085
- $el.css('opacity', 1);
2086
- this.owl.trigger('loaded', null, 'lazy');
2087
- }, this);
2088
- img.src = srcType;
 
 
 
 
 
 
 
 
 
 
 
 
2089
  }, this));
2090
- };
 
 
2091
 
2092
  /**
2093
  * Destroys the plugin.
2094
  * @public
2095
  */
2096
- LazyLoad.prototype.destroy = function() {
2097
  var handler, property;
2098
 
2099
  for (handler in this.handlers) {
2100
- this.owl.dom.$el.off(handler, this.handlers[handler]);
2101
  }
2102
  for (property in Object.getOwnPropertyNames(this)) {
2103
  typeof this[property] != 'function' && (this[property] = null);
2104
  }
2105
- };
2106
 
2107
- $.fn.owlCarousel.Constructor.Plugins.lazyLoad = LazyLoad;
2108
 
2109
  })(window.Zepto || window.jQuery, window, document);
2110
 
@@ -2119,21 +1952,45 @@
2119
  /**
2120
  * Creates the auto height plugin.
2121
  * @class The Auto Height Plugin
2122
- * @param {Owl} scope - The Owl Carousel
2123
  */
2124
- AutoHeight = function(scope) {
2125
- this.owl = scope;
2126
- this.owl.options = $.extend({}, AutoHeight.Defaults, this.owl.options);
 
 
 
 
2127
 
2128
- this.handlers = {
 
 
 
 
 
 
 
 
 
 
2129
  'changed.owl.carousel': $.proxy(function(e) {
2130
- if (e.property.name == 'position' && this.owl.settings.autoHeight){
2131
- this.setHeight();
 
 
 
 
 
 
2132
  }
2133
  }, this)
2134
  };
2135
 
2136
- this.owl.dom.$el.on(this.handlers);
 
 
 
 
2137
  };
2138
 
2139
  /**
@@ -2146,44 +2003,26 @@
2146
  };
2147
 
2148
  /**
2149
- *
2150
- * @param {Boolean} callback - Whether
2151
- * @returns {Boolean}
2152
  */
2153
- AutoHeight.prototype.setHeight = function() {
2154
- var loaded = this.owl.dom.$items.eq(this.owl.current()),
2155
- stage = this.owl.dom.$oStage,
2156
- iterations = 0,
2157
- isLoaded;
2158
-
2159
- if (!this.owl.dom.$oStage.hasClass(this.owl.settings.autoHeightClass)) {
2160
- this.owl.dom.$oStage.addClass(this.owl.settings.autoHeightClass);
2161
- }
2162
-
2163
- isLoaded = window.setInterval(function() {
2164
- iterations += 1;
2165
- if (loaded.data('owl-item').loaded) {
2166
- stage.height(loaded.height() + 'px');
2167
- clearInterval(isLoaded);
2168
- } else if (iterations === 500) {
2169
- clearInterval(isLoaded);
2170
- }
2171
- }, 100);
2172
-
2173
  };
2174
 
2175
  AutoHeight.prototype.destroy = function() {
2176
  var handler, property;
2177
 
2178
- for (handler in this.handlers) {
2179
- this.owl.dom.$el.off(handler, this.handlers[handler]);
2180
  }
2181
  for (property in Object.getOwnPropertyNames(this)) {
2182
  typeof this[property] != 'function' && (this[property] = null);
2183
  }
2184
  };
2185
 
2186
- $.fn.owlCarousel.Constructor.Plugins.autoHeight = AutoHeight;
2187
 
2188
  })(window.Zepto || window.jQuery, window, document);
2189
 
@@ -2198,40 +2037,70 @@
2198
  /**
2199
  * Creates the video plugin.
2200
  * @class The Video Plugin
2201
- * @param {Owl} scope - The Owl Carousel
2202
  */
2203
- Video = function(scope) {
2204
- this.owl = scope;
2205
- this.owl.options = $.extend({}, Video.Defaults, this.owl.options);
 
 
 
 
2206
 
2207
- this.handlers = {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2208
  'resize.owl.carousel': $.proxy(function(e) {
2209
- if (this.owl.settings.video && !this.isInFullScreen()) {
2210
  e.preventDefault();
2211
  }
2212
  }, this),
2213
  'refresh.owl.carousel changed.owl.carousel': $.proxy(function(e) {
2214
- if (this.owl.state.videoPlay) {
2215
- this.stopVideo();
2216
- }
2217
- }, this),
2218
- 'refresh.owl.carousel refreshed.owl.carousel': $.proxy(function(e) {
2219
- if (!this.owl.settings.video) {
2220
- return false;
2221
  }
2222
- this.refreshing = e.type == 'refresh';
2223
  }, this),
2224
- 'changed.owl.carousel': $.proxy(function(e) {
2225
- if (this.refreshing && e.property.name == 'items' && e.property.value && !e.property.value.is(':empty')) {
2226
- this.checkVideoLinks();
 
 
2227
  }
2228
  }, this)
2229
  };
2230
 
2231
- this.owl.dom.$el.on(this.handlers);
 
 
 
 
2232
 
2233
- this.owl.dom.$el.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) {
2234
- this.playVideo(e);
2235
  }, this));
2236
  };
2237
 
@@ -2245,138 +2114,103 @@
2245
  videoWidth: false
2246
  };
2247
 
2248
- /**
2249
- * Checks if for any videos links exists.
2250
- * @protected
2251
- */
2252
- Video.prototype.checkVideoLinks = function() {
2253
- var videoEl, item, i;
2254
-
2255
- for (i = 0; i < this.owl.num.items; i++) {
2256
-
2257
- item = this.owl.dom.$items.eq(i);
2258
- if (item.data('owl-item').hasVideo) {
2259
- continue;
2260
- }
2261
-
2262
- videoEl = item.find('.owl-video');
2263
- if (videoEl.length) {
2264
- this.owl.state.hasVideos = true;
2265
- this.owl.dom.$items.eq(i).data('owl-item').hasVideo = true;
2266
- videoEl.css('display', 'none');
2267
- this.getVideoInfo(videoEl, item);
2268
- }
2269
- }
2270
- };
2271
-
2272
  /**
2273
  * Gets the video ID and the type (YouTube/Vimeo only).
2274
  * @protected
2275
- * @param {jQuery} videoEl - The element containing the video data.
2276
  * @param {jQuery} item - The item containing the video.
2277
  */
2278
- Video.prototype.getVideoInfo = function(videoEl, item) {
2279
-
2280
- var info, type, id, dimensions,
2281
- vimeoId = videoEl.data('vimeo-id'),
2282
- youTubeId = videoEl.data('youtube-id'),
2283
- width = videoEl.data('width') || this.owl.settings.videoWidth,
2284
- height = videoEl.data('height') || this.owl.settings.videoHeight,
2285
- url = videoEl.attr('href');
2286
-
2287
- if (vimeoId) {
2288
- type = 'vimeo';
2289
- id = vimeoId;
2290
- } else if (youTubeId) {
2291
- type = 'youtube';
2292
- id = youTubeId;
2293
- } else if (url) {
2294
  id = url.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);
2295
 
2296
  if (id[3].indexOf('youtu') > -1) {
2297
  type = 'youtube';
2298
  } else if (id[3].indexOf('vimeo') > -1) {
2299
  type = 'vimeo';
 
 
2300
  }
2301
  id = id[6];
2302
  } else {
2303
- throw new Error('Missing video link.');
2304
  }
2305
 
2306
- item.data('owl-item').videoType = type;
2307
- item.data('owl-item').videoId = id;
2308
- item.data('owl-item').videoWidth = width;
2309
- item.data('owl-item').videoHeight = height;
2310
-
2311
- info = {
2312
  type: type,
2313
- id: id
 
 
2314
  };
2315
 
2316
- // Check dimensions
2317
- dimensions = width && height ? 'style="width:' + width + 'px;height:' + height + 'px;"' : '';
2318
-
2319
- // wrap video content into owl-video-wrapper div
2320
- videoEl.wrap('<div class="owl-video-wrapper"' + dimensions + '></div>');
2321
 
2322
- this.createVideoTn(videoEl, info);
2323
  };
2324
 
2325
  /**
2326
  * Creates video thumbnail.
2327
  * @protected
2328
- * @param {jQuery} videoEl - The element containing the video data.
2329
  * @param {Object} info - The video info object.
2330
- * @see `getVideoInfo`
2331
  */
2332
- Video.prototype.createVideoTn = function(videoEl, info) {
2333
 
2334
- var tnLink, icon, path,
2335
- customTn = videoEl.find('img'),
 
 
 
2336
  srcType = 'src',
2337
  lazyClass = '',
2338
- that = this.owl;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2339
 
2340
- if (this.owl.settings.lazyLoad) {
2341
  srcType = 'data-src';
2342
  lazyClass = 'owl-lazy';
2343
  }
2344
 
2345
- // Custom thumbnail
2346
-
2347
  if (customTn.length) {
2348
- addThumbnail(customTn.attr(srcType));
2349
  customTn.remove();
2350
  return false;
2351
  }
2352
 
2353
- function addThumbnail(tnPath) {
2354
- icon = '<div class="owl-video-play-icon"></div>';
2355
-
2356
- if (that.settings.lazyLoad) {
2357
- tnLink = '<div class="owl-video-tn ' + lazyClass + '" ' + srcType + '="' + tnPath + '"></div>';
2358
- } else {
2359
- tnLink = '<div class="owl-video-tn" style="opacity:1;background-image:url(' + tnPath + ')"></div>';
2360
- }
2361
- videoEl.after(tnLink);
2362
- videoEl.after(icon);
2363
- }
2364
-
2365
- if (info.type === 'youtube') {
2366
- path = "http://img.youtube.com/vi/" + info.id + "/hqdefault.jpg";
2367
- addThumbnail(path);
2368
- } else if (info.type === 'vimeo') {
2369
  $.ajax({
2370
  type: 'GET',
2371
- url: 'http://vimeo.com/api/v2/video/' + info.id + '.json',
2372
  jsonp: 'callback',
2373
  dataType: 'jsonp',
2374
  success: function(data) {
2375
  path = data[0].thumbnail_large;
2376
- addThumbnail(path);
2377
- if (that.settings.loop) {
2378
- that.updateActiveItems();
2379
- }
2380
  }
2381
  });
2382
  }
@@ -2386,12 +2220,11 @@
2386
  * Stops the current video.
2387
  * @public
2388
  */
2389
- Video.prototype.stopVideo = function() {
2390
- this.owl.trigger('stop', null, 'video');
2391
- var item = this.owl.dom.$items.eq(this.owl.state.videoPlayIndex);
2392
- item.find('.owl-video-frame').remove();
2393
- item.removeClass('owl-video-playing');
2394
- this.owl.state.videoPlay = false;
2395
  };
2396
 
2397
  /**
@@ -2399,73 +2232,72 @@
2399
  * @public
2400
  * @param {Event} ev - The event arguments.
2401
  */
2402
- Video.prototype.playVideo = function(ev) {
2403
- this.owl.trigger('play', null, 'video');
2404
 
2405
- if (this.owl.state.videoPlay) {
2406
- this.stopVideo();
2407
  }
2408
- var videoLink, videoWrap, videoType,
2409
- target = $(ev.target || ev.srcElement),
2410
- item = target.closest('.' + this.owl.settings.itemClass);
2411
 
2412
- videoType = item.data('owl-item').videoType, id = item.data('owl-item').videoId, width = item
2413
- .data('owl-item').videoWidth
2414
- || Math.floor(item.data('owl-item').width - this.owl.settings.margin), height = item.data('owl-item').videoHeight
2415
- || this.owl.dom.$stage.height();
 
 
2416
 
2417
- if (videoType === 'youtube') {
2418
- videoLink = "<iframe width=\"" + width + "\" height=\"" + height + "\" src=\"http://www.youtube.com/embed/"
2419
- + id + "?autoplay=1&v=" + id + "\" frameborder=\"0\" allowfullscreen></iframe>";
2420
- } else if (videoType === 'vimeo') {
2421
- videoLink = '<iframe src="http://player.vimeo.com/video/' + id + '?autoplay=1" width="' + width
2422
  + '" height="' + height
2423
  + '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
2424
  }
2425
 
2426
  item.addClass('owl-video-playing');
2427
- this.owl.state.videoPlay = true;
2428
- this.owl.state.videoPlayIndex = item.data('owl-item').indexAbs;
2429
 
2430
- videoWrap = $('<div style="height:' + height + 'px; width:' + width + 'px" class="owl-video-frame">'
2431
- + videoLink + '</div>');
2432
- target.after(videoWrap);
2433
  };
2434
 
2435
  /**
2436
  * Checks whether an video is currently in full screen mode or not.
 
2437
  * @protected
2438
  * @returns {Boolean}
2439
  */
2440
  Video.prototype.isInFullScreen = function() {
2441
 
2442
  // if Vimeo Fullscreen mode
2443
- var fullscreenElement = document.fullscreenElement || document.mozFullScreenElement
2444
  || document.webkitFullscreenElement;
2445
- if (fullscreenElement) {
2446
- if ($(fullscreenElement.parentNode).hasClass('owl-video-frame')) {
2447
- this.owl.speed(0);
2448
- this.owl.state.isFullScreen = true;
2449
- }
2450
  }
2451
 
2452
- if (fullscreenElement && this.owl.state.isFullScreen && this.owl.state.videoPlay) {
2453
  return false;
2454
  }
2455
 
2456
- // Comming back from fullscreen
2457
- if (this.owl.state.isFullScreen) {
2458
- this.owl.state.isFullScreen = false;
2459
  return false;
2460
  }
2461
 
2462
  // check full screen mode and window orientation
2463
- if (this.owl.state.videoPlay) {
2464
- if (this.owl.state.orientation !== window.orientation) {
2465
- this.owl.state.orientation = window.orientation;
2466
  return false;
2467
  }
2468
  }
 
2469
  return true;
2470
  };
2471
 
@@ -2475,17 +2307,17 @@
2475
  Video.prototype.destroy = function() {
2476
  var handler, property;
2477
 
2478
- this.owl.dom.$el.off('click.owl.video');
2479
 
2480
- for (handler in this.handlers) {
2481
- this.owl.dom.$el.off(handler, this.handlers[handler]);
2482
  }
2483
  for (property in Object.getOwnPropertyNames(this)) {
2484
  typeof this[property] != 'function' && (this[property] = null);
2485
  }
2486
  };
2487
 
2488
- $.fn.owlCarousel.Constructor.Plugins.video = Video;
2489
 
2490
  })(window.Zepto || window.jQuery, window, document);
2491
 
@@ -2502,7 +2334,7 @@
2502
  * @class The Navigation Plugin
2503
  * @param {Owl} scope - The Owl Carousel
2504
  */
2505
- Animate = function(scope) {
2506
  this.core = scope;
2507
  this.core.options = $.extend({}, Animate.Defaults, this.core.options);
2508
  this.swapping = true;
@@ -2526,7 +2358,7 @@
2526
  }, this)
2527
  };
2528
 
2529
- this.core.dom.$el.on(this.handlers);
2530
  };
2531
 
2532
  /**
@@ -2553,8 +2385,8 @@
2553
 
2554
  var left,
2555
  clear = $.proxy(this.clear, this),
2556
- previous = this.core.dom.$items.eq(this.previous),
2557
- next = this.core.dom.$items.eq(this.next),
2558
  incoming = this.core.settings.animateIn,
2559
  outgoing = this.core.settings.animateOut;
2560
 
@@ -2593,7 +2425,7 @@
2593
  var handler, property;
2594
 
2595
  for (handler in this.handlers) {
2596
- this.core.dom.$el.off(handler, this.handlers[handler]);
2597
  }
2598
  for (property in Object.getOwnPropertyNames(this)) {
2599
  typeof this[property] != 'function' && (this[property] = null);
@@ -2617,7 +2449,7 @@
2617
  * @class The Autoplay Plugin
2618
  * @param {Owl} scope - The Owl Carousel
2619
  */
2620
- Autoplay = function(scope) {
2621
  this.core = scope;
2622
  this.core.options = $.extend({}, Autoplay.Defaults, this.core.options);
2623
 
@@ -2643,7 +2475,7 @@
2643
  }, this)
2644
  };
2645
 
2646
- this.core.dom.$el.on(this.handlers);
2647
  };
2648
 
2649
  /**
@@ -2725,7 +2557,7 @@
2725
  window.clearInterval(this.interval);
2726
 
2727
  for (handler in this.handlers) {
2728
- this.core.dom.$el.off(handler, this.handlers[handler]);
2729
  }
2730
  for (property in Object.getOwnPropertyNames(this)) {
2731
  typeof this[property] != 'function' && (this[property] = null);
@@ -2753,95 +2585,111 @@
2753
  var Navigation = function(carousel) {
2754
  /**
2755
  * Reference to the core.
 
2756
  * @type {Owl}
2757
  */
2758
- this.core = carousel;
2759
 
2760
  /**
2761
  * Indicates whether the plugin is initialized or not.
 
2762
  * @type {Boolean}
2763
  */
2764
- this.initialized = false;
2765
 
2766
  /**
2767
  * The current paging indexes.
 
2768
  * @type {Array}
2769
  */
2770
- this.pages = [];
2771
 
2772
  /**
2773
  * All DOM elements of the user interface.
 
2774
  * @type {Object}
2775
  */
2776
- this.controls = {};
2777
 
2778
  /**
2779
  * Markup for an indicator.
2780
- * @type {String}
 
2781
  */
2782
- this.template = null;
2783
 
2784
  /**
2785
  * The carousel element.
2786
  * @type {jQuery}
2787
  */
2788
- this.$element = this.core.dom.$el;
2789
 
2790
  /**
2791
  * Overridden methods of the carousel.
 
2792
  * @type {Object}
2793
  */
2794
- this.overrides = {
2795
- next: this.core.next,
2796
- prev: this.core.prev,
2797
- to: this.core.to
2798
  };
2799
 
2800
  /**
2801
  * All event handlers.
 
2802
  * @type {Object}
2803
  */
2804
- this.handlers = {
2805
- 'changed.owl.carousel': $.proxy(function(e) {
2806
- if (e.property.name == 'items') {
2807
- if (!this.initialized) {
2808
- this.initialize();
2809
- this.initialized = true;
2810
- }
2811
- this.update();
2812
- this.draw();
2813
  }
2814
- if (this.filling) {
2815
- e.property.value.data('owl-item').dot = $(':first-child', e.property.value)
2816
- .find('[data-dot]').andSelf().data('dot');
 
2817
  }
2818
  }, this),
2819
  'change.owl.carousel': $.proxy(function(e) {
2820
- if (e.property.name == 'position' && !this.core.state.revert
2821
- && !this.core.settings.loop && this.core.settings.navRewind) {
2822
- var current = this.core.current(),
2823
- maximum = this.core.maximum(),
2824
- minimum = this.core.minimum();
2825
- e.data = e.property.value > maximum
2826
- ? current >= maximum ? minimum : maximum
2827
- : e.property.value < minimum ? maximum : e.property.value;
 
2828
  }
2829
- this.filling = this.core.settings.dotsData && e.property.name == 'item'
2830
- && e.property.value && e.property.value.is(':empty');
2831
  }, this),
2832
- 'refreshed.owl.carousel': $.proxy(function() {
2833
- if (this.initialized) {
2834
- this.update();
2835
  this.draw();
2836
  }
 
 
 
 
 
 
 
 
 
 
2837
  }, this)
2838
  };
2839
 
2840
  // set default options
2841
- this.core.options = $.extend({}, Navigation.Defaults, this.core.options);
2842
 
2843
  // register event handlers
2844
- this.$element.on(this.handlers);
2845
  }
2846
 
2847
  /**
@@ -2875,29 +2723,29 @@
2875
  */
2876
  Navigation.prototype.initialize = function() {
2877
  var $container, override,
2878
- options = this.core.settings;
2879
 
2880
  // create the indicator template
2881
  if (!options.dotsData) {
2882
- this.template = $('<div>')
2883
  .addClass(options.dotClass)
2884
  .append($('<span>'))
2885
- .prop('outerHTML');
2886
  }
2887
 
2888
  // create controls container if needed
2889
  if (!options.navContainer || !options.dotsContainer) {
2890
- this.controls.$container = $('<div>')
2891
  .addClass(options.controlsClass)
2892
  .appendTo(this.$element);
2893
  }
2894
 
2895
  // create DOM structure for absolute navigation
2896
- this.controls.$indicators = options.dotsContainer ? $(options.dotsContainer)
2897
- : $('<div>').hide().addClass(options.dotsClass).appendTo(this.controls.$container);
2898
 
2899
- this.controls.$indicators.on(this.core.dragType[2], 'div', $.proxy(function(e) {
2900
- var index = $(e.target).parent().is(this.controls.$indicators)
2901
  ? $(e.target).index() : $(e.target).parent().index();
2902
 
2903
  e.preventDefault();
@@ -2907,31 +2755,31 @@
2907
 
2908
  // create DOM structure for relative navigation
2909
  $container = options.navContainer ? $(options.navContainer)
2910
- : $('<div>').addClass(options.navContainerClass).prependTo(this.controls.$container);
2911
 
2912
- this.controls.$next = $('<' + options.navElement + '>');
2913
- this.controls.$previous = this.controls.$next.clone();
2914
 
2915
- this.controls.$previous
2916
  .addClass(options.navClass[0])
2917
  .html(options.navText[0])
2918
  .hide()
2919
  .prependTo($container)
2920
- .on(this.core.dragType[2], $.proxy(function(e) {
2921
- this.prev();
2922
  }, this));
2923
- this.controls.$next
2924
  .addClass(options.navClass[1])
2925
  .html(options.navText[1])
2926
  .hide()
2927
  .appendTo($container)
2928
- .on(this.core.dragType[2], $.proxy(function(e) {
2929
- this.next();
2930
  }, this));
2931
 
2932
  // override public methods of the carousel
2933
- for (override in this.overrides) {
2934
- this.core[override] = $.proxy(this[override], this);
2935
  }
2936
  }
2937
 
@@ -2942,14 +2790,14 @@
2942
  Navigation.prototype.destroy = function() {
2943
  var handler, control, property, override;
2944
 
2945
- for (handler in this.handlers) {
2946
- this.$element.off(handler, this.handlers[handler]);
2947
  }
2948
- for (control in this.controls) {
2949
- this.controls[control].remove();
2950
  }
2951
  for (override in this.overides) {
2952
- this.core[override] = this.overrides[override];
2953
  }
2954
  for (property in Object.getOwnPropertyNames(this)) {
2955
  typeof this[property] != 'function' && (this[property] = null);
@@ -2962,9 +2810,9 @@
2962
  */
2963
  Navigation.prototype.update = function() {
2964
  var i, j, k,
2965
- options = this.core.settings,
2966
- lower = this.core.num.cItems / 2,
2967
- upper = this.core.num.items - lower,
2968
  size = options.center || options.autoWidth || options.dotData
2969
  ? 1 : options.dotsEach || options.items;
2970
 
@@ -2972,57 +2820,61 @@
2972
  options.slideBy = Math.min(options.slideBy, options.items);
2973
  }
2974
 
2975
- if (options.dots) {
2976
- this.pages = [];
2977
 
2978
  for (i = lower, j = 0, k = 0; i < upper; i++) {
2979
  if (j >= size || j === 0) {
2980
- this.pages.push({
2981
  start: i - lower,
2982
  end: i - lower + size - 1
2983
  });
2984
  j = 0, ++k;
2985
  }
2986
- j += this.core.num.merged[i];
2987
  }
2988
  }
2989
  }
2990
 
2991
  /**
2992
  * Draws the user interface.
 
2993
  * @protected
2994
  */
2995
  Navigation.prototype.draw = function() {
2996
  var difference, i, html = '',
2997
- options = this.core.settings,
2998
- $items = this.core.dom.$oItems,
2999
- index = this.core.normalize(this.core.current(), true);
3000
 
3001
  if (options.nav && !options.loop && !options.navRewind) {
3002
- this.controls.$previous.toggleClass('disabled', index <= 0);
3003
- this.controls.$next.toggleClass('disabled', index >= this.core.maximum());
3004
  }
3005
 
3006
- this.controls.$previous.toggle(options.nav);
3007
- this.controls.$next.toggle(options.nav);
3008
 
3009
  if (options.dots) {
3010
- difference = this.pages.length - this.controls.$indicators.children().length;
3011
 
3012
- if (difference > 0) {
3013
- for (i = 0; i < Math.abs(difference); i++) {
3014
- html += options.dotData ? $items.eq(i).data('owl-item').dot : this.template;
3015
  }
3016
- this.controls.$indicators.append(html);
 
 
 
3017
  } else if (difference < 0) {
3018
- this.controls.$indicators.children().slice(difference).remove();
3019
  }
3020
 
3021
- this.controls.$indicators.find('.active').removeClass('active');
3022
- this.controls.$indicators.children().eq($.inArray(this.current(), this.pages)).addClass('active');
3023
  }
3024
 
3025
- this.controls.$indicators.toggle(options.dots);
3026
  }
3027
 
3028
  /**
@@ -3031,13 +2883,13 @@
3031
  * @param {Event} event - The event object which gets thrown.
3032
  */
3033
  Navigation.prototype.onTrigger = function(event) {
3034
- var options = this.core.settings;
3035
 
3036
  event.page = {
3037
- index: $.inArray(this.current(), this.pages),
3038
- count: this.pages.length,
3039
- size: options.center || options.autoWidth || options.dotData
3040
- ? 1 : options.dotsEach || options.items
3041
  };
3042
  }
3043
 
@@ -3047,8 +2899,8 @@
3047
  * @returns {Number}
3048
  */
3049
  Navigation.prototype.current = function() {
3050
- var index = this.core.normalize(this.core.current(), true);
3051
- return $.grep(this.pages, function(o) {
3052
  return o.start <= index && o.end >= index;
3053
  }).pop();
3054
  }
@@ -3060,16 +2912,16 @@
3060
  */
3061
  Navigation.prototype.getPosition = function(successor) {
3062
  var position, length,
3063
- options = this.core.settings;
3064
 
3065
  if (options.slideBy == 'page') {
3066
- position = $.inArray(this.current(), this.pages);
3067
- length = this.pages.length;
3068
  successor ? ++position : --position;
3069
- position = this.pages[((position % length) + length) % length].start;
3070
  } else {
3071
- position = this.core.normalize(this.core.current(), true);
3072
- length = this.core.num.oItems;
3073
  successor ? position += options.slideBy : position -= options.slideBy;
3074
  }
3075
  return position;
@@ -3081,7 +2933,7 @@
3081
  * @param {Number} [speed=false] - The time in milliseconds for the transition.
3082
  */
3083
  Navigation.prototype.next = function(speed) {
3084
- $.proxy(this.overrides.to, this.core)(this.getPosition(true), speed);
3085
  }
3086
 
3087
  /**
@@ -3090,7 +2942,7 @@
3090
  * @param {Number} [speed=false] - The time in milliseconds for the transition.
3091
  */
3092
  Navigation.prototype.prev = function(speed) {
3093
- $.proxy(this.overrides.to, this.core)(this.getPosition(false), speed);
3094
  }
3095
 
3096
  /**
@@ -3104,10 +2956,10 @@
3104
  var length;
3105
 
3106
  if (!standard) {
3107
- length = this.pages.length;
3108
- $.proxy(this.overrides.to, this.core)(this.pages[((position % length) + length) % length].start, speed);
3109
  } else {
3110
- $.proxy(this.overrides.to, this.core)(position, speed);
3111
  }
3112
  }
3113
 
@@ -3132,66 +2984,58 @@
3132
  var Hash = function(carousel) {
3133
  /**
3134
  * Reference to the core.
 
3135
  * @type {Owl}
3136
  */
3137
- this.core = carousel;
3138
 
3139
  /**
3140
  * Hash table for the hashes.
 
3141
  * @type {Object}
3142
  */
3143
- this.hashes = {};
3144
 
3145
  /**
3146
  * The carousel element.
3147
  * @type {jQuery}
3148
  */
3149
- this.$element = this.core.dom.$el;
3150
 
3151
  /**
3152
  * All event handlers.
 
3153
  * @type {Object}
3154
  */
3155
- this.handlers = {
3156
  'initialized.owl.carousel': $.proxy(function() {
3157
- if (window.location.hash.substring(1)) {
3158
  $(window).trigger('hashchange.owl.navigation');
3159
  }
3160
  }, this),
3161
- 'changed.owl.carousel': $.proxy(function(e) {
3162
- if (this.filling) {
3163
- e.property.value.data('owl-item').hash
3164
- = $(':first-child', e.property.value).find('[data-hash]').andSelf().data('hash');
3165
- this.hashes[e.property.value.data('owl-item').hash] = e.property.value;
3166
- }
3167
- }, this),
3168
- 'change.owl.carousel': $.proxy(function(e) {
3169
- if (e.property.name == 'position' && this.core.current() === undefined
3170
- && this.core.settings.startPosition == 'URLHash') {
3171
- e.data = this.hashes[window.location.hash.substring(1)];
3172
- }
3173
- this.filling = e.property.name == 'item' && e.property.value && e.property.value.is(':empty');
3174
- }, this),
3175
  };
3176
 
3177
  // set default options
3178
- this.core.options = $.extend({}, Hash.Defaults, this.core.options);
3179
 
3180
  // register the event handlers
3181
- this.$element.on(this.handlers);
3182
 
3183
  // register event listener for hash navigation
3184
  $(window).on('hashchange.owl.navigation', $.proxy(function() {
3185
  var hash = window.location.hash.substring(1),
3186
- items = this.core.dom.$oItems,
3187
- position = this.hashes[hash] && items.index(this.hashes[hash]) || 0;
3188
 
3189
  if (!hash) {
3190
  return false;
3191
  }
3192
 
3193
- this.core.dom.oStage.scrollLeft = 0;
3194
- this.core.to(position, false, true);
3195
  }, this));
3196
  }
3197
 
@@ -3212,8 +3056,8 @@
3212
 
3213
  $(window).off('hashchange.owl.navigation');
3214
 
3215
- for (handler in this.handlers) {
3216
- this.owl.dom.$el.off(handler, this.handlers[handler]);
3217
  }
3218
  for (property in Object.getOwnPropertyNames(this)) {
3219
  typeof this[property] != 'function' && (this[property] = null);
11
  */
12
  ;(function($, window, document, undefined) {
13
 
14
+ var drag, state, e;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  /**
17
  * Template for status information about drag and touch events.
69
  */
70
  function Owl(element, options) {
71
 
 
 
 
 
 
 
 
72
  /**
73
  * Current settings for the carousel.
74
+ * @public
75
  */
76
  this.settings = null;
77
 
78
  /**
79
+ * Current options set by the caller including defaults.
80
+ * @public
 
81
  */
82
  this.options = $.extend({}, Owl.Defaults, options);
83
 
84
  /**
85
+ * Plugin element.
86
+ * @public
87
+ */
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.
109
  * @protected
110
  */
111
+ this._plugins = {};
112
 
113
  /**
114
+ * Currently suppressed events to prevent them from beeing retriggered.
115
  * @protected
116
  */
117
+ this._supress = {};
118
 
119
  /**
120
+ * Absolute current position.
121
+ * @protected
122
  */
123
+ this._current = null;
124
 
125
  /**
126
+ * Animation speed in milliseconds.
127
  * @protected
128
  */
129
+ this._speed = null;
130
 
131
  /**
132
+ * Coordinates of all items in pixel.
133
+ * @todo The name of this member is missleading.
134
  * @protected
 
135
  */
136
+ this._coordinates = [];
137
 
138
  /**
139
+ * Current breakpoint.
140
+ * @todo Real media queries would be nice.
141
  * @protected
142
  */
143
+ this._breakpoint = null;
144
 
145
  /**
146
+ * Current width of the plugin element.
147
+ */
148
+ this._width = null;
149
+
150
+ /**
151
+ * All real items.
152
  * @protected
153
  */
154
+ this._items = [];
155
 
156
  /**
157
+ * All cloned items.
158
  * @protected
159
  */
160
+ this._clones = [];
161
 
162
  /**
163
+ * Merge values of all items.
164
+ * @todo Maybe this could be part of a plugin.
165
  * @protected
166
  */
167
+ this._mergers = [];
168
+
169
+ /**
170
+ * Invalidated parts within the update process.
171
+ * @protected
172
+ */
173
+ this._invalidated = {};
174
 
175
  /**
176
+ * Ordered list of workers for the update process.
177
+ * @protected
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)
190
+ });
191
+ }, this));
192
 
193
+ this.setup();
194
+ this.initialize();
195
  }
196
 
197
  /**
216
  autoWidth: false,
217
 
218
  startPosition: 0,
219
+ rtl: false,
220
 
221
  smartSpeed: 250,
222
  fluidSpeed: false,
243
  activeClass: 'active'
244
  };
245
 
246
+ /**
247
+ * Enumeration for width.
248
+ * @public
249
+ * @readonly
250
+ * @enum {String}
251
+ */
252
+ Owl.Width = {
253
+ Default: 'default',
254
+ Inner: 'inner',
255
+ Outer: 'outer'
256
+ };
257
+
258
  /**
259
  * Contains all registered plugins.
260
  * @public
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)];
271
+ }
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' ],
351
+ run: function() {
352
+ this.animate(this.coordinates(this._current));
353
  }
354
+ }, {
355
+ filter: [ 'width', 'position', 'items', 'settings' ],
356
+ run: function() {
357
+ var rtl = this.settings.rtl ? 1 : -1,
358
+ padding = this.settings.stagePadding * 2,
359
+ begin = this.coordinates(this.current()) + padding,
360
+ end = begin + this.width() * rtl,
361
+ inner, outer, matches = [], i, n;
362
+
363
+ for (i = 0, n = this._coordinates.length; i < n; i++) {
364
+ inner = this._coordinates[i - 1] || 0;
365
+ outer = Math.abs(this._coordinates[i]) + padding * rtl;
366
+
367
+ if ((this.op(inner, '<=', begin) && (this.op(inner, '>', end)))
368
+ || (this.op(outer, '<', begin) && this.op(outer, '>', end))) {
369
+ matches.push(i);
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
+ } ];
382
 
383
+ /**
384
+ * Initializes the carousel.
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;
402
+ width = this.$element.children(nestedSelector).width();
403
 
404
  if (imgs.length && width <= 0) {
405
  this.preloadAutoWidthImages(imgs);
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());
418
+
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();
433
  // attach generic events
434
  this.internalEvents();
435
 
 
 
 
 
 
 
436
  // attach custom control events
437
  this.addTriggerableEvents();
438
+
439
+ this.trigger('initialized');
440
  };
441
 
442
  /**
443
+ * Setups the current settings.
444
+ * @todo Remove responsive classes. Why should adaptive designs be brought into IE8?
445
+ * @todo Support for media queries by using `matchMedia` would be nice.
446
+ * @public
447
  */
448
+ Owl.prototype.setup = function() {
449
+ var viewport = this.viewport(),
450
+ overwrites = this.options.responsive,
451
+ match = -1,
452
+ settings = null;
 
 
453
 
454
+ if (!overwrites) {
455
+ settings = $.extend({}, this.options);
456
+ } else {
457
  $.each(overwrites, function(breakpoint) {
458
  if (breakpoint <= viewport && breakpoint > match) {
459
  match = Number(breakpoint);
460
  }
461
  });
462
 
463
+ settings = $.extend({}, this.options, overwrites[match]);
464
+ delete settings.responsive;
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
+
474
+ if (this.settings === null || this._breakpoint !== match) {
475
+ this.trigger('change', { property: { name: 'settings', value: settings } });
476
+ this._breakpoint = match;
477
+ this.settings = settings;
478
+ this.invalidate('settings');
479
+ this.trigger('changed', { property: { name: 'settings', value: this.settings } });
480
+ }
481
  };
482
 
483
  /**
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
 
500
  };
501
 
502
  /**
503
+ * Prepares an item before add.
504
+ * @todo Rename event parameter `content` to `item`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
505
  * @protected
506
+ * @returns {jQuery|HTMLElement} - The item container.
507
  */
508
+ Owl.prototype.prepare = function(item) {
509
+ var event = this.trigger('prepare', { content: item });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 });
 
 
 
 
 
 
 
517
 
518
+ return event.data;
 
 
 
 
 
519
  };
520
 
521
  /**
522
+ * Updates the view.
523
+ * @public
 
524
  */
525
+ Owl.prototype.update = function() {
526
+ var i = 0,
527
+ n = this._pipe.length,
528
+ filter = $.proxy(function(p) { return this[p] }, this._invalidated),
529
+ cache = {};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
530
 
531
+ while (i < n) {
532
+ if (this._invalidated.all || $.grep(this._pipe[i].filter, filter).length > 0) {
533
+ this._pipe[i].run(cache);
534
  }
535
+ i++;
536
  }
537
 
538
+ this._invalidated = {};
 
539
  };
540
 
541
  /**
542
+ * Gets the width of the view.
543
+ * @public
544
+ * @param {Owl.Width} [dimension=Owl.Width.Default] - The dimension to return.
545
+ * @returns {Number} - The width of the view in pixel.
546
  */
547
+ Owl.prototype.width = function(dimension) {
548
+ dimension = dimension || Owl.Width.Default;
549
+ switch (dimension) {
550
+ case Owl.Width.Inner:
551
+ case Owl.Width.Outer:
552
+ return this._width;
553
+ default:
554
+ return this._width - this.settings.stagePadding * 2 + this.settings.margin;
 
555
  }
 
 
 
 
 
 
 
 
 
 
556
  };
557
 
558
  /**
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
 
587
  this.trigger('refreshed');
588
  };
589
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
590
  /**
591
  * Save internal event references and add event based functions.
592
  * @protected
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);
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
+ /**
626
+ * Checks window `resize` event.
627
+ * @protected
628
+ */
629
+ Owl.prototype.onResize = function() {
630
+ if (!this._items.length) {
631
  return false;
632
  }
 
633
 
634
+ if (this._width === this.$element.width()) {
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
  /**
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
 
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');
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
 
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
  /**
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;
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
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');
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
891
 
892
  this.drag.distance = 0;
893
 
894
+ $(document).off('.owl.dragEvents');
 
895
  };
896
 
897
  /**
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
 
943
 
944
  /**
945
  * Gets absolute position of the closest item for a coordinate.
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
956
+ $.each(coordinates, $.proxy(function(index, value) {
957
  if (coordinate > value - pull && coordinate < value + pull) {
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));
965
  }
966
 
967
  if (!this.settings.loop) {
968
  // non loop boundries
969
+ if (this.op(coordinate, '>', coordinates[this.minimum()])) {
970
  position = coordinate = this.minimum();
971
+ } else if (this.op(coordinate, '<', coordinates[this.maximum()])) {
972
  position = coordinate = this.maximum();
973
  }
974
  }
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) {
1016
  return this._current;
1017
  }
1018
 
1019
+ if (this._items.length === 0) {
1020
  return undefined;
1021
  }
1022
 
1023
  position = this.normalize(position);
1024
 
1025
+ if (this._current !== position) {
 
 
1026
  var event = this.trigger('change', { property: { name: 'position', value: position } });
1027
 
1028
  if (event.data !== undefined) {
1031
 
1032
  this._current = position;
1033
 
1034
+ this.invalidate('position');
 
 
1035
 
1036
  this.trigger('changed', { property: { name: 'position', value: this._current } });
1037
  }
1039
  return this._current;
1040
  };
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.
1052
  * @public
1053
  * @param {Number} position - The absolute position of the new item.
1054
  */
1055
  Owl.prototype.reset = function(position) {
1056
+ position = this.normalize(position);
1057
+
1058
+ if (position === undefined) {
1059
+ return;
1060
+ }
1061
+
1062
+ this._speed = 0;
1063
+ this._current = position;
1064
+
1065
+ this.suppress([ 'translate', 'translated' ]);
1066
+
1067
+ this.animate(this.coordinates(position));
1068
+
1069
+ this.release([ 'translate', 'translated' ]);
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
+ /**
1158
+ * Gets an item at the specified relative position.
1159
+ * @public
1160
+ * @param {Number} [position] - The relative position of the item.
1161
+ * @return {jQuery|Array.<jQuery>} - The item at the given position or all items if no position was given.
1162
+ */
1163
+ Owl.prototype.items = function(position) {
1164
+ if (position === undefined) {
1165
+ return this._items.slice();
1166
+ }
1167
+
1168
+ position = this.normalize(position, true);
1169
+ return this._items[position];
1170
+ };
1171
+
1172
+ /**
1173
+ * Gets an item at the specified relative position.
1174
+ * @public
1175
+ * @param {Number} [position] - The relative position of the item.
1176
+ * @return {jQuery|Array.<jQuery>} - The item at the given position or all items if no position was given.
1177
+ */
1178
+ Owl.prototype.mergers = function(position) {
1179
+ if (position === undefined) {
1180
+ return this._mergers.slice();
1181
+ }
1182
+
1183
+ position = this.normalize(position, true);
1184
+ return this._mergers[position];
1185
  };
1186
 
1187
  /**
1188
+ * Gets the absolute positions of clones for an item.
1189
  * @public
1190
+ * @param {Number} [position] - The relative position of the item.
1191
+ * @returns {Array.<Number>} - The absolute positions of clones for the item or all if no position was given.
1192
  */
1193
+ Owl.prototype.clones = function(position) {
1194
+ var odd = this._clones.length / 2,
1195
+ even = odd + this._items.length,
1196
+ map = function(index) { return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2 };
1197
+
1198
+ if (position === undefined) {
1199
+ return $.map(this._clones, function(v, i) { return map(i) });
1200
+ }
1201
+
1202
+ return $.map(this._clones, function(v, i) { return v === position ? map(i) : null });
1203
  };
1204
 
1205
  /**
1206
  * Sets the current animation speed.
1207
  * @public
1208
+ * @param {Number} [speed] - The animation speed in milliseconds or nothing to leave it unchanged.
1209
  * @returns {Number} - The current animation speed in milliseconds.
1210
  */
1211
  Owl.prototype.speed = function(speed) {
1217
  };
1218
 
1219
  /**
1220
+ * Gets the coordinate of an item.
1221
+ * @todo The name of this method is missleanding.
1222
  * @public
1223
+ * @param {Number} position - The absolute position of the item within `minimum()` and `maximum()`.
1224
  * @returns {Number|Array.<Number>} - The coordinate of the item in pixel or all coordinates.
1225
  */
1226
  Owl.prototype.coordinates = function(position) {
1227
+ var coordinate = null;
1228
+
1229
+ if (position === undefined) {
1230
+ return $.map(this._coordinates, $.proxy(function(coordinate, index) {
1231
+ return this.coordinates(index);
1232
+ }, this));
1233
+ }
1234
+
1235
+ if (this.settings.center) {
1236
+ coordinate = this._coordinates[position];
1237
+ coordinate += (this.width() - coordinate + (this._coordinates[position - 1] || 0)) / 2 * (this.settings.rtl ? -1 : 1);
1238
+ } else {
1239
+ coordinate = this._coordinates[position - 1] || 0;
1240
+ }
1241
+
1242
+ return coordinate;
1243
  };
1244
 
1245
  /**
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
  };
1291
 
1296
  */
1297
  Owl.prototype.next = function(speed) {
1298
  speed = speed || false;
1299
+ this.to(this.relative(this.current()) + 1, speed);
1300
  };
1301
 
1302
  /**
1306
  */
1307
  Owl.prototype.prev = function(speed) {
1308
  speed = speed || false;
1309
+ this.to(this.relative(this.current()) - 1, speed);
1310
  };
1311
 
1312
  /**
1321
  event.stopPropagation();
1322
 
1323
  // Catch only owl-stage transitionEnd event
1324
+ if ((event.target || event.srcElement || event.originalTarget) !== this.$stage.get(0)) {
 
1325
  return false;
1326
  }
1327
  }
1330
  this.trigger('translated');
1331
  };
1332
 
 
 
 
 
 
 
 
 
 
 
 
 
1333
  /**
1334
  * Gets viewport width.
1335
  * @protected
1354
  * @public
1355
  * @param {HTMLElement|jQuery|String} content - The new content.
1356
  */
1357
+ Owl.prototype.replace = function(content) {
1358
+ this.$stage.empty();
1359
+ this._items = [];
1360
+
1361
+ if (content) {
1362
+ content = (content instanceof jQuery) ? content : $(content);
1363
+ }
1364
+
1365
+ if (this.settings.nestedItemSelector) {
1366
+ content = content.find('.' + this.settings.nestedItemSelector);
1367
+ }
1368
+
1369
+ content.filter(function() {
1370
+ return this.nodeType === 1;
1371
+ }).each($.proxy(function(index, item) {
1372
+ item = this.prepare(item);
1373
+ this.$stage.append(item);
1374
+ this._items.push(item);
1375
+ this._mergers.push(item.find('[data-merge]').andSelf('[data-merge]').attr('data-merge') * 1 || 1);
1376
+ }, this));
1377
+
1378
+ this.reset($.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0);
1379
+
1380
+ this.invalidate('items');
1381
  };
1382
 
1383
  /**
1384
  * Adds an item.
1385
+ * @todo Use `item` instead of `content` for the event arguments.
1386
  * @public
1387
  * @param {HTMLElement|jQuery|String} content - The item content to add.
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 {
1400
+ this._items[position].before(content);
1401
+ this._items.splice(position, 0, content);
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 });
1408
  };
1409
 
1410
  /**
1411
+ * Removes an item by its position.
1412
+ * @todo Use `item` instead of `content` for the event arguments.
1413
  * @public
1414
+ * @param {Number} position - The relative position of the item to remove.
1415
  */
1416
+ Owl.prototype.remove = function(position) {
1417
+ position = this.normalize(position, true);
1418
+
1419
+ if (position === undefined) {
1420
+ return;
1421
+ }
1422
+
1423
+ this.trigger('remove', { content: this._items[position], position: position });
1424
+
1425
+ this._items[position].remove();
1426
+ this._items.splice(position, 1);
1427
+ this._mergers.splice(position, 1);
1428
+
1429
+ this.invalidate('items');
1430
+
1431
+ this.trigger('removed', { content: null, position: position });
1432
  };
1433
 
1434
  /**
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
  };
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
  }
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
  }
1507
  $el.css('opacity', 1);
1508
  if (loaded >= imgs.length) {
1509
  that.state.imagesLoaded = true;
1510
+ that.initialize();
1511
  }
1512
  };
1513
 
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
  /**
1566
  Owl.prototype.op = function(a, o, b) {
1567
  var rtl = this.settings.rtl;
1568
  switch (o) {
1569
+ case '<':
1570
+ return rtl ? a > b : a < b;
1571
+ case '>':
1572
+ return rtl ? a < b : a > b;
1573
+ case '>=':
1574
+ return rtl ? a <= b : a >= b;
1575
+ case '<=':
1576
+ return rtl ? a >= b : a <= b;
1577
+ default:
1578
+ break;
1579
  }
1580
  };
1581
 
1621
  */
1622
  Owl.prototype.trigger = function(name, data, namespace) {
1623
  var status = {
1624
+ item: { count: this._items.length, index: this.current() }
1625
  }, handler = $.camelCase(
1626
  $.grep([ 'on', name, namespace ], function(v) { return v })
1627
  .join('-').toLowerCase()
1630
  $.extend({ relatedTarget: this }, status, data)
1631
  );
1632
 
1633
+ if (!this._supress[name]) {
1634
+ $.each(this._plugins, function(name, plugin) {
1635
  if (plugin.onTrigger) {
1636
  plugin.onTrigger(event);
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
  }
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
1808
  })(window.Zepto || window.jQuery, window, document);
1809
 
1810
  /**
1811
+ * Lazy Plugin
1812
  * @version 2.0.0
1813
  * @author Bartosz Wojciechowski
1814
  * @license The MIT License (MIT)
1816
  ;(function($, window, document, undefined) {
1817
 
1818
  /**
1819
+ * Creates the lazy plugin.
1820
+ * @class The Lazy Plugin
1821
+ * @param {Owl} carousel - The Owl Carousel
1822
  */
1823
+ var Lazy = function(carousel) {
 
 
1824
 
1825
+ /**
1826
+ * Reference to the core.
1827
+ * @protected
1828
+ * @type {Owl}
1829
+ */
1830
+ this._core = carousel;
1831
+
1832
+ /**
1833
+ * Already loaded items.
1834
+ * @protected
1835
+ * @type {Array.<jQuery>}
1836
+ */
1837
+ this._loaded = [];
1838
+
1839
+ /**
1840
+ * Event handlers.
1841
+ * @protected
1842
+ * @type {Object}
1843
+ */
1844
+ this._handlers = {
1845
+ 'initialized.owl.carousel change.owl.carousel': $.proxy(function(e) {
1846
+ if (!e.namespace) {
1847
+ return;
1848
+ }
1849
+
1850
+ if (!this._core.settings || !this._core.settings.lazyLoad) {
1851
+ return;
1852
+ }
1853
+
1854
+ if ((e.property && e.property.name == 'position') || e.type == 'initialized') {
1855
+ var settings = this._core.settings,
1856
+ n = (settings.center && Math.ceil(settings.items / 2) || settings.items),
1857
+ i = ((settings.center && n * -1) || 0),
1858
+ position = ((e.property && e.property.value) || this._core.current()) + i,
1859
+ clones = this._core.clones().length,
1860
+ load = $.proxy(function(i, v) { this.load(v) }, this);
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)
1868
  };
1869
 
1870
+ // set the default options
1871
+ this._core.options = $.extend({}, Lazy.Defaults, this._core.options);
1872
+
1873
+ // register event handler
1874
+ this._core.$element.on(this._handlers);
1875
+ }
1876
 
1877
  /**
1878
  * Default options.
1879
  * @public
1880
  */
1881
+ Lazy.Defaults = {
1882
  lazyLoad: false
1883
+ }
1884
 
1885
  /**
1886
+ * Loads all resources of an item at the specified position.
1887
+ * @param {Number} position - The absolute position of the item.
1888
  * @protected
1889
  */
1890
+ Lazy.prototype.load = function(position) {
1891
+ var $item = this._core.$stage.children().eq(position),
1892
+ $elements = $item && $item.find('.owl-lazy');
1893
 
1894
+ if (!$elements || $.inArray($item.get(0), this._loaded) > -1) {
1895
+ return;
 
 
 
 
 
 
 
 
 
 
1896
  }
 
 
 
 
 
 
 
 
 
 
 
 
1897
 
1898
+ $elements.each($.proxy(function(index, element) {
1899
+ var $element = $(element), image,
1900
+ url = (window.devicePixelRatio > 1 && $element.attr('data-src-retina')) || $element.attr('data-src');
1901
 
1902
+ this._core.trigger('load', { element: $element, url: url }, 'lazy');
 
 
 
 
 
 
 
 
 
 
 
1903
 
1904
+ if ($element.is('img')) {
1905
+ $element.one('load.owl.lazy', $.proxy(function() {
1906
+ $element.css('opacity', 1);
1907
+ this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
1908
+ }, this)).attr('src', url);
1909
+ } else {
1910
+ image = new Image();
1911
+ image.onload = $.proxy(function() {
1912
+ $element.css({
1913
+ 'background-image': 'url(' + url + ')',
1914
+ 'opacity': '1'
1915
+ });
1916
+ this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
1917
+ }, this);
1918
+ image.src = url;
1919
+ }
1920
  }, this));
1921
+
1922
+ this._loaded.push($item.get(0));
1923
+ }
1924
 
1925
  /**
1926
  * Destroys the plugin.
1927
  * @public
1928
  */
1929
+ Lazy.prototype.destroy = function() {
1930
  var handler, property;
1931
 
1932
  for (handler in this.handlers) {
1933
+ this._core.$element.off(handler, this.handlers[handler]);
1934
  }
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
 
1942
  })(window.Zepto || window.jQuery, window, document);
1943
 
1952
  /**
1953
  * Creates the auto height plugin.
1954
  * @class The Auto Height Plugin
1955
+ * @param {Owl} carousel - The Owl Carousel
1956
  */
1957
+ var AutoHeight = function(carousel) {
1958
+ /**
1959
+ * Reference to the core.
1960
+ * @protected
1961
+ * @type {Owl}
1962
+ */
1963
+ this._core = carousel;
1964
 
1965
+ /**
1966
+ * All event handlers.
1967
+ * @protected
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)
1987
  };
1988
 
1989
+ // set default options
1990
+ this._core.options = $.extend({}, AutoHeight.Defaults, this._core.options);
1991
+
1992
+ // register event handlers
1993
+ this._core.$element.on(this._handlers);
1994
  };
1995
 
1996
  /**
2003
  };
2004
 
2005
  /**
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
 
2014
  AutoHeight.prototype.destroy = function() {
2015
  var handler, property;
2016
 
2017
+ for (handler in this._handlers) {
2018
+ this._core.$element.off(handler, this._handlers[handler]);
2019
  }
2020
  for (property in Object.getOwnPropertyNames(this)) {
2021
  typeof this[property] != 'function' && (this[property] = null);
2022
  }
2023
  };
2024
 
2025
+ $.fn.owlCarousel.Constructor.Plugins.AutoHeight = AutoHeight;
2026
 
2027
  })(window.Zepto || window.jQuery, window, document);
2028
 
2037
  /**
2038
  * Creates the video plugin.
2039
  * @class The Video Plugin
2040
+ * @param {Owl} carousel - The Owl Carousel
2041
  */
2042
+ var Video = function(carousel) {
2043
+ /**
2044
+ * Reference to the core.
2045
+ * @protected
2046
+ * @type {Owl}
2047
+ */
2048
+ this._core = carousel;
2049
 
2050
+ /**
2051
+ * Cache all video URLs.
2052
+ * @protected
2053
+ * @type {Object}
2054
+ */
2055
+ this._videos = {};
2056
+
2057
+ /**
2058
+ * Current playing item.
2059
+ * @protected
2060
+ * @type {jQuery}
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));
2092
  }
2093
  }, this)
2094
  };
2095
 
2096
+ // set default options
2097
+ this._core.options = $.extend({}, Video.Defaults, this._core.options);
2098
+
2099
+ // register event handlers
2100
+ this._core.$element.on(this._handlers);
2101
 
2102
+ this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) {
2103
+ this.play(e);
2104
  }, this));
2105
  };
2106
 
2114
  videoWidth: false
2115
  };
2116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2117
  /**
2118
  * Gets the video ID and the type (YouTube/Vimeo only).
2119
  * @protected
2120
+ * @param {jQuery} target - The target containing the video data.
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,
2128
+ height = target.attr('data-height') || this._core.settings.videoHeight,
2129
+ url = target.attr('href');
2130
+
2131
+ if (url) {
 
 
 
 
 
 
 
2132
  id = url.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);
2133
 
2134
  if (id[3].indexOf('youtu') > -1) {
2135
  type = 'youtube';
2136
  } else if (id[3].indexOf('vimeo') > -1) {
2137
  type = 'vimeo';
2138
+ } else {
2139
+ throw new Error('Video URL not supported.');
2140
  }
2141
  id = id[6];
2142
  } else {
2143
+ throw new Error('Missing video URL.');
2144
  }
2145
 
2146
+ this._videos[url] = {
 
 
 
 
 
2147
  type: type,
2148
+ id: id,
2149
+ width: width,
2150
+ height: height
2151
  };
2152
 
2153
+ item.attr('data-video', url);
 
 
 
 
2154
 
2155
+ this.thumbnail(target, this._videos[url]);
2156
  };
2157
 
2158
  /**
2159
  * Creates video thumbnail.
2160
  * @protected
2161
+ * @param {jQuery} target - The target containing the video data.
2162
  * @param {Object} info - The video info object.
2163
+ * @see `fetch`
2164
  */
2165
+ Video.prototype.thumbnail = function(target, video) {
2166
 
2167
+ var tnLink,
2168
+ icon,
2169
+ path,
2170
+ dimensions = video.width && video.height ? 'style="width:' + video.width + 'px;height:' + video.height + 'px;"' : '',
2171
+ customTn = target.find('img'),
2172
  srcType = 'src',
2173
  lazyClass = '',
2174
+ settings = this._core.settings,
2175
+ create = function(path) {
2176
+ icon = '<div class="owl-video-play-icon"></div>';
2177
+
2178
+ if (settings.lazyLoad) {
2179
+ tnLink = '<div class="owl-video-tn ' + lazyClass + '" ' + srcType + '="' + path + '"></div>';
2180
+ } else {
2181
+ tnLink = '<div class="owl-video-tn" style="opacity:1;background-image:url(' + path + ')"></div>';
2182
+ }
2183
+ target.after(tnLink);
2184
+ target.after(icon);
2185
+ };
2186
+
2187
+ // wrap video content into owl-video-wrapper div
2188
+ target.wrap('<div class="owl-video-wrapper"' + dimensions + '></div>');
2189
 
2190
+ if (this._core.settings.lazyLoad) {
2191
  srcType = 'data-src';
2192
  lazyClass = 'owl-lazy';
2193
  }
2194
 
2195
+ // custom thumbnail
 
2196
  if (customTn.length) {
2197
+ create(customTn.attr(srcType));
2198
  customTn.remove();
2199
  return false;
2200
  }
2201
 
2202
+ if (video.type === 'youtube') {
2203
+ path = "http://img.youtube.com/vi/" + video.id + "/hqdefault.jpg";
2204
+ create(path);
2205
+ } else if (video.type === 'vimeo') {
 
 
 
 
 
 
 
 
 
 
 
 
2206
  $.ajax({
2207
  type: 'GET',
2208
+ url: 'http://vimeo.com/api/v2/video/' + video.id + '.json',
2209
  jsonp: 'callback',
2210
  dataType: 'jsonp',
2211
  success: function(data) {
2212
  path = data[0].thumbnail_large;
2213
+ create(path);
 
 
 
2214
  }
2215
  });
2216
  }
2220
  * Stops the current video.
2221
  * @public
2222
  */
2223
+ Video.prototype.stop = function() {
2224
+ this._core.trigger('stop', null, 'video');
2225
+ this._playing.find('.owl-video-frame').remove();
2226
+ this._playing.removeClass('owl-video-playing');
2227
+ this._playing = null;
 
2228
  };
2229
 
2230
  /**
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
  /**
2267
  * Checks whether an video is currently in full screen mode or not.
2268
+ * @todo Bad style because looks like a readonly method but changes members.
2269
  * @protected
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
 
2307
  Video.prototype.destroy = function() {
2308
  var handler, property;
2309
 
2310
+ this._core.$element.off('click.owl.video');
2311
 
2312
+ for (handler in this._handlers) {
2313
+ this._core.$element.off(handler, this._handlers[handler]);
2314
  }
2315
  for (property in Object.getOwnPropertyNames(this)) {
2316
  typeof this[property] != 'function' && (this[property] = null);
2317
  }
2318
  };
2319
 
2320
+ $.fn.owlCarousel.Constructor.Plugins.Video = Video;
2321
 
2322
  })(window.Zepto || window.jQuery, window, document);
2323
 
2334
  * @class The Navigation Plugin
2335
  * @param {Owl} scope - The Owl Carousel
2336
  */
2337
+ var Animate = function(scope) {
2338
  this.core = scope;
2339
  this.core.options = $.extend({}, Animate.Defaults, this.core.options);
2340
  this.swapping = true;
2358
  }, this)
2359
  };
2360
 
2361
+ this.core.$element.on(this.handlers);
2362
  };
2363
 
2364
  /**
2385
 
2386
  var left,
2387
  clear = $.proxy(this.clear, this),
2388
+ previous = this.core.$stage.children().eq(this.previous),
2389
+ next = this.core.$stage.children().eq(this.next),
2390
  incoming = this.core.settings.animateIn,
2391
  outgoing = this.core.settings.animateOut;
2392
 
2425
  var handler, property;
2426
 
2427
  for (handler in this.handlers) {
2428
+ this.core.$element.off(handler, this.handlers[handler]);
2429
  }
2430
  for (property in Object.getOwnPropertyNames(this)) {
2431
  typeof this[property] != 'function' && (this[property] = null);
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
 
2475
  }, this)
2476
  };
2477
 
2478
+ this.core.$element.on(this.handlers);
2479
  };
2480
 
2481
  /**
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);
2585
  var Navigation = function(carousel) {
2586
  /**
2587
  * Reference to the core.
2588
+ * @protected
2589
  * @type {Owl}
2590
  */
2591
+ this._core = carousel;
2592
 
2593
  /**
2594
  * Indicates whether the plugin is initialized or not.
2595
+ * @protected
2596
  * @type {Boolean}
2597
  */
2598
+ this._initialized = false;
2599
 
2600
  /**
2601
  * The current paging indexes.
2602
+ * @protected
2603
  * @type {Array}
2604
  */
2605
+ this._pages = [];
2606
 
2607
  /**
2608
  * All DOM elements of the user interface.
2609
+ * @protected
2610
  * @type {Object}
2611
  */
2612
+ this._controls = {};
2613
 
2614
  /**
2615
  * Markup for an indicator.
2616
+ * @protected
2617
+ * @type {Array.<String>}
2618
  */
2619
+ this._templates = [];
2620
 
2621
  /**
2622
  * The carousel element.
2623
  * @type {jQuery}
2624
  */
2625
+ this.$element = this._core.$element;
2626
 
2627
  /**
2628
  * Overridden methods of the carousel.
2629
+ * @protected
2630
  * @type {Object}
2631
  */
2632
+ this._overrides = {
2633
+ next: this._core.next,
2634
+ prev: this._core.prev,
2635
+ to: this._core.to
2636
  };
2637
 
2638
  /**
2639
  * All event handlers.
2640
+ * @protected
2641
  * @type {Object}
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
 
2688
  // set default options
2689
+ this._core.options = $.extend({}, Navigation.Defaults, this._core.options);
2690
 
2691
  // register event handlers
2692
+ this.$element.on(this._handlers);
2693
  }
2694
 
2695
  /**
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();
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
 
2790
  Navigation.prototype.destroy = function() {
2791
  var handler, control, property, override;
2792
 
2793
+ for (handler in this._handlers) {
2794
+ this.$element.off(handler, this._handlers[handler]);
2795
  }
2796
+ for (control in this._controls) {
2797
+ this._controls[control].remove();
2798
  }
2799
  for (override in this.overides) {
2800
+ this._core[override] = this._overrides[override];
2801
  }
2802
  for (property in Object.getOwnPropertyNames(this)) {
2803
  typeof this[property] != 'function' && (this[property] = null);
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
 
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
  /**
2883
  * @param {Event} event - The event object which gets thrown.
2884
  */
2885
  Navigation.prototype.onTrigger = function(event) {
2886
+ var settings = this._core.settings;
2887
 
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
 
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
  }
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;
2921
+ position = this._pages[((position % length) + length) % length].start;
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;
2933
  * @param {Number} [speed=false] - The time in milliseconds for the transition.
2934
  */
2935
  Navigation.prototype.next = function(speed) {
2936
+ $.proxy(this._overrides.to, this._core)(this.getPosition(true), speed);
2937
  }
2938
 
2939
  /**
2942
  * @param {Number} [speed=false] - The time in milliseconds for the transition.
2943
  */
2944
  Navigation.prototype.prev = function(speed) {
2945
+ $.proxy(this._overrides.to, this._core)(this.getPosition(false), speed);
2946
  }
2947
 
2948
  /**
2956
  var length;
2957
 
2958
  if (!standard) {
2959
+ length = this._pages.length;
2960
+ $.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed);
2961
  } else {
2962
+ $.proxy(this._overrides.to, this._core)(position, speed);
2963
  }
2964
  }
2965
 
2984
  var Hash = function(carousel) {
2985
  /**
2986
  * Reference to the core.
2987
+ * @protected
2988
  * @type {Owl}
2989
  */
2990
+ this._core = carousel;
2991
 
2992
  /**
2993
  * Hash table for the hashes.
2994
+ * @protected
2995
  * @type {Object}
2996
  */
2997
+ this._hashes = {};
2998
 
2999
  /**
3000
  * The carousel element.
3001
  * @type {jQuery}
3002
  */
3003
+ this.$element = this._core.$element;
3004
 
3005
  /**
3006
  * All event handlers.
3007
+ * @protected
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
 
3022
  // set default options
3023
+ this._core.options = $.extend({}, Hash.Defaults, this._core.options);
3024
 
3025
  // register the event handlers
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
 
3056
 
3057
  $(window).off('hashchange.owl.navigation');
3058
 
3059
+ for (handler in this._handlers) {
3060
+ this._core.$element.off(handler, this._handlers[handler]);
3061
  }
3062
  for (property in Object.getOwnPropertyNames(this)) {
3063
  typeof this[property] != 'function' && (this[property] = null);
includes/js/owlcarousel/owl.carousel.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(a,b,c,d){function e(b,c){b.owlCarousel={name:"Owl Carousel",author:"Bartosz Wojciechowski",version:"2.0.0-beta.2.1"},this.settings=null,this.options=a.extend({},e.Defaults,c),this.itemData=a.extend({},l),this.dom=a.extend({},m),this.width=a.extend({},n),this.num=a.extend({},o),this.drag=a.extend({},q),this.state=a.extend({},r),this.e=a.extend({},s),this.plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=null,this.dom.el=b,this.dom.$el=a(b);for(var d in e.Plugins)this.plugins[d[0].toLowerCase()+d.slice(1)]=new e.Plugins[d](this);this.init()}function f(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 g(){return f(["transition","WebkitTransition","MozTransition","OTransition"])[1]}function h(){return f(["transform","WebkitTransform","MozTransform","OTransform","msTransform"])[0]}function i(){return f(["perspective","webkitPerspective","MozPerspective","OPerspective","MsPerspective"])[0]}function j(){return"ontouchstart"in b||!!navigator.msMaxTouchPoints}function k(){return b.navigator.msPointerEnabled}var l,m,n,o,p,q,r,s;l={index:!1,indexAbs:!1,posLeft:!1,clone:!1,active:!1,loaded:!1,lazyLoad:!1,current:!1,width:!1,center:!1,page:!1,hasVideo:!1,playVideo:!1},m={el:null,$el:null,stage:null,$stage:null,oStage:null,$oStage:null,$items:null,$oItems:null,$cItems:null,$content:null},n={el:0,stage:0,item:0,prevWindow:0,cloneLast:0},o={items:0,oItems:0,cItems:0,active:0,merged:[]},q={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},r={isTouch:!1,isScrolling:!1,isSwiping:!1,direction:!1,inMotion:!1},s={_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,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.Plugins={},e.prototype.init=function(){if(this.setResponsiveOptions(),this.trigger("initialize"),this.dom.$el.hasClass(this.settings.baseClass)||this.dom.$el.addClass(this.settings.baseClass),this.dom.$el.hasClass(this.settings.themeClass)||this.dom.$el.addClass(this.settings.themeClass),this.settings.rtl&&this.dom.$el.addClass("owl-rtl"),this.browserSupport(),this.settings.autoWidth&&this.state.imagesLoaded!==!0){var a,b,c;if(a=this.dom.$el.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.dom.$el.children(b).width(),a.length&&0>=c)return this.preloadAutoWidthImages(a),!1}this.width.prevWindow=this.viewport(),this.createStage(),this.fetchContent(),this.eventsCall(),this.internalEvents(),this.dom.$el.addClass("owl-loading"),this.refresh(!0),this.dom.$el.removeClass("owl-loading").addClass("owl-loaded"),this.trigger("initialized"),this.addTriggerableEvents()},e.prototype.setResponsiveOptions=function(){if(this.options.responsive){var b=this.viewport(),c=this.options.responsive,d=-1;a.each(c,function(a){b>=a&&a>d&&(d=Number(a))}),this.settings=a.extend({},this.options,c[d]),delete this.settings.responsive,this.settings.responsiveClass&&this.dom.$el.attr("class",function(a,b){return b.replace(/\b owl-responsive-\S+/g,"")}).addClass("owl-responsive-"+d)}else this.settings=a.extend({},this.options)},e.prototype.optionsLogic=function(){this.dom.$el.toggleClass("owl-center",this.settings.center),this.settings.loop&&this.num.oItems<this.settings.items&&(this.settings.loop=!1),this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.createStage=function(){var b=c.createElement("div"),d=c.createElement(this.settings.stageElement);b.className="owl-stage-outer",d.className="owl-stage",b.appendChild(d),this.dom.el.appendChild(b),this.dom.oStage=b,this.dom.$oStage=a(b),this.dom.stage=d,this.dom.$stage=a(d),b=null,d=null},e.prototype.createItemContainer=function(){var b=c.createElement(this.settings.itemElement);return b.className=this.settings.itemClass,a(b)},e.prototype.fetchContent=function(b){this.dom.$content=b?b instanceof jQuery?b:a(b):this.settings.nestedItemSelector?this.dom.$el.find("."+this.settings.nestedItemSelector).not(".owl-stage-outer"):this.dom.$el.children().not(".owl-stage-outer"),this.num.oItems=this.dom.$content.length,0!==this.num.oItems&&this.initStructure()},e.prototype.initStructure=function(){this.createNormalStructure()},e.prototype.createNormalStructure=function(){var a,b;for(a=0;a<this.num.oItems;a++)b=this.createItemContainer(),this.initializeItemContainer(b,this.dom.$content[a]),this.dom.$stage.append(b);this.dom.$content=null},e.prototype.createCustomStructure=function(a){var b,c;for(b=0;a>b;b++)c=this.createItemContainer(),this.createItemContainerData(c),this.dom.$stage.append(c)},e.prototype.initializeItemContainer=function(a,b){this.trigger("change",{property:{name:"item",value:a}}),this.createItemContainerData(a),a.append(b),this.trigger("changed",{property:{name:"item",value:a}})},e.prototype.createItemContainerData=function(b,c){var d=a.extend({},this.itemData);c&&a.extend(d,c.data("owl-item")),b.data("owl-item",d)},e.prototype.cloneItemContainer=function(a){var b=a.clone(!0,!0).addClass("cloned");return this.createItemContainerData(b,b),b.data("owl-item").clone=!0,b},e.prototype.updateLocalContent=function(){var b,c;for(this.dom.$oItems=this.dom.$stage.find("."+this.settings.itemClass).filter(function(){return a(this).data("owl-item").clone===!1}),this.num.oItems=this.dom.$oItems.length,b=0;b<this.num.oItems;b++)c=this.dom.$oItems.eq(b),c.data("owl-item").index=b},e.prototype.loopClone=function(){if(!this.settings.loop||this.num.oItems<this.settings.items)return!1;var b,c,d,e=this.settings.items,f=this.num.oItems-1;for(this.settings.stagePadding&&1===this.settings.items&&(e+=1),this.num.cItems=2*e,d=0;e>d;d++)b=this.cloneItemContainer(this.dom.$oItems.eq(d)),c=this.cloneItemContainer(this.dom.$oItems.eq(f-d)),this.dom.$stage.append(b),this.dom.$stage.prepend(c);this.dom.$cItems=this.dom.$stage.find("."+this.settings.itemClass).filter(function(){return a(this).data("owl-item").clone===!0})},e.prototype.reClone=function(){null!==this.dom.$cItems&&(this.dom.$cItems.remove(),this.dom.$cItems=null,this.num.cItems=0),this.settings.loop&&this.loopClone()},e.prototype.calculate=function(){var a,b,c,d,e,f,g,h=0,i=0;for(this.width.el=this.dom.$el.width()-2*this.settings.stagePadding,this.width.view=this.dom.$el.width(),c=this.width.el-this.settings.margin*(1===this.settings.items?0:this.settings.items-1),this.width.el=this.width.el+this.settings.margin,this.width.item=(c/this.settings.items+this.settings.margin).toFixed(3),this.dom.$items=this.dom.$stage.find(".owl-item"),this.num.items=this.dom.$items.length,this.settings.autoWidth&&this.dom.$items.css("width",""),this._coordinates=[],this.num.merged=[],d=this.settings.rtl?this.settings.center?-(this.width.el/2):0:this.settings.center?this.width.el/2:0,this.width.mergeStage=0,a=0;a<this.num.items;a++)this.settings.merge?(g=this.dom.$items.eq(a).find("[data-merge]").attr("data-merge")||1,this.settings.mergeFit&&g>this.settings.items&&(g=this.settings.items),this.num.merged.push(parseInt(g)),this.width.mergeStage+=this.width.item*this.num.merged[a]):this.num.merged.push(1),f=this.width.item*this.num.merged[a],this.settings.autoWidth&&(f=this.dom.$items.eq(a).width()+this.settings.margin,this.settings.rtl?this.dom.$items[a].style.marginLeft=this.settings.margin+"px":this.dom.$items[a].style.marginRight=this.settings.margin+"px"),this._coordinates.push(d),this.dom.$items.eq(a).data("owl-item").posLeft=h,this.dom.$items.eq(a).data("owl-item").width=f,this.settings.rtl?(d+=f,h+=f):(d-=f,h-=f),i-=Math.abs(f),this.settings.center&&(this._coordinates[a]=this.settings.rtl?this._coordinates[a]+f/2:this._coordinates[a]-f/2);for(this.width.stage=Math.abs(this.settings.autoWidth?this.settings.center?i:d:i),e=this.num.oItems+this.num.cItems,b=0;e>b;b++)this.dom.$items.eq(b).data("owl-item").indexAbs=b;this.setSizes()},e.prototype.setSizes=function(){this.settings.stagePadding!==!1&&(this.dom.oStage.style.paddingLeft=this.settings.stagePadding+"px",this.dom.oStage.style.paddingRight=this.settings.stagePadding+"px"),this.settings.rtl?b.setTimeout(a.proxy(function(){this.dom.stage.style.width=this.width.stage+"px"},this),0):this.dom.stage.style.width=this.width.stage+"px";for(var c=0;c<this.num.items;c++)this.settings.autoWidth||(this.dom.$items[c].style.width=this.width.item-this.settings.margin+"px"),this.settings.rtl?this.dom.$items[c].style.marginLeft=this.settings.margin+"px":this.dom.$items[c].style.marginRight=this.settings.margin+"px",1===this.num.merged[c]||this.settings.autoWidth||(this.dom.$items[c].style.width=this.width.item*this.num.merged[c]-this.settings.margin+"px");this.width.stagePrev=this.width.stage},e.prototype.responsive=function(){if(!this.num.oItems)return!1;var a=this.isElWidthChanged();return a?this.trigger("resize").isDefaultPrevented()?!1:(this.state.responsive=!0,this.refresh(),this.state.responsive=!1,void this.trigger("resized")):!1},e.prototype.refresh=function(){var a=this.dom.$oItems&&this.dom.$oItems.eq(this.normalize(this.current(),!0));return this.trigger("refresh"),this.setResponsiveOptions(),this.updateLocalContent(),this.optionsLogic(),0===this.num.oItems?!1:(this.dom.$stage.addClass("owl-refresh"),this.reClone(),this.calculate(),this.dom.$stage.removeClass("owl-refresh"),a?this.reset(a.data("owl-item").indexAbs):(this.dom.oStage.scrollLeft=0,this.reset(this.dom.$oItems.eq(0).data("owl-item").indexAbs)),this.state.orientation=b.orientation,this.watchVisibility(),void this.trigger("refreshed"))},e.prototype.updateActiveItems=function(){this.trigger("change",{property:{name:"items",value:this.dom.$items}});var a,b,c,d,e,f;for(a=0;a<this.num.items;a++)this.dom.$items.eq(a).data("owl-item").active=!1,this.dom.$items.eq(a).data("owl-item").current=!1,this.dom.$items.eq(a).removeClass(this.settings.activeClass).removeClass(this.settings.centerClass);for(this.num.active=0,padding=2*this.settings.stagePadding,stageX=this.coordinates(this.current())+padding,view=this.settings.rtl?this.width.view:-this.width.view,b=0;b<this.num.items;b++)c=this.dom.$items.eq(b),d=c.data("owl-item").posLeft,e=c.data("owl-item").width,f=this.settings.rtl?d-e-padding:d-e+padding,(this.op(d,"<=",stageX)&&this.op(d,">",stageX+view)||this.op(f,"<",stageX)&&this.op(f,">",stageX+view))&&(this.num.active++,c.data("owl-item").active=!0,c.data("owl-item").current=!0,c.addClass(this.settings.activeClass),this.settings.lazyLoad||(c.data("owl-item").loaded=!0),this.settings.loop&&this.updateClonedItemsState(c.data("owl-item").index));this.settings.center&&(this.dom.$items.eq(this.current()).addClass(this.settings.centerClass).data("owl-item").center=!0),this.trigger("changed",{property:{name:"items",value:this.dom.$items}})},e.prototype.updateClonedItemsState=function(a){var b,c,d;for(this.settings.center&&(b=this.dom.$items.eq(this.current()).data("owl-item").index),d=0;d<this.num.items;d++)c=this.dom.$items.eq(d),c.data("owl-item").index===a&&(c.data("owl-item").current=!0,c.data("owl-item").index===b&&c.addClass(this.settings.centerClass))},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._transitionEnd=a.proxy(function(a){this.transitionEnd(a)},this),this.e._resizer=a.proxy(function(){this.responsiveTimer()},this),this.e._responsiveCall=a.proxy(function(){this.responsive()},this),this.e._preventClick=a.proxy(function(a){this.preventClick(a)},this)},e.prototype.responsiveTimer=function(){return this.viewport()===this.width.prevWindow?!1:(b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this.e._responsiveCall,this.settings.responsiveRefreshRate),void(this.width.prevWindow=this.viewport()))},e.prototype.internalEvents=function(){var a=j(),d=k();this.dragType=a&&!d?["touchstart","touchmove","touchend","touchcancel"]:a&&d?["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerCancel"]:["mousedown","mousemove","mouseup"],(a||d)&&this.settings.touchDrag?this.on(c,this.dragType[3],this.e._onDragEnd):(this.dom.$stage.on("dragstart",function(){return!1}),this.settings.mouseDrag?this.dom.stage.onselectstart=function(){return!1}:this.dom.$el.addClass("owl-text-select-on")),this.transitionEndVendor&&this.on(this.dom.stage,this.transitionEndVendor,this.e._transitionEnd,!1),this.settings.responsive!==!1&&this.on(b,"resize",this.e._resizer,!1),this.dragEvents()},e.prototype.dragEvents=function(){!this.settings.touchDrag||"touchstart"!==this.dragType[0]&&"MSPointerDown"!==this.dragType[0]?this.settings.mouseDrag&&"mousedown"===this.dragType[0]?this.on(this.dom.stage,this.dragType[0],this.e._onDragStart,!1):this.off(this.dom.stage,this.dragType[0],this.e._onDragStart):this.on(this.dom.stage,this.dragType[0],this.e._onDragStart,!1)},e.prototype.onDragStart=function(a){var d,e,f,g,h;if(d=a.originalEvent||a||b.event,3===d.which)return!1;if("mousedown"===this.dragType[0]&&this.dom.$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,e="touchstart"===d.type,f=e?a.targetTouches[0].pageX:d.pageX||d.clientX,g=e?a.targetTouches[0].pageY:d.pageY||d.clientY,this.drag.offsetX=this.dom.$stage.position().left-this.settings.stagePadding,this.drag.offsetY=this.dom.$stage.position().top,this.settings.rtl&&(this.drag.offsetX=this.dom.$stage.position().left+this.width.stage-this.width.el+this.settings.margin),this.state.inMotion&&this.support3d)h=this.getTransformProperty(),this.drag.offsetX=h,this.animate(h),this.state.inMotion=!0;else if(this.state.inMotion&&!this.support3d)return this.state.inMotion=!1,!1;this.drag.startX=f-this.drag.offsetX,this.drag.startY=g-this.drag.offsetY,this.drag.start=f-this.drag.startX,this.drag.targetEl=d.target||d.srcElement,this.drag.updatedX=this.drag.start,("IMG"===this.drag.targetEl.tagName||"A"===this.drag.targetEl.tagName)&&(this.drag.targetEl.draggable=!1),this.on(c,this.dragType[1],this.e._onDragMove,!1),this.on(c,this.dragType[2],this.e._onDragEnd,!1)},e.prototype.onDragMove=function(a){var c,e,f,g,h,i,j;this.state.isTouch&&(this.state.isScrolling||(c=a.originalEvent||a||b.event,e="touchmove"==c.type,f=e?c.targetTouches[0].pageX:c.pageX||c.clientX,g=e?c.targetTouches[0].pageY:c.pageY||c.clientY,this.drag.currentX=f-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.num.oItems):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.num.oItems)):(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(){var a,b,d;if(this.state.isTouch){if("mousedown"===this.dragType[0]&&this.dom.$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(),a=this.drag.endTime-this.drag.startTime,b=Math.abs(this.drag.distance),(b>3||a>300)&&this.removeClick(this.drag.targetEl),d=this.closest(this.drag.updatedX),this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(d),this.settings.pullDrag||this.drag.updatedX!==this.coordinates(d)||this.transitionEnd(),this.drag.distance=0,this.off(c,this.dragType[1],this.e._onDragMove),this.off(c,this.dragType[2],this.e._onDragEnd)}},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.dom.stage,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=0,d=30;return this.settings.freeDrag||a.each(this.coordinates(),a.proxy(function(a,e){b>e-d&&e+d>b?c=a:this.op(b,"<",e)&&this.op(b,">",this.coordinates(a+1)||e-this.width.el)&&(c="left"===this.state.direction?a+1:a)},this)),this.settings.loop||(this.op(b,">",this.coordinates(this.minimum()))?c=b=this.minimum():this.op(b,"<",this.coordinates(this.maximum()))&&(c=b=this.maximum())),c},e.prototype.animate=function(b){this.trigger("translate"),this.state.inMotion=this.speed()>0,this.support3d?this.dom.$stage.css({transform:"translate3d("+b+"px,0px, 0px)",transition:this.speed()/1e3+"s"}):this.state.isTouch?this.dom.$stage.css({left:b+"px"}):this.dom.$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.num.oItems)return d;if(a=this.normalize(a),this._current===a)this.animate(this.coordinates(this._current));else{var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.animate(this.coordinates(this._current)),this.updateActiveItems(),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.reset=function(a){this.suppress(["change","changed"]),this.speed(0),this.current(a),this.release(["change","changed"])},e.prototype.normalize=function(a,b){if(a===d||!this.dom.$items)return d;if(this.settings.loop){var c=this.dom.$items.length;a=(a%c+c)%c}else a=Math.max(this.minimum(),Math.min(this.maximum(),a));return b?this.dom.$items.eq(a).data("owl-item").index:a},e.prototype.maximum=function(){var b,c,d=this.settings;if(!d.loop&&d.center)b=this.num.oItems-1;else if(d.loop||d.center)if(d.loop||d.center)b=this.num.oItems+d.items;else{if(!d.autoWidth&&!d.merge)throw"Can not detect maximum absolute position.";revert=d.rtl?1:-1,c=this.dom.$stage.width()-this.$el.width(),a.each(this.coordinates(),function(a,d){return d*revert>=c?!1:void(b=a+1)})}else b=this.num.oItems-d.items;return b},e.prototype.minimum=function(){return this.dom.$oItems.eq(0).data("owl-item").indexAbs},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(a){return a!==d?this._coordinates[a]:this._coordinates},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.normalize(this.current(),!0),f=this.current(),g=this.current(),h=this.current()+e,i=0>g-h?!0:!1;h<this.settings.items&&i===!1?(f=this.num.items-(this.settings.items-g)-this.settings.items,this.reset(f)):h>=this.num.items-this.settings.items&&i===!0&&(f=g-this.num.oItems,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),30)}else this.speed(this.duration(this.current(),c,d)),this.current(c)},e.prototype.next=function(a){a=a||!1,this.to(this.normalize(this.current(),!0)+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.normalize(this.current(),!0)-1,a)},e.prototype.transitionEnd=function(a){if(a!==d){a.stopPropagation();var b=a.target||a.srcElement||a.originalTarget;if(b!==this.dom.stage)return!1}this.state.inMotion=!1,this.trigger("translated")},e.prototype.isElWidthChanged=function(){var a=this.dom.$el.width()-this.settings.stagePadding,b=this.width.el+this.settings.margin;return a!==b},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.insertContent=function(a){this.dom.$stage.empty(),this.fetchContent(a),this.refresh()},e.prototype.addItem=function(a,b){var c=this.createItemContainer();b=b||0,this.initializeItemContainer(c,a),0===this.dom.$oItems.length?this.dom.$stage.append(c):-1!==p?this.dom.$oItems.eq(b).before(c):this.dom.$oItems.eq(b).after(c),this.refresh()},e.prototype.removeItem=function(a){this.dom.$oItems.eq(a).remove(),this.refresh()},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.insertContent,add:this.addItem,remove:this.removeItem},a.proxy(function(a,c){this.dom.$el.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.dom.el)&&(this.dom.$el.removeClass("owl-hidden"),this.refresh(),b.clearInterval(this.e._checkVisibile))}c(this.dom.el)||(this.dom.$el.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.init())},f.src=e.attr("src")||e.attr("data-src")||e.attr("data-src-retina")})},e.prototype.destroy=function(){this.dom.$el.hasClass(this.settings.themeClass)&&this.dom.$el.removeClass(this.settings.themeClass),this.settings.responsive!==!1&&this.off(b,"resize",this.e._resizer),this.transitionEndVendor&&this.off(this.dom.stage,this.transitionEndVendor,this.e._transitionEnd);for(var a in this.plugins)this.plugins[a].destroy();(this.settings.mouseDrag||this.settings.touchDrag)&&(this.off(this.dom.stage,this.dragType[0],this.e._onDragStart),this.settings.mouseDrag&&this.off(c,this.dragType[3],this.e._onDragStart),this.settings.mouseDrag&&(this.dom.$stage.off("dragstart",function(){return!1}),this.dom.stage.onselectstart=function(){})),this.dom.$el.off(".owl"),null!==this.dom.$cItems&&this.dom.$cItems.remove(),this.e=null,this.dom.$el.data("owlCarousel",null),delete this.dom.el.owlCarousel,this.dom.$stage.unwrap(),this.dom.$items.unwrap(),this.dom.$items.contents().unwrap(),this.dom=null},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.num.oItems,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[g.type]||(a.each(this.plugins,function(a,b){b.onTrigger&&b.onTrigger(g)}),this.dom.$el.trigger(g),"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=i(),this.support3d){this.transformVendor=h();var a=["transitionend","webkitTransitionEnd","transitionend","oTransitionEnd"];this.transitionEndVendor=a[g()],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){LazyLoad=function(b){this.owl=b,this.owl.options=a.extend({},LazyLoad.Defaults,this.owl.options),this.handlers={"changed.owl.carousel":a.proxy(function(a){"items"==a.property.name&&a.property.value&&!a.property.value.is(":empty")&&this.check()},this)},this.owl.dom.$el.on(this.handlers)},LazyLoad.Defaults={lazyLoad:!1},LazyLoad.prototype.check=function(){var a,c,d,e,f=b.devicePixelRatio>1?"data-src-retina":"data-src";for(d=0;d<this.owl.num.items;d++)e=this.owl.dom.$items.eq(d),e.data("owl-item").current===!0&&e.data("owl-item").loaded===!1&&(c=e.find(".owl-lazy"),a=c.attr(f),a=a||c.attr("data-src"),a&&(c.css("opacity","0"),this.preload(c,e)))},LazyLoad.prototype.preload=function(c,d){var e,f,g;c.each(a.proxy(function(c,h){this.owl.trigger("load",null,"lazy"),e=a(h),f=new Image,g=e.attr(b.devicePixelRatio>1?"data-src-retina":"data-src"),g=g||e.attr("data-src"),f.onload=a.proxy(function(){d.data("owl-item").loaded=!0,e.is("img")?e.attr("src",f.src):e.css("background-image","url("+f.src+")"),e.css("opacity",1),this.owl.trigger("loaded",null,"lazy")},this),f.src=g},this))},LazyLoad.prototype.destroy=function(){var a,b;for(a in this.handlers)this.owl.dom.$el.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.lazyLoad=LazyLoad}(window.Zepto||window.jQuery,window,document),function(a,b){AutoHeight=function(b){this.owl=b,this.owl.options=a.extend({},AutoHeight.Defaults,this.owl.options),this.handlers={"changed.owl.carousel":a.proxy(function(a){"position"==a.property.name&&this.owl.settings.autoHeight&&this.setHeight()},this)},this.owl.dom.$el.on(this.handlers)},AutoHeight.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},AutoHeight.prototype.setHeight=function(){var a,c=this.owl.dom.$items.eq(this.owl.current()),d=this.owl.dom.$oStage,e=0;this.owl.dom.$oStage.hasClass(this.owl.settings.autoHeightClass)||this.owl.dom.$oStage.addClass(this.owl.settings.autoHeightClass),a=b.setInterval(function(){e+=1,c.data("owl-item").loaded?(d.height(c.height()+"px"),clearInterval(a)):500===e&&clearInterval(a)},100)},AutoHeight.prototype.destroy=function(){var a,b;for(a in this.handlers)this.owl.dom.$el.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoHeight=AutoHeight}(window.Zepto||window.jQuery,window,document),function(a,b,c){Video=function(b){this.owl=b,this.owl.options=a.extend({},Video.Defaults,this.owl.options),this.handlers={"resize.owl.carousel":a.proxy(function(a){this.owl.settings.video&&!this.isInFullScreen()&&a.preventDefault()},this),"refresh.owl.carousel changed.owl.carousel":a.proxy(function(){this.owl.state.videoPlay&&this.stopVideo()},this),"refresh.owl.carousel refreshed.owl.carousel":a.proxy(function(a){return this.owl.settings.video?void(this.refreshing="refresh"==a.type):!1},this),"changed.owl.carousel":a.proxy(function(a){this.refreshing&&"items"==a.property.name&&a.property.value&&!a.property.value.is(":empty")&&this.checkVideoLinks()},this)},this.owl.dom.$el.on(this.handlers),this.owl.dom.$el.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.playVideo(a)},this))},Video.Defaults={video:!1,videoHeight:!1,videoWidth:!1},Video.prototype.checkVideoLinks=function(){var a,b,c;for(c=0;c<this.owl.num.items;c++)b=this.owl.dom.$items.eq(c),b.data("owl-item").hasVideo||(a=b.find(".owl-video"),a.length&&(this.owl.state.hasVideos=!0,this.owl.dom.$items.eq(c).data("owl-item").hasVideo=!0,a.css("display","none"),this.getVideoInfo(a,b)))},Video.prototype.getVideoInfo=function(a,b){var c,d,e,f,g=a.data("vimeo-id"),h=a.data("youtube-id"),i=a.data("width")||this.owl.settings.videoWidth,j=a.data("height")||this.owl.settings.videoHeight,k=a.attr("href");if(g)d="vimeo",e=g;else if(h)d="youtube",e=h;else{if(!k)throw new Error("Missing video link.");e=k.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),e[3].indexOf("youtu")>-1?d="youtube":e[3].indexOf("vimeo")>-1&&(d="vimeo"),e=e[6]}b.data("owl-item").videoType=d,b.data("owl-item").videoId=e,b.data("owl-item").videoWidth=i,b.data("owl-item").videoHeight=j,c={type:d,id:e},f=i&&j?'style="width:'+i+"px;height:"+j+'px;"':"",a.wrap('<div class="owl-video-wrapper"'+f+"></div>"),this.createVideoTn(a,c)},Video.prototype.createVideoTn=function(b,c){function d(a){f='<div class="owl-video-play-icon"></div>',e=k.settings.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(e),b.after(f)}var e,f,g,h=b.find("img"),i="src",j="",k=this.owl;return this.owl.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(d(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(g="http://img.youtube.com/vi/"+c.id+"/hqdefault.jpg",d(g)):"vimeo"===c.type&&a.ajax({type:"GET",url:"http://vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){g=a[0].thumbnail_large,d(g),k.settings.loop&&k.updateActiveItems()}}))},Video.prototype.stopVideo=function(){this.owl.trigger("stop",null,"video");var a=this.owl.dom.$items.eq(this.owl.state.videoPlayIndex);a.find(".owl-video-frame").remove(),a.removeClass("owl-video-playing"),this.owl.state.videoPlay=!1},Video.prototype.playVideo=function(b){this.owl.trigger("play",null,"video"),this.owl.state.videoPlay&&this.stopVideo();var c,d,e,f=a(b.target||b.srcElement),g=f.closest("."+this.owl.settings.itemClass);e=g.data("owl-item").videoType,id=g.data("owl-item").videoId,width=g.data("owl-item").videoWidth||Math.floor(g.data("owl-item").width-this.owl.settings.margin),height=g.data("owl-item").videoHeight||this.owl.dom.$stage.height(),"youtube"===e?c='<iframe width="'+width+'" height="'+height+'" src="http://www.youtube.com/embed/'+id+"?autoplay=1&v="+id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===e&&(c='<iframe src="http://player.vimeo.com/video/'+id+'?autoplay=1" width="'+width+'" height="'+height+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),g.addClass("owl-video-playing"),this.owl.state.videoPlay=!0,this.owl.state.videoPlayIndex=g.data("owl-item").indexAbs,d=a('<div style="height:'+height+"px; width:"+width+'px" class="owl-video-frame">'+c+"</div>"),f.after(d)
2
- },Video.prototype.isInFullScreen=function(){var d=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return d&&a(d.parentNode).hasClass("owl-video-frame")&&(this.owl.speed(0),this.owl.state.isFullScreen=!0),d&&this.owl.state.isFullScreen&&this.owl.state.videoPlay?!1:this.owl.state.isFullScreen?(this.owl.state.isFullScreen=!1,!1):this.owl.state.videoPlay&&this.owl.state.orientation!==b.orientation?(this.owl.state.orientation=b.orientation,!1):!0},Video.prototype.destroy=function(){var a,b;this.owl.dom.$el.off("click.owl.video");for(a in this.handlers)this.owl.dom.$el.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.video=Video}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){Animate=function(b){this.core=b,this.core.options=a.extend({},Animate.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.dom.$el.on(this.handlers)},Animate.Defaults={animateOut:!1,animateIn:!1},Animate.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.dom.$items.eq(this.previous),e=this.core.dom.$items.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))}},Animate.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()},Animate.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.dom.$el.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=Animate}(window.Zepto||window.jQuery,window,document),function(a,b,c){Autoplay=function(b){this.core=b,this.core.options=a.extend({},Autoplay.Defaults,this.core.options),this.handlers={"translated.owl.carousel refreshed.owl.carousel":a.proxy(function(){this.autoplay()},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.dom.$el.on(this.handlers)},Autoplay.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},Autoplay.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)},Autoplay.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)},Autoplay.prototype.stop=function(){b.clearInterval(this.interval)},Autoplay.prototype.pause=function(){b.clearInterval(this.interval)},Autoplay.prototype.destroy=function(){var a,c;b.clearInterval(this.interval);for(a in this.handlers)this.core.dom.$el.off(a,this.handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=Autoplay}(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.template=null,this.$element=this.core.dom.$el,this.overrides={next:this.core.next,prev:this.core.prev,to:this.core.to},this.handlers={"changed.owl.carousel":a.proxy(function(b){"items"==b.property.name&&(this.initialized||(this.initialize(),this.initialized=!0),this.update(),this.draw()),this.filling&&(b.property.value.data("owl-item").dot=a(":first-child",b.property.value).find("[data-dot]").andSelf().data("dot"))},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.filling=this.core.settings.dotsData&&"item"==a.property.name&&a.property.value&&a.property.value.is(":empty")},this),"refreshed.owl.carousel":a.proxy(function(){this.initialized&&(this.update(),this.draw())},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.template=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(this.core.dragType[2],"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(this.core.dragType[2],a.proxy(function(){this.prev()},this)),this.controls.$next.addClass(d.navClass[1]).html(d.navText[1]).hide().appendTo(b).on(this.core.dragType[2],a.proxy(function(){this.next()},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.num.cItems/2,f=this.core.num.items-e,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)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.num.merged[a]},b.prototype.draw=function(){var b,c,d="",e=this.core.settings,f=this.core.dom.$oItems,g=this.core.normalize(this.core.current(),!0);if(!e.nav||e.loop||e.navRewind||(this.controls.$previous.toggleClass("disabled",0>=g),this.controls.$next.toggleClass("disabled",g>=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,b>0){for(c=0;c<Math.abs(b);c++)d+=e.dotData?f.eq(c).data("owl-item").dot:this.template;this.controls.$indicators.append(d)}else 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.center||c.autoWidth||c.dotData?1:c.dotsEach||c.items}},b.prototype.current=function(){var b=this.core.normalize(this.core.current(),!0);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.normalize(this.core.current(),!0),d=this.core.num.oItems,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,c,d){"use strict";var e=function(c){this.core=c,this.hashes={},this.$element=this.core.dom.$el,this.handlers={"initialized.owl.carousel":a.proxy(function(){b.location.hash.substring(1)&&a(b).trigger("hashchange.owl.navigation")},this),"changed.owl.carousel":a.proxy(function(b){this.filling&&(b.property.value.data("owl-item").hash=a(":first-child",b.property.value).find("[data-hash]").andSelf().data("hash"),this.hashes[b.property.value.data("owl-item").hash]=b.property.value)},this),"change.owl.carousel":a.proxy(function(a){"position"==a.property.name&&this.core.current()===d&&"URLHash"==this.core.settings.startPosition&&(a.data=this.hashes[b.location.hash.substring(1)]),this.filling="item"==a.property.name&&a.property.value&&a.property.value.is(":empty")},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(){var a=b.location.hash.substring(1),c=this.core.dom.$oItems,d=this.hashes[a]&&c.index(this.hashes[a])||0;return a?(this.core.dom.oStage.scrollLeft=0,void this.core.to(d,!1,!0)):!1},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this.handlers)this.owl.dom.$el.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);
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/vendors/wpc-settings-framework/class-wpc-settings-framework.php CHANGED
@@ -69,7 +69,7 @@ class WC_Gallery_Settings_Framework {
69
  add_action( 'admin_init', array( $this, 'set_plugin_info' ) );
70
 
71
  add_action( 'init', array( $this, 'set_options' ), 100 );
72
- add_action( 'admin_init', array( $this, 'options_init' ) );
73
  add_action( 'admin_init', array( $this, 'options_activation' ), 200 );
74
  add_action( 'admin_menu', array( $this, 'options_admin_menu' ) );
75
 
@@ -109,7 +109,6 @@ class WC_Gallery_Settings_Framework {
109
  public function set_plugin_info() {
110
  $this->plugin_current_version = get_option( $this->plugin_prefix . 'current_version' );
111
 
112
- $active_plugins = get_option( 'active_plugins' );
113
  $plugin = get_plugins( '/' . $this->plugin_slug );
114
  if ( ! empty( $plugin ) ) {
115
  $plugin = array_shift( $plugin );
@@ -125,7 +124,7 @@ class WC_Gallery_Settings_Framework {
125
 
126
  $initialize = false;
127
 
128
- if ( ! $this->plugin_current_version ) {
129
  $initialize = true;
130
  }
131
  else if ( version_compare( $this->plugin_version, $this->plugin_current_version ) > 0 ) {
@@ -182,13 +181,7 @@ class WC_Gallery_Settings_Framework {
182
  }
183
 
184
  public function add_option( $option_name, $default ) {
185
- if ( $this->plugin_prefix . 'social_icons_display' == $option_name ) {
186
- // $default = wc_shortcodes_default_social_icons();
187
- // add_option( $option_name, $default );
188
- }
189
- else {
190
- add_option( $option_name, $default );
191
- }
192
  }
193
 
194
  /**
@@ -199,7 +192,7 @@ class WC_Gallery_Settings_Framework {
199
  *
200
  * @return void
201
  */
202
- public function options_init() {
203
  register_setting( $this->plugin_slug . '-wpcsf-current-version', $this->plugin_prefix . 'current_version' );
204
 
205
  foreach ( $this->options as $menu_slug => $o ) {
69
  add_action( 'admin_init', array( $this, 'set_plugin_info' ) );
70
 
71
  add_action( 'init', array( $this, 'set_options' ), 100 );
72
+ add_action( 'admin_init', array( $this, 'register_settings' ) );
73
  add_action( 'admin_init', array( $this, 'options_activation' ), 200 );
74
  add_action( 'admin_menu', array( $this, 'options_admin_menu' ) );
75
 
109
  public function set_plugin_info() {
110
  $this->plugin_current_version = get_option( $this->plugin_prefix . 'current_version' );
111
 
 
112
  $plugin = get_plugins( '/' . $this->plugin_slug );
113
  if ( ! empty( $plugin ) ) {
114
  $plugin = array_shift( $plugin );
124
 
125
  $initialize = false;
126
 
127
+ if ( ! isset( $this->plugin_current_version ) || empty( $this->plugin_current_version ) ) {
128
  $initialize = true;
129
  }
130
  else if ( version_compare( $this->plugin_version, $this->plugin_current_version ) > 0 ) {
181
  }
182
 
183
  public function add_option( $option_name, $default ) {
184
+ add_option( $option_name, $default );
 
 
 
 
 
 
185
  }
186
 
187
  /**
192
  *
193
  * @return void
194
  */
195
+ public function register_settings() {
196
  register_setting( $this->plugin_slug . '-wpcsf-current-version', $this->plugin_prefix . 'current_version' );
197
 
198
  foreach ( $this->options as $menu_slug => $o ) {
readme.txt CHANGED
@@ -46,6 +46,22 @@ Insert a gallery through your dashboard. You will see extra dropdown settings wh
46
 
47
  == Changelog ==
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  = Version 1.29 =
50
 
51
  * Added Image size identifier for easy reference
46
 
47
  == Changelog ==
48
 
49
+ = Version 1.34 =
50
+
51
+ * fixed bug with hide control option not being applied to flex slider
52
+ * fixed style bug with dynamic height content
53
+
54
+ = Version 1.30 =
55
+
56
+ * Fixed bug with captions displaying when there are not any
57
+ * Updated magnific popup gallery
58
+ * Fixed bug with update in settings framework
59
+ * Code clean up
60
+ * Updated owl carousel
61
+ * Rearranged gallery options
62
+ * enabled smooth height
63
+ * Updated flexslider library
64
+
65
  = Version 1.29 =
66
 
67
  * Added Image size identifier for easy reference
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.29
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.29' );
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.34
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.34' );
17
  define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
18
  define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
19
  define( 'WC_GALLERY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );