Version Description
Download this release
Release Info
| Developer | cbaldelomar |
| Plugin | |
| Version | 1.42 |
| Comparing to | |
| See all releases | |
Code changes from version 1.40 to 1.42
- includes/vendors/flexslider/README.mdown +144 -0
- includes/vendors/flexslider/changelog.txt +4 -0
- includes/vendors/flexslider/flexslider.css +288 -0
- includes/vendors/flexslider/fonts/flexslider-icon.eot +0 -0
- includes/vendors/flexslider/fonts/flexslider-icon.svg +19 -0
- includes/vendors/flexslider/fonts/flexslider-icon.ttf +0 -0
- includes/vendors/flexslider/fonts/flexslider-icon.woff +0 -0
- includes/vendors/flexslider/images/bg_play_pause.png +0 -0
- includes/vendors/flexslider/images/slide-arrow-left.png +0 -0
- includes/vendors/flexslider/images/slide-arrow-right.png +0 -0
- includes/vendors/flexslider/images/slide-arrows.png +0 -0
- includes/vendors/flexslider/jquery.flexslider-min.js +5 -0
- includes/vendors/flexslider/jquery.flexslider.js +1192 -0
includes/vendors/flexslider/README.mdown
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FlexSlider 2
|
| 2 |
+
http://www.woothemes.com/flexslider/ - Copyright (c) 2012 WooThemes
|
| 3 |
+
|
| 4 |
+
## Updates
|
| 5 |
+
|
| 6 |
+
** Version 2.2.0**
|
| 7 |
+
|
| 8 |
+
- Fixed event handler conflicts with devices that are both click and touch enabled. e.g., Windows 8.
|
| 9 |
+
- Made all slider variables public, stored in `slider.vars`. This allows manipulation of `slider.vars.minItems` and `slider.vars.maxItems` on the fly to create different fluid grids at certain breakpoints. [Check out this example demonstrating a basic technique](http://flexslider.woothemes.com/dynamic-carousel-min-max.html)
|
| 10 |
+
- Fixed calculations that were causing strange issues with paging and certain FlexSliders to move out of alignment.
|
| 11 |
+
|
| 12 |
+
*Be sure to test v2.2.0 with your current slider, before pushing live, to ensure everything is playing nicely.*
|
| 13 |
+
|
| 14 |
+
-----
|
| 15 |
+
|
| 16 |
+
## General Notes
|
| 17 |
+
FlexSlider is no longer licensed under the MIT license. FlexSlider now shares the common licensed used for all WooThemes themes, GPLv2.
|
| 18 |
+
|
| 19 |
+
In an effort to move the plugin forward, support for jQuery 1.3.2 has been dropped. The plugin now requires jQuery 1.4.2+. If you don't have access to the later versions of jQuery, [FlexSlider 1.8](https://github.com/woothemes/FlexSlider/tree/flexslider1) should be a perfectly suitable substitute for your needs!
|
| 20 |
+
|
| 21 |
+
Your old styles and properties *might not work out of the box*. Some property names have been changed, noted below, as well as namespacing prefixes being applied to all elements. This means that `.flex-direction-nav .next` is now `.flex-direction-nav .flex-next` by default. The namespacing property is exposed, free for you to change.
|
| 22 |
+
|
| 23 |
+
No more overflow hidden woes! The plugin now generates a viewport element to handle the tedious task of working around overflow hidden. Yay!
|
| 24 |
+
|
| 25 |
+
The slider element is now accessible outside of the callback API via the jQuery .data() method. Example use: `$('#slider').data('flexslider')`
|
| 26 |
+
|
| 27 |
+
Helper strings have been added for performing actions quickly on FlexSlider elements. Example uses:
|
| 28 |
+
|
| 29 |
+
- `$('#slider').flexslider("play") //Play slideshow`
|
| 30 |
+
- `$('#slider').flexslider("pause") //Pause slideshow`
|
| 31 |
+
- `$('#slider').flexslider("stop") //Stop slideshow`
|
| 32 |
+
- `$('#slider').flexslider("next") //Go to next slide`
|
| 33 |
+
- `$('#slider').flexslider("prev") //Go to previous slide`
|
| 34 |
+
- `$('#slider').flexslider(3) //Go fourth slide`
|
| 35 |
+
|
| 36 |
+
Two new methods are available for adding/removing slides, `slider.addSlide()` and `slider.removeSlide()`. More details about this coming soon.
|
| 37 |
+
|
| 38 |
+
- `slider.addSlide(obj, pos)` accepts two parameters, a string/jQuery object and an index.
|
| 39 |
+
- `slider.removeSlide(obj)` accepts one parameter, either an object to be removed, or an index.
|
| 40 |
+
|
| 41 |
+
## Examples
|
| 42 |
+
|
| 43 |
+
- [Basic Slider](http://flexslider.woothemes.com/)
|
| 44 |
+
- [Slider w/thumbnail controlNav pattern](http://flexslider.woothemes.com/thumbnail-controlnav.html)
|
| 45 |
+
- [Slider w/thumbnail slider](http://flexslider.woothemes.com/thumbnail-slider.html)
|
| 46 |
+
- [Basic Carousel](http://flexslider.woothemes.com/basic-carousel.html)
|
| 47 |
+
- [Carousel with min and max ranges](http://flexslider.woothemes.com/carousel-min-max.html)
|
| 48 |
+
- [Video with Vimeo API](http://flexslider.woothemes.com/video.html)
|
| 49 |
+
- [Video with Wistia API](http://flexslider.woothemes.com/video-wistia.html)
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
## Properties
|
| 53 |
+
|
| 54 |
+
### namespace: *{new}*
|
| 55 |
+
`namespace` controls the prefixes attached to elements created by the plugin. In previous releases, only certain elements were tagged with a prefix class, which was causing class generalization issues for some users. FlexSlider now prefixes all generated elements with the appropriate namespace.
|
| 56 |
+
|
| 57 |
+
*Hint: `namespace` can be an empty string.*
|
| 58 |
+
|
| 59 |
+
### selector: *{new}*
|
| 60 |
+
The markup structure for FlexSlider has been limited to a "ul.slide li" pattern in previous versions of FlexSlider; no longer. You can now take full control of the markup structure used for your FlexSlider. The `selector` pattern "{container} > {slide}" is mandatory, allowing the plugin to predictably interpret the selector property. Omitting the ">" from the selector is not suggested, but is possible if your markup doesn't follow the immediate descendant pattern.
|
| 61 |
+
|
| 62 |
+
*Examples: "section > article", ".slides > .slide", "#hero .slide"*
|
| 63 |
+
|
| 64 |
+
### easing: *{new}*
|
| 65 |
+
`easing` allows support for jQuery easing! Default options provided by jQuery are "swing" and "linear," but more can be used by included the jQuery Easing plugin. *If you chose a non-existent easing method, the slider will break.*
|
| 66 |
+
|
| 67 |
+
*Note: You need to set `useCSS: false` to force transitions in browsers that support translate3d.*
|
| 68 |
+
*Optional: [jQuery Easing Plugin](http://gsgd.co.uk/sandbox/jquery/easing/)*
|
| 69 |
+
|
| 70 |
+
### direction: *{changed}*
|
| 71 |
+
Previously called "slideDirection" in v1.8 and below.
|
| 72 |
+
|
| 73 |
+
### reverse: *{new}*
|
| 74 |
+
`reverse` will reverse the animation direction of the slider. Meaning, horizontal sliders can move from right to left, and vertical sliders can move bottom to top.
|
| 75 |
+
|
| 76 |
+
### smoothHeight: *{new}*
|
| 77 |
+
`smoothHeight` allows for smooth height transitions between slides. This property currently works for the fade and horizontal slide animation. The property has no effect on horizontal sliding carousels, however.
|
| 78 |
+
|
| 79 |
+
### startAt: *{changed}*
|
| 80 |
+
Previously called "slideToStart" in v1.8 and below.
|
| 81 |
+
|
| 82 |
+
### animationSpeed: *{changed}*
|
| 83 |
+
Previously called "animationDuration" in v1.8 and below.
|
| 84 |
+
|
| 85 |
+
### initDelay: *{new}*
|
| 86 |
+
`initDelay` will delay the initial slideshow of a slider, given in milliseconds. The slider will still initialize, generating controls and displaying the first image, but the slideshow will wait until the `initDelay` time has completed before starting the slideshow.
|
| 87 |
+
|
| 88 |
+
### useCSS: *{new}*
|
| 89 |
+
`useCSS` allow users to override using CSS3 for animation. Translate3d still has numerous bugs that can crop up and wreak havoc, so this is a great property to play with if you are experiencing unexplainable issues in Webkit browsers.
|
| 90 |
+
|
| 91 |
+
*Hint: Use conditionals to enable/disable the use of CSS3 on desktops and mobile devices. Mobile devices, in my experience, do not share many of the translate3d bugs seen on desktop browsers.*
|
| 92 |
+
|
| 93 |
+
### touch: *{new}*
|
| 94 |
+
`touch` allows users to exclude touch swipe functionality from their sliders.
|
| 95 |
+
|
| 96 |
+
### keyboard: *{changed}*
|
| 97 |
+
Previously called "keyboardNav" in v1.8 and below.
|
| 98 |
+
|
| 99 |
+
### multipleKeyboard *{new}*
|
| 100 |
+
`multipleKeyboard` allows users to override the default plugin keyboard behavior, enabling keyboard control of more than one slider on the page. This means that all visible sliders will animate, at the same time, via keyboard input.
|
| 101 |
+
|
| 102 |
+
*Hint: You can use `multipleKeyboard` to allow keyboard navigation on pages where multiple sliders are present, but only one is visible.*
|
| 103 |
+
|
| 104 |
+
### mousewheel: *{updated}*
|
| 105 |
+
`mousewheel` now requires the jQuery Mousewheel plugin. There are a few reasons for this, but primarily because there is no need for FlexSlider itself to reinvent the awkward complexity of mousewheel interactivity that is handled perfectly by the Mousewheel plugin.
|
| 106 |
+
|
| 107 |
+
*Required: [jQuery Mousewheel Plugin](https://github.com/brandonaaron/jquery-mousewheel)*
|
| 108 |
+
|
| 109 |
+
### controlsContainer: *{updated}*
|
| 110 |
+
`controlsContainer` is one of the more painstaking, potentially confusing properties within FlexSlider. First, the property is no longer required to workaround `overflow: hidden` on slide animation. Second, the property now accepts a **jQuery object**, giving you precise control over the object you want. The plugin no longer attempts to guess what element you are selecting.
|
| 111 |
+
|
| 112 |
+
### sync: *{new}*
|
| 113 |
+
`sync` is a new property that will allow other slider(s) to hook into the current slider via a given selector. The selector should describe an object that has already been initialized as a FlexSlider. Right now, `sync` will synchronize animation, play, and pause behaviors. More behaviors can be added in the future as the property matures.
|
| 114 |
+
|
| 115 |
+
*[Example of sync being used](http://flex.madebymufffin.com/examples/basic-carousel.html)*
|
| 116 |
+
|
| 117 |
+
### asNavFor: *{new}*
|
| 118 |
+
Description to be added.
|
| 119 |
+
|
| 120 |
+
### itemWidth: *{new}*
|
| 121 |
+
`itemWidth` is the primary property for the new carousel options. Without this property, your slider is not considered a carousel. To use `itemWidth`, give an integer value of the width of your individual slides. This should include borders and paddings applied to your slides; a total width measurement.
|
| 122 |
+
|
| 123 |
+
### itemMargin: *{new}*
|
| 124 |
+
`itemMargin` describes the gutter between the slide elements. If each slide has a margin-left of 10px, your itemMargin value would be 10. If elements have margin: 0 10px, your itemMargin would be 20.
|
| 125 |
+
|
| 126 |
+
### minItems: *{new}*
|
| 127 |
+
`minItems` describes the minimum number of slide elements that should be visible in the carousel. When the slider reaches the minimum item count, the slides will resize fluidly with the slider.
|
| 128 |
+
|
| 129 |
+
### maxItems: *{new}*
|
| 130 |
+
`maxItems` describes the maximum number of slide elements that should be visible in the carousel. When the slider reaches the maximum item count, the slides will resize fluidly with the sider.
|
| 131 |
+
|
| 132 |
+
### move: *{new}*
|
| 133 |
+
`move` determines how many slides should be animated within the carousel. When left at 0, the slider will animate the number of visible slides. If any value greater than 0 is given, the slider will animate that number of slides in the carousel on each animation interval.
|
| 134 |
+
|
| 135 |
+
*Hint: The move property will be ignored if the value is higher than the number of visible slides, which can be utilized in responsive design.*
|
| 136 |
+
|
| 137 |
+
### added: *{new}*
|
| 138 |
+
`added()` is a new callback event fired in the new slider.addSlide() function.
|
| 139 |
+
|
| 140 |
+
### removed: *{new}*
|
| 141 |
+
`removed()` is a new callback event fired in the new slider.removeSlide() function.
|
| 142 |
+
|
| 143 |
+
### allowOneSlide: *{new}*
|
| 144 |
+
Boolean. Whether or not you'd like FlexSlider to initialize as usual if only one slide is present.
|
includes/vendors/flexslider/changelog.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FLEXSLIDER CHANGELOG
|
| 2 |
+
|
| 3 |
+
2013.02.15 - Version 2.0
|
| 4 |
+
* Added changelog.txt
|
includes/vendors/flexslider/flexslider.css
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* jQuery FlexSlider v2.4.0
|
| 3 |
+
* http://www.woothemes.com/wcflexslider/
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2012 WooThemes
|
| 6 |
+
* Free to use under the GPLv2 and later license.
|
| 7 |
+
* http://www.gnu.org/licenses/gpl-2.0.html
|
| 8 |
+
*
|
| 9 |
+
* Contributing author: Tyler Smith (@mbmufffin)
|
| 10 |
+
*
|
| 11 |
+
*/
|
| 12 |
+
/* ====================================================================================================================
|
| 13 |
+
* FONT-FACE
|
| 14 |
+
* ====================================================================================================================*/
|
| 15 |
+
/* @font-face {
|
| 16 |
+
font-family: 'wcflexslider-icon';
|
| 17 |
+
src: url('fonts/wcflexslider-icon.eot');
|
| 18 |
+
src: url('fonts/wcflexslider-icon.eot?#iefix') format('embedded-opentype'), url('fonts/wcflexslider-icon.woff') format('woff'), url('fonts/wcflexslider-icon.ttf') format('truetype'), url('fonts/wcflexslider-icon.svg#wcflexslider-icon') format('svg');
|
| 19 |
+
font-weight: normal;
|
| 20 |
+
font-style: normal;
|
| 21 |
+
} */
|
| 22 |
+
/* ====================================================================================================================
|
| 23 |
+
* RESETS
|
| 24 |
+
* ====================================================================================================================*/
|
| 25 |
+
.wcflex-container a:hover,
|
| 26 |
+
.wcflex-slider a:hover,
|
| 27 |
+
.wcflex-container a:focus,
|
| 28 |
+
.wcflex-slider a:focus {
|
| 29 |
+
outline: none;
|
| 30 |
+
}
|
| 31 |
+
.slides,
|
| 32 |
+
.slides > li,
|
| 33 |
+
.wcflex-control-nav,
|
| 34 |
+
.wcflex-direction-nav {
|
| 35 |
+
margin: 0;
|
| 36 |
+
padding: 0;
|
| 37 |
+
list-style: none;
|
| 38 |
+
}
|
| 39 |
+
.wcflex-pauseplay span {
|
| 40 |
+
text-transform: capitalize;
|
| 41 |
+
}
|
| 42 |
+
/* ====================================================================================================================
|
| 43 |
+
* BASE STYLES
|
| 44 |
+
* ====================================================================================================================*/
|
| 45 |
+
.wcflexslider {
|
| 46 |
+
margin: 0;
|
| 47 |
+
padding: 0;
|
| 48 |
+
}
|
| 49 |
+
.wcflexslider .slides > li {
|
| 50 |
+
display: none;
|
| 51 |
+
-webkit-backface-visibility: hidden;
|
| 52 |
+
-moz-backface-visibility: hidden;
|
| 53 |
+
backface-visibility: hidden;
|
| 54 |
+
}
|
| 55 |
+
.wcflexslider .slides > li.wcflex-slide-item.clone,
|
| 56 |
+
.wcflexslider .slides > li.wcflex-active-slide {
|
| 57 |
+
-webkit-backface-visibility: visible;
|
| 58 |
+
-moz-backface-visibility: visible;
|
| 59 |
+
backface-visibility: visible;
|
| 60 |
+
}
|
| 61 |
+
.wcflexslider .slides img {
|
| 62 |
+
/* width: 100%; */
|
| 63 |
+
display: block;
|
| 64 |
+
margin-left: auto;
|
| 65 |
+
margin-right: auto;
|
| 66 |
+
}
|
| 67 |
+
.wcflexslider .slides:after {
|
| 68 |
+
/* content: "\0020"; [> not loading fonts <] */
|
| 69 |
+
display: block;
|
| 70 |
+
clear: both;
|
| 71 |
+
visibility: hidden;
|
| 72 |
+
line-height: 0;
|
| 73 |
+
height: 0;
|
| 74 |
+
}
|
| 75 |
+
html[xmlns] .wcflexslider .slides {
|
| 76 |
+
display: block;
|
| 77 |
+
}
|
| 78 |
+
* html .wcflexslider .slides {
|
| 79 |
+
height: 1%;
|
| 80 |
+
}
|
| 81 |
+
.no-js .wcflexslider .slides > li:first-child {
|
| 82 |
+
display: block;
|
| 83 |
+
}
|
| 84 |
+
/* ====================================================================================================================
|
| 85 |
+
* DEFAULT THEME
|
| 86 |
+
* ====================================================================================================================*/
|
| 87 |
+
.wcflexslider {
|
| 88 |
+
margin: 0 0 60px;
|
| 89 |
+
background: #ffffff;
|
| 90 |
+
border: 4px solid #ffffff;
|
| 91 |
+
position: relative;
|
| 92 |
+
zoom: 1;
|
| 93 |
+
/* -webkit-border-radius: 4px; */
|
| 94 |
+
/* -moz-border-radius: 4px; */
|
| 95 |
+
/* border-radius: 4px; */
|
| 96 |
+
/* -webkit-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); */
|
| 97 |
+
/* -moz-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); */
|
| 98 |
+
/* -o-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); */
|
| 99 |
+
/* box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); */
|
| 100 |
+
}
|
| 101 |
+
.wcflexslider .slides {
|
| 102 |
+
zoom: 1;
|
| 103 |
+
}
|
| 104 |
+
.wcflexslider .slides img {
|
| 105 |
+
height: auto;
|
| 106 |
+
}
|
| 107 |
+
/* comment below except for max height if problems occur */
|
| 108 |
+
.wcflex-viewport {
|
| 109 |
+
height: 0;
|
| 110 |
+
max-height: 2000px;
|
| 111 |
+
-webkit-transition: all 0.6s ease;
|
| 112 |
+
-moz-transition: all 0.6s ease;
|
| 113 |
+
-ms-transition: all 0.6s ease;
|
| 114 |
+
-o-transition: all 0.6s ease;
|
| 115 |
+
transition: all 0.6s ease;
|
| 116 |
+
}
|
| 117 |
+
.loading .wcflex-viewport {
|
| 118 |
+
max-height: 300px;
|
| 119 |
+
}
|
| 120 |
+
.carousel li {
|
| 121 |
+
margin-right: 5px;
|
| 122 |
+
}
|
| 123 |
+
.wcflex-direction-nav {
|
| 124 |
+
*height: 0;
|
| 125 |
+
}
|
| 126 |
+
.wcflex-direction-nav a {
|
| 127 |
+
text-decoration: none;
|
| 128 |
+
display: block;
|
| 129 |
+
width: 50px;
|
| 130 |
+
height: 50px;
|
| 131 |
+
margin: -25px 0 0;
|
| 132 |
+
position: absolute;
|
| 133 |
+
top: 50%;
|
| 134 |
+
z-index: 10;
|
| 135 |
+
overflow: hidden;
|
| 136 |
+
opacity: 0;
|
| 137 |
+
cursor: pointer;
|
| 138 |
+
color: rgba(0, 0, 0, 0.8); /* disable possibly */
|
| 139 |
+
/* text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); */
|
| 140 |
+
-webkit-transition: all 0.3s ease-in-out;
|
| 141 |
+
-moz-transition: all 0.3s ease-in-out;
|
| 142 |
+
-ms-transition: all 0.3s ease-in-out;
|
| 143 |
+
-o-transition: all 0.3s ease-in-out;
|
| 144 |
+
transition: all 0.3s ease-in-out;
|
| 145 |
+
}
|
| 146 |
+
/* .wcflex-direction-nav a:before {
|
| 147 |
+
font-family: "wcflexslider-icon";
|
| 148 |
+
font-size: 40px;
|
| 149 |
+
display: inline-block;
|
| 150 |
+
content: '\f001';
|
| 151 |
+
color: rgba(0, 0, 0, 0.8);
|
| 152 |
+
text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
|
| 153 |
+
}
|
| 154 |
+
.wcflex-direction-nav a.wcflex-next:before {
|
| 155 |
+
content: '\f002';
|
| 156 |
+
} */
|
| 157 |
+
.wcflex-direction-nav .wcflex-prev {
|
| 158 |
+
background: url("images/slide-arrow-left.png") no-repeat center center !important;
|
| 159 |
+
left: 0;
|
| 160 |
+
}
|
| 161 |
+
.wcflex-direction-nav .wcflex-next {
|
| 162 |
+
background: url("images/slide-arrow-right.png") no-repeat center center !important;
|
| 163 |
+
right: 0;
|
| 164 |
+
text-align: right;
|
| 165 |
+
}
|
| 166 |
+
.wcflexslider:hover .wcflex-direction-nav .wcflex-prev {
|
| 167 |
+
opacity: 1;
|
| 168 |
+
/* left: 10px; */
|
| 169 |
+
}
|
| 170 |
+
.wcflexslider:hover .wcflex-direction-nav .wcflex-prev:hover {
|
| 171 |
+
/* opacity: 1; */
|
| 172 |
+
}
|
| 173 |
+
.wcflexslider:hover .wcflex-direction-nav .wcflex-next {
|
| 174 |
+
opacity: 1;
|
| 175 |
+
/* right: 10px; */
|
| 176 |
+
}
|
| 177 |
+
.wcflexslider:hover .wcflex-direction-nav .wcflex-next:hover {
|
| 178 |
+
opacity: 1;
|
| 179 |
+
}
|
| 180 |
+
/* .wcflex-direction-nav .wcflex-disabled {
|
| 181 |
+
opacity: 0!important;
|
| 182 |
+
filter: alpha(opacity=0);
|
| 183 |
+
cursor: default;
|
| 184 |
+
} */
|
| 185 |
+
/* .wcflex-pauseplay a {
|
| 186 |
+
display: block;
|
| 187 |
+
width: 20px;
|
| 188 |
+
height: 20px;
|
| 189 |
+
position: absolute;
|
| 190 |
+
bottom: 5px;
|
| 191 |
+
left: 10px;
|
| 192 |
+
opacity: 0.8;
|
| 193 |
+
z-index: 10;
|
| 194 |
+
overflow: hidden;
|
| 195 |
+
cursor: pointer;
|
| 196 |
+
color: #000;
|
| 197 |
+
}
|
| 198 |
+
.wcflex-pauseplay a:before {
|
| 199 |
+
font-family: "wcflexslider-icon";
|
| 200 |
+
font-size: 20px;
|
| 201 |
+
display: inline-block;
|
| 202 |
+
content: '\f004';
|
| 203 |
+
}
|
| 204 |
+
.wcflex-pauseplay a:hover {
|
| 205 |
+
opacity: 1;
|
| 206 |
+
}
|
| 207 |
+
.wcflex-pauseplay a.wcflex-play:before {
|
| 208 |
+
content: '\f003';
|
| 209 |
+
} */
|
| 210 |
+
.wcflex-control-nav {
|
| 211 |
+
width: 100%;
|
| 212 |
+
position: absolute;
|
| 213 |
+
bottom: -40px;
|
| 214 |
+
text-align: center;
|
| 215 |
+
}
|
| 216 |
+
.wcflex-control-nav li {
|
| 217 |
+
margin: 0 6px;
|
| 218 |
+
display: inline-block;
|
| 219 |
+
zoom: 1;
|
| 220 |
+
*display: inline;
|
| 221 |
+
}
|
| 222 |
+
.wcflex-control-paging li a {
|
| 223 |
+
width: 11px;
|
| 224 |
+
height: 11px;
|
| 225 |
+
display: block;
|
| 226 |
+
background: #666;
|
| 227 |
+
background: rgba(0, 0, 0, 0.5);
|
| 228 |
+
cursor: pointer;
|
| 229 |
+
text-indent: -9999px;
|
| 230 |
+
/* -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); */
|
| 231 |
+
/* -moz-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); */
|
| 232 |
+
/* -o-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); */
|
| 233 |
+
/* box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); */
|
| 234 |
+
/* -webkit-border-radius: 20px; */
|
| 235 |
+
/* -moz-border-radius: 20px; */
|
| 236 |
+
/* border-radius: 20px; */
|
| 237 |
+
}
|
| 238 |
+
.wcflex-control-paging li a:hover {
|
| 239 |
+
background: #333;
|
| 240 |
+
background: rgba(0, 0, 0, 0.7);
|
| 241 |
+
}
|
| 242 |
+
.wcflex-control-paging li a.wcflex-active {
|
| 243 |
+
background: #000;
|
| 244 |
+
background: rgba(0, 0, 0, 0.9);
|
| 245 |
+
cursor: default;
|
| 246 |
+
}
|
| 247 |
+
.wcflex-control-thumbs {
|
| 248 |
+
margin: 5px 0 0;
|
| 249 |
+
position: static;
|
| 250 |
+
overflow: hidden;
|
| 251 |
+
}
|
| 252 |
+
.wcflex-control-thumbs li {
|
| 253 |
+
width: 25%;
|
| 254 |
+
float: left;
|
| 255 |
+
margin: 0;
|
| 256 |
+
}
|
| 257 |
+
.wcflex-control-thumbs img {
|
| 258 |
+
width: 100%;
|
| 259 |
+
height: auto;
|
| 260 |
+
display: block;
|
| 261 |
+
opacity: .7;
|
| 262 |
+
cursor: pointer;
|
| 263 |
+
-webkit-transition: all 0.6s ease;
|
| 264 |
+
-moz-transition: all 0.6s ease;
|
| 265 |
+
-ms-transition: all 0.6s ease;
|
| 266 |
+
-o-transition: all 0.6s ease;
|
| 267 |
+
transition: all 0.6s ease;
|
| 268 |
+
}
|
| 269 |
+
.wcflex-control-thumbs img:hover {
|
| 270 |
+
opacity: 1;
|
| 271 |
+
}
|
| 272 |
+
.wcflex-control-thumbs .wcflex-active {
|
| 273 |
+
opacity: 1;
|
| 274 |
+
cursor: default;
|
| 275 |
+
}
|
| 276 |
+
/* ====================================================================================================================
|
| 277 |
+
* RESPONSIVE
|
| 278 |
+
* ====================================================================================================================*/
|
| 279 |
+
/* @media screen and (max-width: 860px) {
|
| 280 |
+
.wcflex-direction-nav .wcflex-prev {
|
| 281 |
+
opacity: 1;
|
| 282 |
+
left: 10px;
|
| 283 |
+
}
|
| 284 |
+
.wcflex-direction-nav .wcflex-next {
|
| 285 |
+
opacity: 1;
|
| 286 |
+
right: 10px;
|
| 287 |
+
}
|
| 288 |
+
} */
|
includes/vendors/flexslider/fonts/flexslider-icon.eot
ADDED
|
Binary file
|
includes/vendors/flexslider/fonts/flexslider-icon.svg
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" standalone="no"?>
|
| 2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
| 3 |
+
<svg xmlns="http://www.w3.org/2000/svg">
|
| 4 |
+
<metadata>
|
| 5 |
+
This is a custom SVG font generated by IcoMoon.
|
| 6 |
+
<iconset grid="14"></iconset>
|
| 7 |
+
</metadata>
|
| 8 |
+
<defs>
|
| 9 |
+
<font id="flexslider-icon" horiz-adv-x="448" >
|
| 10 |
+
<font-face units-per-em="448" ascent="384" descent="-64" />
|
| 11 |
+
<missing-glyph horiz-adv-x="448" />
|
| 12 |
+
<glyph unicode="" d="M 185.50-9.25l-163.00,162.75q-9.25,9.25 -9.25,22.625t 9.25,22.625l 163.00,162.75q 9.25,9.25 22.625,9.25t 22.625-9.25l 18.75-18.75q 9.25-9.25 9.25-22.625t-9.25-22.625l-121.50-121.50l 121.50-121.25q 9.25-9.50 9.25-22.75t-9.25-22.50l-18.75-18.75q-9.25-9.25 -22.625-9.25t-22.625,9.25z" horiz-adv-x="288" />
|
| 13 |
+
<glyph unicode="" d="M 274.75,176.00q0.00-13.00 -9.25-22.75l-163.00-162.75q-9.25-9.25 -22.50-9.25t-22.50,9.25l-19.00,18.75q-9.25,9.75 -9.25,22.75q0.00,13.25 9.25,22.50l 121.50,121.50l-121.50,121.25q-9.25,9.75 -9.25,22.75q0.00,13.25 9.25,22.50l 19.00,18.75q 9.00,9.50 22.50,9.50t 22.50-9.50l 163.00-162.75q 9.25-9.25 9.25-22.50z" horiz-adv-x="288" />
|
| 14 |
+
<glyph unicode="" d="M 346.00,152.25l-332.00-184.50q-5.75-3.25 -9.875-0.75t-4.125,9.00l0.00,368.00 q0.00,6.50 4.125,9.00t 9.875-0.75l 332.00-184.50q 5.75-3.25 5.75-7.75t-5.75-7.75z" horiz-adv-x="352" />
|
| 15 |
+
<glyph unicode="" d="M 384.00,336.00l0.00-352.00 q0.00-6.50 -4.75-11.25t-11.25-4.75l-128.00,0.00 q-6.50,0.00 -11.25,4.75t-4.75,11.25l0.00,352.00 q0.00,6.50 4.75,11.25t 11.25,4.75l 128.00,0.00 q 6.50,0.00 11.25-4.75t 4.75-11.25zM 160.00,336.00l0.00-352.00 q0.00-6.50 -4.75-11.25t-11.25-4.75l-128.00,0.00 q-6.50,0.00 -11.25,4.75t-4.75,11.25l0.00,352.00 q0.00,6.50 4.75,11.25t 11.25,4.75l 128.00,0.00 q 6.50,0.00 11.25-4.75t 4.75-11.25z" horiz-adv-x="384" />
|
| 16 |
+
<glyph unicode="" d="M 402.75,208.00q0.00-13.25 -9.25-22.50l-162.75-162.75q-9.50-9.50 -22.75-9.50q-13.50,0.00 -22.50,9.50l-162.75,162.75q-9.50,9.00 -9.50,22.50q0.00,13.25 9.50,22.75l 18.50,18.75q 9.75,9.25 22.75,9.25q 13.25,0.00 22.50-9.25l 121.50-121.50l 121.50,121.50q 9.25,9.25 22.50,9.25q 13.00,0.00 22.75-9.25l 18.75-18.75q 9.25-9.75 9.25-22.75z" horiz-adv-x="416" />
|
| 17 |
+
<glyph unicode=" " horiz-adv-x="224" />
|
| 18 |
+
<glyph class="hidden" unicode="" d="M0,384L 448 -64L0 -64 z" horiz-adv-x="0" />
|
| 19 |
+
</font></defs></svg>
|
includes/vendors/flexslider/fonts/flexslider-icon.ttf
ADDED
|
Binary file
|
includes/vendors/flexslider/fonts/flexslider-icon.woff
ADDED
|
Binary file
|
includes/vendors/flexslider/images/bg_play_pause.png
ADDED
|
Binary file
|
includes/vendors/flexslider/images/slide-arrow-left.png
ADDED
|
Binary file
|
includes/vendors/flexslider/images/slide-arrow-right.png
ADDED
|
Binary file
|
includes/vendors/flexslider/images/slide-arrows.png
ADDED
|
Binary file
|
includes/vendors/flexslider/jquery.flexslider-min.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* jQuery FlexSlider v2.5.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));r.vars.customDirectionNav!==""&&(r.customDirectionNav=e(r.vars.customDirectionNav).length===2&&e(r.vars.customDirectionNav));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.customDirectionNav)r.directionNav=r.customDirectionNav;else 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,d,v,m=!1,g=0,y=0,b=0;if(!s){f=function(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);g=s.touches[0].pageX;y=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?y:g;n=l?g:y;t.addEventListener("touchmove",d,!1);t.addEventListener("touchend",v,!1)}};d=function(t){g=t.touches[0].pageX;y=t.touches[0].pageY;u=l?e-y:e-g;m=l?Math.abs(u)<Math.abs(g-n):Math.abs(u)<Math.abs(y-n);var s=500;if(!m||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")}}};v=function(s){t.removeEventListener("touchmove",d,!1);if(r.animatingTo===r.currentSlide&&!m&&u!==null){var f=c?-u:u,l=f>0?r.getTarget("next"):r.getTarget("prev");r.canAdvance(l)&&(Number(new Date)-a<550&&Math.abs(f)>50||Math.abs(f)>o/2)?r.wcflexAnimate(l,r.vars.pauseOnAction):p||r.wcflexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)}t.removeEventListener("touchend",v,!1);e=null;n=null;u=null;i=null};t.addEventListener("touchstart",f,!1)}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);b=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;b+=l?s:r;u=b;m=l?Math.abs(b)<Math.abs(-r):Math.abs(b)<Math.abs(-s);if(e.detail===e.MSGESTURE_FLAG_INERTIA){setImmediate(function(){t._gesture.stop()});return}if(!m||Number(new Date)-a>500){e.preventDefault();if(!p&&n.transitions){n.vars.animationLoop||(u=b/(n.currentSlide===0&&b<0||n.currentSlide===n.last&&b>0?Math.abs(b)/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&&!m&&u!==null){var s=c?-u:u,f=s>0?r.getTarget("next"):r.getTarget("prev");r.canAdvance(f)&&(Number(new Date)-a<550&&Math.abs(s)>50||Math.abs(s)>o/2)?r.wcflexAnimate(f,r.vars.pauseOnAction):p||r.wcflexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)}e=null;n=null;u=null;i=null;b=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.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:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}};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/vendors/flexslider/jquery.flexslider.js
ADDED
|
@@ -0,0 +1,1192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* jQuery FlexSlider v2.5.0
|
| 3 |
+
* Copyright 2012 WooThemes
|
| 4 |
+
* Contributing Author: Tyler Smith
|
| 5 |
+
*/
|
| 6 |
+
;
|
| 7 |
+
(function ($) {
|
| 8 |
+
|
| 9 |
+
//FlexSlider: Object Instance
|
| 10 |
+
$.wcflexslider = function(el, options) {
|
| 11 |
+
var slider = $(el);
|
| 12 |
+
|
| 13 |
+
// making variables public
|
| 14 |
+
slider.vars = $.extend({}, $.wcflexslider.defaults, options);
|
| 15 |
+
|
| 16 |
+
var namespace = slider.vars.namespace,
|
| 17 |
+
msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
|
| 18 |
+
touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch,
|
| 19 |
+
// depricating this idea, as devices are being released with both of these events
|
| 20 |
+
//eventType = (touch) ? "touchend" : "click",
|
| 21 |
+
eventType = "click touchend MSPointerUp keyup",
|
| 22 |
+
watchedEvent = "",
|
| 23 |
+
watchedEventClearTimer,
|
| 24 |
+
vertical = slider.vars.direction === "vertical",
|
| 25 |
+
reverse = slider.vars.reverse,
|
| 26 |
+
carousel = (slider.vars.itemWidth > 0),
|
| 27 |
+
fade = slider.vars.animation === "fade",
|
| 28 |
+
asNav = slider.vars.asNavFor !== "",
|
| 29 |
+
methods = {},
|
| 30 |
+
focused = true;
|
| 31 |
+
|
| 32 |
+
// Store a reference to the slider object
|
| 33 |
+
$.data(el, "wcflexslider", slider);
|
| 34 |
+
|
| 35 |
+
// Private slider methods
|
| 36 |
+
methods = {
|
| 37 |
+
init: function() {
|
| 38 |
+
slider.animating = false;
|
| 39 |
+
// Get current slide and make sure it is a number
|
| 40 |
+
slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0), 10 );
|
| 41 |
+
if ( isNaN( slider.currentSlide ) ) { slider.currentSlide = 0; }
|
| 42 |
+
slider.animatingTo = slider.currentSlide;
|
| 43 |
+
slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last);
|
| 44 |
+
slider.containerSelector = slider.vars.selector.substr(0,slider.vars.selector.search(' '));
|
| 45 |
+
slider.slides = $(slider.vars.selector, slider);
|
| 46 |
+
slider.container = $(slider.containerSelector, slider);
|
| 47 |
+
slider.count = slider.slides.length;
|
| 48 |
+
// SYNC:
|
| 49 |
+
slider.syncExists = $(slider.vars.sync).length > 0;
|
| 50 |
+
// SLIDE:
|
| 51 |
+
if (slider.vars.animation === "slide") { slider.vars.animation = "swing"; }
|
| 52 |
+
slider.prop = (vertical) ? "top" : "marginLeft";
|
| 53 |
+
slider.args = {};
|
| 54 |
+
// SLIDESHOW:
|
| 55 |
+
slider.manualPause = false;
|
| 56 |
+
slider.stopped = false;
|
| 57 |
+
//PAUSE WHEN INVISIBLE
|
| 58 |
+
slider.started = false;
|
| 59 |
+
slider.startTimeout = null;
|
| 60 |
+
// TOUCH/USECSS:
|
| 61 |
+
slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function() {
|
| 62 |
+
var obj = document.createElement('div'),
|
| 63 |
+
props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
|
| 64 |
+
for (var i in props) {
|
| 65 |
+
if ( obj.style[ props[i] ] !== undefined ) {
|
| 66 |
+
slider.pfx = props[i].replace('Perspective','').toLowerCase();
|
| 67 |
+
slider.prop = "-" + slider.pfx + "-transform";
|
| 68 |
+
return true;
|
| 69 |
+
}
|
| 70 |
+
}
|
| 71 |
+
return false;
|
| 72 |
+
}());
|
| 73 |
+
slider.ensureAnimationEnd = '';
|
| 74 |
+
// CONTROLSCONTAINER:
|
| 75 |
+
if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer);
|
| 76 |
+
// MANUAL:
|
| 77 |
+
if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls);
|
| 78 |
+
|
| 79 |
+
// CUSTOM DIRECTION NAV:
|
| 80 |
+
if (slider.vars.customDirectionNav !== "") slider.customDirectionNav = $(slider.vars.customDirectionNav).length === 2 && $(slider.vars.customDirectionNav);
|
| 81 |
+
|
| 82 |
+
// RANDOMIZE:
|
| 83 |
+
if (slider.vars.randomize) {
|
| 84 |
+
slider.slides.sort(function() { return (Math.round(Math.random())-0.5); });
|
| 85 |
+
slider.container.empty().append(slider.slides);
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
slider.doMath();
|
| 89 |
+
|
| 90 |
+
// INIT
|
| 91 |
+
slider.setup("init");
|
| 92 |
+
|
| 93 |
+
// CONTROLNAV:
|
| 94 |
+
if (slider.vars.controlNav) { methods.controlNav.setup(); }
|
| 95 |
+
|
| 96 |
+
// DIRECTIONNAV:
|
| 97 |
+
if (slider.vars.directionNav) { methods.directionNav.setup(); }
|
| 98 |
+
|
| 99 |
+
// KEYBOARD:
|
| 100 |
+
if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) {
|
| 101 |
+
$(document).bind('keyup', function(event) {
|
| 102 |
+
var keycode = event.keyCode;
|
| 103 |
+
if (!slider.animating && (keycode === 39 || keycode === 37)) {
|
| 104 |
+
var target = (keycode === 39) ? slider.getTarget('next') :
|
| 105 |
+
(keycode === 37) ? slider.getTarget('prev') : false;
|
| 106 |
+
slider.wcflexAnimate(target, slider.vars.pauseOnAction);
|
| 107 |
+
}
|
| 108 |
+
});
|
| 109 |
+
}
|
| 110 |
+
// MOUSEWHEEL:
|
| 111 |
+
if (slider.vars.mousewheel) {
|
| 112 |
+
slider.bind('mousewheel', function(event, delta, deltaX, deltaY) {
|
| 113 |
+
event.preventDefault();
|
| 114 |
+
var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev');
|
| 115 |
+
slider.wcflexAnimate(target, slider.vars.pauseOnAction);
|
| 116 |
+
});
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
// PAUSEPLAY
|
| 120 |
+
if (slider.vars.pausePlay) { methods.pausePlay.setup(); }
|
| 121 |
+
|
| 122 |
+
//PAUSE WHEN INVISIBLE
|
| 123 |
+
if (slider.vars.slideshow && slider.vars.pauseInvisible) { methods.pauseInvisible.init(); }
|
| 124 |
+
|
| 125 |
+
// SLIDSESHOW
|
| 126 |
+
if (slider.vars.slideshow) {
|
| 127 |
+
if (slider.vars.pauseOnHover) {
|
| 128 |
+
slider.hover(function() {
|
| 129 |
+
if (!slider.manualPlay && !slider.manualPause) { slider.pause(); }
|
| 130 |
+
}, function() {
|
| 131 |
+
if (!slider.manualPause && !slider.manualPlay && !slider.stopped) { slider.play(); }
|
| 132 |
+
});
|
| 133 |
+
}
|
| 134 |
+
// initialize animation
|
| 135 |
+
//If we're visible, or we don't use PageVisibility API
|
| 136 |
+
if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) {
|
| 137 |
+
(slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play();
|
| 138 |
+
}
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
// ASNAV:
|
| 142 |
+
if (asNav) { methods.asNav.setup(); }
|
| 143 |
+
|
| 144 |
+
// TOUCH
|
| 145 |
+
if (touch && slider.vars.touch) { methods.touch(); }
|
| 146 |
+
|
| 147 |
+
// FADE&&SMOOTHHEIGHT || SLIDE:
|
| 148 |
+
if (!fade || (fade && slider.vars.smoothHeight)) { $(window).bind("resize orientationchange focus", methods.resize); }
|
| 149 |
+
|
| 150 |
+
slider.find("img").attr("draggable", "false");
|
| 151 |
+
|
| 152 |
+
// API: start() Callback
|
| 153 |
+
setTimeout(function(){
|
| 154 |
+
slider.vars.start(slider);
|
| 155 |
+
}, 200);
|
| 156 |
+
},
|
| 157 |
+
asNav: {
|
| 158 |
+
setup: function() {
|
| 159 |
+
slider.asNav = true;
|
| 160 |
+
slider.animatingTo = Math.floor(slider.currentSlide/slider.move);
|
| 161 |
+
slider.currentItem = slider.currentSlide;
|
| 162 |
+
slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
|
| 163 |
+
if(!msGesture){
|
| 164 |
+
slider.slides.on(eventType, function(e){
|
| 165 |
+
e.preventDefault();
|
| 166 |
+
var $slide = $(this),
|
| 167 |
+
target = $slide.index();
|
| 168 |
+
var posFromLeft = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container
|
| 169 |
+
if( posFromLeft <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) {
|
| 170 |
+
slider.wcflexAnimate(slider.getTarget("prev"), true);
|
| 171 |
+
} else if (!$(slider.vars.asNavFor).data('wcflexslider').animating && !$slide.hasClass(namespace + "active-slide")) {
|
| 172 |
+
slider.direction = (slider.currentItem < target) ? "next" : "prev";
|
| 173 |
+
slider.wcflexAnimate(target, slider.vars.pauseOnAction, false, true, true);
|
| 174 |
+
}
|
| 175 |
+
});
|
| 176 |
+
}else{
|
| 177 |
+
el._slider = slider;
|
| 178 |
+
slider.slides.each(function (){
|
| 179 |
+
var that = this;
|
| 180 |
+
that._gesture = new MSGesture();
|
| 181 |
+
that._gesture.target = that;
|
| 182 |
+
that.addEventListener("MSPointerDown", function (e){
|
| 183 |
+
e.preventDefault();
|
| 184 |
+
if(e.currentTarget._gesture) {
|
| 185 |
+
e.currentTarget._gesture.addPointer(e.pointerId);
|
| 186 |
+
}
|
| 187 |
+
}, false);
|
| 188 |
+
that.addEventListener("MSGestureTap", function (e){
|
| 189 |
+
e.preventDefault();
|
| 190 |
+
var $slide = $(this),
|
| 191 |
+
target = $slide.index();
|
| 192 |
+
if (!$(slider.vars.asNavFor).data('wcflexslider').animating && !$slide.hasClass('active')) {
|
| 193 |
+
slider.direction = (slider.currentItem < target) ? "next" : "prev";
|
| 194 |
+
slider.wcflexAnimate(target, slider.vars.pauseOnAction, false, true, true);
|
| 195 |
+
}
|
| 196 |
+
});
|
| 197 |
+
});
|
| 198 |
+
}
|
| 199 |
+
}
|
| 200 |
+
},
|
| 201 |
+
controlNav: {
|
| 202 |
+
setup: function() {
|
| 203 |
+
if (!slider.manualControls) {
|
| 204 |
+
methods.controlNav.setupPaging();
|
| 205 |
+
} else { // MANUALCONTROLS:
|
| 206 |
+
methods.controlNav.setupManual();
|
| 207 |
+
}
|
| 208 |
+
},
|
| 209 |
+
setupPaging: function() {
|
| 210 |
+
var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging',
|
| 211 |
+
j = 1,
|
| 212 |
+
item,
|
| 213 |
+
slide;
|
| 214 |
+
|
| 215 |
+
slider.controlNavScaffold = $('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>');
|
| 216 |
+
|
| 217 |
+
if (slider.pagingCount > 1) {
|
| 218 |
+
for (var i = 0; i < slider.pagingCount; i++) {
|
| 219 |
+
slide = slider.slides.eq(i);
|
| 220 |
+
item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"/>' : '<a>' + j + '</a>';
|
| 221 |
+
if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
|
| 222 |
+
var captn = slide.attr( 'data-thumbcaption' );
|
| 223 |
+
if ( '' !== captn && undefined !== captn ) { item += '<span class="' + namespace + 'caption">' + captn + '</span>'; }
|
| 224 |
+
}
|
| 225 |
+
slider.controlNavScaffold.append('<li>' + item + '</li>');
|
| 226 |
+
j++;
|
| 227 |
+
}
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
// CONTROLSCONTAINER:
|
| 231 |
+
(slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold);
|
| 232 |
+
methods.controlNav.set();
|
| 233 |
+
|
| 234 |
+
methods.controlNav.active();
|
| 235 |
+
|
| 236 |
+
slider.controlNavScaffold.delegate('a, img', eventType, function(event) {
|
| 237 |
+
event.preventDefault();
|
| 238 |
+
|
| 239 |
+
if (watchedEvent === "" || watchedEvent === event.type) {
|
| 240 |
+
var $this = $(this),
|
| 241 |
+
target = slider.controlNav.index($this);
|
| 242 |
+
|
| 243 |
+
if (!$this.hasClass(namespace + 'active')) {
|
| 244 |
+
slider.direction = (target > slider.currentSlide) ? "next" : "prev";
|
| 245 |
+
slider.wcflexAnimate(target, slider.vars.pauseOnAction);
|
| 246 |
+
}
|
| 247 |
+
}
|
| 248 |
+
|
| 249 |
+
// setup flags to prevent event duplication
|
| 250 |
+
if (watchedEvent === "") {
|
| 251 |
+
watchedEvent = event.type;
|
| 252 |
+
}
|
| 253 |
+
methods.setToClearWatchedEvent();
|
| 254 |
+
|
| 255 |
+
});
|
| 256 |
+
},
|
| 257 |
+
setupManual: function() {
|
| 258 |
+
slider.controlNav = slider.manualControls;
|
| 259 |
+
methods.controlNav.active();
|
| 260 |
+
|
| 261 |
+
slider.controlNav.bind(eventType, function(event) {
|
| 262 |
+
event.preventDefault();
|
| 263 |
+
|
| 264 |
+
if (watchedEvent === "" || watchedEvent === event.type) {
|
| 265 |
+
var $this = $(this),
|
| 266 |
+
target = slider.controlNav.index($this);
|
| 267 |
+
|
| 268 |
+
if (!$this.hasClass(namespace + 'active')) {
|
| 269 |
+
(target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
|
| 270 |
+
slider.wcflexAnimate(target, slider.vars.pauseOnAction);
|
| 271 |
+
}
|
| 272 |
+
}
|
| 273 |
+
|
| 274 |
+
// setup flags to prevent event duplication
|
| 275 |
+
if (watchedEvent === "") {
|
| 276 |
+
watchedEvent = event.type;
|
| 277 |
+
}
|
| 278 |
+
methods.setToClearWatchedEvent();
|
| 279 |
+
});
|
| 280 |
+
},
|
| 281 |
+
set: function() {
|
| 282 |
+
var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a';
|
| 283 |
+
slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider);
|
| 284 |
+
},
|
| 285 |
+
active: function() {
|
| 286 |
+
slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
|
| 287 |
+
},
|
| 288 |
+
update: function(action, pos) {
|
| 289 |
+
if (slider.pagingCount > 1 && action === "add") {
|
| 290 |
+
slider.controlNavScaffold.append($('<li><a>' + slider.count + '</a></li>'));
|
| 291 |
+
} else if (slider.pagingCount === 1) {
|
| 292 |
+
slider.controlNavScaffold.find('li').remove();
|
| 293 |
+
} else {
|
| 294 |
+
slider.controlNav.eq(pos).closest('li').remove();
|
| 295 |
+
}
|
| 296 |
+
methods.controlNav.set();
|
| 297 |
+
(slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
|
| 298 |
+
}
|
| 299 |
+
},
|
| 300 |
+
directionNav: {
|
| 301 |
+
setup: function() {
|
| 302 |
+
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>');
|
| 303 |
+
|
| 304 |
+
// CUSTOM DIRECTION NAV:
|
| 305 |
+
if (slider.customDirectionNav) {
|
| 306 |
+
slider.directionNav = slider.customDirectionNav;
|
| 307 |
+
// CONTROLSCONTAINER:
|
| 308 |
+
} else if (slider.controlsContainer) {
|
| 309 |
+
$(slider.controlsContainer).append(directionNavScaffold);
|
| 310 |
+
slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer);
|
| 311 |
+
} else {
|
| 312 |
+
slider.append(directionNavScaffold);
|
| 313 |
+
slider.directionNav = $('.' + namespace + 'direction-nav li a', slider);
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
methods.directionNav.update();
|
| 317 |
+
|
| 318 |
+
slider.directionNav.bind(eventType, function(event) {
|
| 319 |
+
event.preventDefault();
|
| 320 |
+
var target;
|
| 321 |
+
|
| 322 |
+
if (watchedEvent === "" || watchedEvent === event.type) {
|
| 323 |
+
target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev');
|
| 324 |
+
slider.wcflexAnimate(target, slider.vars.pauseOnAction);
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
// setup flags to prevent event duplication
|
| 328 |
+
if (watchedEvent === "") {
|
| 329 |
+
watchedEvent = event.type;
|
| 330 |
+
}
|
| 331 |
+
methods.setToClearWatchedEvent();
|
| 332 |
+
});
|
| 333 |
+
},
|
| 334 |
+
update: function() {
|
| 335 |
+
var disabledClass = namespace + 'disabled';
|
| 336 |
+
if (slider.pagingCount === 1) {
|
| 337 |
+
slider.directionNav.addClass(disabledClass).attr('tabindex', '-1');
|
| 338 |
+
} else if (!slider.vars.animationLoop) {
|
| 339 |
+
if (slider.animatingTo === 0) {
|
| 340 |
+
slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1');
|
| 341 |
+
} else if (slider.animatingTo === slider.last) {
|
| 342 |
+
slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1');
|
| 343 |
+
} else {
|
| 344 |
+
slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
|
| 345 |
+
}
|
| 346 |
+
} else {
|
| 347 |
+
slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
|
| 348 |
+
}
|
| 349 |
+
}
|
| 350 |
+
},
|
| 351 |
+
pausePlay: {
|
| 352 |
+
setup: function() {
|
| 353 |
+
var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a></a></div>');
|
| 354 |
+
|
| 355 |
+
// CONTROLSCONTAINER:
|
| 356 |
+
if (slider.controlsContainer) {
|
| 357 |
+
slider.controlsContainer.append(pausePlayScaffold);
|
| 358 |
+
slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer);
|
| 359 |
+
} else {
|
| 360 |
+
slider.append(pausePlayScaffold);
|
| 361 |
+
slider.pausePlay = $('.' + namespace + 'pauseplay a', slider);
|
| 362 |
+
}
|
| 363 |
+
|
| 364 |
+
methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play');
|
| 365 |
+
|
| 366 |
+
slider.pausePlay.bind(eventType, function(event) {
|
| 367 |
+
event.preventDefault();
|
| 368 |
+
|
| 369 |
+
if (watchedEvent === "" || watchedEvent === event.type) {
|
| 370 |
+
if ($(this).hasClass(namespace + 'pause')) {
|
| 371 |
+
slider.manualPause = true;
|
| 372 |
+
slider.manualPlay = false;
|
| 373 |
+
slider.pause();
|
| 374 |
+
} else {
|
| 375 |
+
slider.manualPause = false;
|
| 376 |
+
slider.manualPlay = true;
|
| 377 |
+
slider.play();
|
| 378 |
+
}
|
| 379 |
+
}
|
| 380 |
+
|
| 381 |
+
// setup flags to prevent event duplication
|
| 382 |
+
if (watchedEvent === "") {
|
| 383 |
+
watchedEvent = event.type;
|
| 384 |
+
}
|
| 385 |
+
methods.setToClearWatchedEvent();
|
| 386 |
+
});
|
| 387 |
+
},
|
| 388 |
+
update: function(state) {
|
| 389 |
+
(state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText);
|
| 390 |
+
}
|
| 391 |
+
},
|
| 392 |
+
touch: function() {
|
| 393 |
+
var startX,
|
| 394 |
+
startY,
|
| 395 |
+
offset,
|
| 396 |
+
cwidth,
|
| 397 |
+
dx,
|
| 398 |
+
startT,
|
| 399 |
+
onTouchStart,
|
| 400 |
+
onTouchMove,
|
| 401 |
+
onTouchEnd,
|
| 402 |
+
scrolling = false,
|
| 403 |
+
localX = 0,
|
| 404 |
+
localY = 0,
|
| 405 |
+
accDx = 0;
|
| 406 |
+
|
| 407 |
+
if(!msGesture){
|
| 408 |
+
onTouchStart = function(e) {
|
| 409 |
+
if (slider.animating) {
|
| 410 |
+
e.preventDefault();
|
| 411 |
+
} else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
|
| 412 |
+
slider.pause();
|
| 413 |
+
// CAROUSEL:
|
| 414 |
+
cwidth = (vertical) ? slider.h : slider. w;
|
| 415 |
+
startT = Number(new Date());
|
| 416 |
+
// CAROUSEL:
|
| 417 |
+
|
| 418 |
+
// Local vars for X and Y points.
|
| 419 |
+
localX = e.touches[0].pageX;
|
| 420 |
+
localY = e.touches[0].pageY;
|
| 421 |
+
|
| 422 |
+
offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
|
| 423 |
+
(carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
|
| 424 |
+
(carousel && slider.currentSlide === slider.last) ? slider.limit :
|
| 425 |
+
(carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
|
| 426 |
+
(reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
|
| 427 |
+
startX = (vertical) ? localY : localX;
|
| 428 |
+
startY = (vertical) ? localX : localY;
|
| 429 |
+
|
| 430 |
+
el.addEventListener('touchmove', onTouchMove, false);
|
| 431 |
+
el.addEventListener('touchend', onTouchEnd, false);
|
| 432 |
+
}
|
| 433 |
+
};
|
| 434 |
+
|
| 435 |
+
onTouchMove = function(e) {
|
| 436 |
+
// Local vars for X and Y points.
|
| 437 |
+
|
| 438 |
+
localX = e.touches[0].pageX;
|
| 439 |
+
localY = e.touches[0].pageY;
|
| 440 |
+
|
| 441 |
+
dx = (vertical) ? startX - localY : startX - localX;
|
| 442 |
+
scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY));
|
| 443 |
+
|
| 444 |
+
var fxms = 500;
|
| 445 |
+
|
| 446 |
+
if ( ! scrolling || Number( new Date() ) - startT > fxms ) {
|
| 447 |
+
e.preventDefault();
|
| 448 |
+
if (!fade && slider.transitions) {
|
| 449 |
+
if (!slider.vars.animationLoop) {
|
| 450 |
+
dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
|
| 451 |
+
}
|
| 452 |
+
slider.setProps(offset + dx, "setTouch");
|
| 453 |
+
}
|
| 454 |
+
}
|
| 455 |
+
};
|
| 456 |
+
|
| 457 |
+
onTouchEnd = function(e) {
|
| 458 |
+
// finish the touch by undoing the touch session
|
| 459 |
+
el.removeEventListener('touchmove', onTouchMove, false);
|
| 460 |
+
|
| 461 |
+
if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
|
| 462 |
+
var updateDx = (reverse) ? -dx : dx,
|
| 463 |
+
target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
|
| 464 |
+
|
| 465 |
+
if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
|
| 466 |
+
slider.wcflexAnimate(target, slider.vars.pauseOnAction);
|
| 467 |
+
} else {
|
| 468 |
+
if (!fade) { slider.wcflexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
|
| 469 |
+
}
|
| 470 |
+
}
|
| 471 |
+
el.removeEventListener('touchend', onTouchEnd, false);
|
| 472 |
+
|
| 473 |
+
startX = null;
|
| 474 |
+
startY = null;
|
| 475 |
+
dx = null;
|
| 476 |
+
offset = null;
|
| 477 |
+
};
|
| 478 |
+
|
| 479 |
+
el.addEventListener('touchstart', onTouchStart, false);
|
| 480 |
+
}else{
|
| 481 |
+
el.style.msTouchAction = "none";
|
| 482 |
+
el._gesture = new MSGesture();
|
| 483 |
+
el._gesture.target = el;
|
| 484 |
+
el.addEventListener("MSPointerDown", onMSPointerDown, false);
|
| 485 |
+
el._slider = slider;
|
| 486 |
+
el.addEventListener("MSGestureChange", onMSGestureChange, false);
|
| 487 |
+
el.addEventListener("MSGestureEnd", onMSGestureEnd, false);
|
| 488 |
+
|
| 489 |
+
function onMSPointerDown(e){
|
| 490 |
+
e.stopPropagation();
|
| 491 |
+
if (slider.animating) {
|
| 492 |
+
e.preventDefault();
|
| 493 |
+
}else{
|
| 494 |
+
slider.pause();
|
| 495 |
+
el._gesture.addPointer(e.pointerId);
|
| 496 |
+
accDx = 0;
|
| 497 |
+
cwidth = (vertical) ? slider.h : slider. w;
|
| 498 |
+
startT = Number(new Date());
|
| 499 |
+
// CAROUSEL:
|
| 500 |
+
|
| 501 |
+
offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
|
| 502 |
+
(carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
|
| 503 |
+
(carousel && slider.currentSlide === slider.last) ? slider.limit :
|
| 504 |
+
(carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
|
| 505 |
+
(reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
|
| 506 |
+
}
|
| 507 |
+
}
|
| 508 |
+
|
| 509 |
+
function onMSGestureChange(e) {
|
| 510 |
+
e.stopPropagation();
|
| 511 |
+
var slider = e.target._slider;
|
| 512 |
+
if(!slider){
|
| 513 |
+
return;
|
| 514 |
+
}
|
| 515 |
+
var transX = -e.translationX,
|
| 516 |
+
transY = -e.translationY;
|
| 517 |
+
|
| 518 |
+
//Accumulate translations.
|
| 519 |
+
accDx = accDx + ((vertical) ? transY : transX);
|
| 520 |
+
dx = accDx;
|
| 521 |
+
scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY));
|
| 522 |
+
|
| 523 |
+
if(e.detail === e.MSGESTURE_FLAG_INERTIA){
|
| 524 |
+
setImmediate(function (){
|
| 525 |
+
el._gesture.stop();
|
| 526 |
+
});
|
| 527 |
+
|
| 528 |
+
return;
|
| 529 |
+
}
|
| 530 |
+
|
| 531 |
+
if (!scrolling || Number(new Date()) - startT > 500) {
|
| 532 |
+
e.preventDefault();
|
| 533 |
+
if (!fade && slider.transitions) {
|
| 534 |
+
if (!slider.vars.animationLoop) {
|
| 535 |
+
dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1);
|
| 536 |
+
}
|
| 537 |
+
slider.setProps(offset + dx, "setTouch");
|
| 538 |
+
}
|
| 539 |
+
}
|
| 540 |
+
}
|
| 541 |
+
|
| 542 |
+
function onMSGestureEnd(e) {
|
| 543 |
+
e.stopPropagation();
|
| 544 |
+
var slider = e.target._slider;
|
| 545 |
+
if(!slider){
|
| 546 |
+
return;
|
| 547 |
+
}
|
| 548 |
+
if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
|
| 549 |
+
var updateDx = (reverse) ? -dx : dx,
|
| 550 |
+
target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
|
| 551 |
+
|
| 552 |
+
if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
|
| 553 |
+
slider.wcflexAnimate(target, slider.vars.pauseOnAction);
|
| 554 |
+
} else {
|
| 555 |
+
if (!fade) { slider.wcflexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
|
| 556 |
+
}
|
| 557 |
+
}
|
| 558 |
+
|
| 559 |
+
startX = null;
|
| 560 |
+
startY = null;
|
| 561 |
+
dx = null;
|
| 562 |
+
offset = null;
|
| 563 |
+
accDx = 0;
|
| 564 |
+
}
|
| 565 |
+
}
|
| 566 |
+
},
|
| 567 |
+
resize: function() {
|
| 568 |
+
if (!slider.animating && slider.is(':visible')) {
|
| 569 |
+
if (!carousel) { slider.doMath(); }
|
| 570 |
+
|
| 571 |
+
if (fade) {
|
| 572 |
+
// SMOOTH HEIGHT:
|
| 573 |
+
methods.smoothHeight();
|
| 574 |
+
} else if (carousel) { //CAROUSEL:
|
| 575 |
+
slider.slides.width(slider.computedW);
|
| 576 |
+
slider.update(slider.pagingCount);
|
| 577 |
+
slider.setProps();
|
| 578 |
+
}
|
| 579 |
+
else if (vertical) { //VERTICAL:
|
| 580 |
+
slider.viewport.height(slider.h);
|
| 581 |
+
slider.setProps(slider.h, "setTotal");
|
| 582 |
+
} else {
|
| 583 |
+
// SMOOTH HEIGHT:
|
| 584 |
+
if (slider.vars.smoothHeight) { methods.smoothHeight(); }
|
| 585 |
+
slider.newSlides.width(slider.computedW);
|
| 586 |
+
slider.setProps(slider.computedW, "setTotal");
|
| 587 |
+
}
|
| 588 |
+
}
|
| 589 |
+
},
|
| 590 |
+
smoothHeight: function(dur) {
|
| 591 |
+
if (!vertical || fade) {
|
| 592 |
+
var $obj = (fade) ? slider : slider.viewport;
|
| 593 |
+
$obj.height(slider.slides.eq(slider.animatingTo).height());
|
| 594 |
+
// (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height());
|
| 595 |
+
}
|
| 596 |
+
},
|
| 597 |
+
sync: function(action) {
|
| 598 |
+
var $obj = $(slider.vars.sync).data("wcflexslider"),
|
| 599 |
+
target = slider.animatingTo;
|
| 600 |
+
|
| 601 |
+
switch (action) {
|
| 602 |
+
case "animate": $obj.wcflexAnimate(target, slider.vars.pauseOnAction, false, true); break;
|
| 603 |
+
case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break;
|
| 604 |
+
case "pause": $obj.pause(); break;
|
| 605 |
+
}
|
| 606 |
+
},
|
| 607 |
+
uniqueID: function($clone) {
|
| 608 |
+
// Append _clone to current level and children elements with id attributes
|
| 609 |
+
$clone.filter( '[id]' ).add($clone.find( '[id]' )).each(function() {
|
| 610 |
+
var $this = $(this);
|
| 611 |
+
$this.attr( 'id', $this.attr( 'id' ) + '_clone' );
|
| 612 |
+
});
|
| 613 |
+
return $clone;
|
| 614 |
+
},
|
| 615 |
+
pauseInvisible: {
|
| 616 |
+
visProp: null,
|
| 617 |
+
init: function() {
|
| 618 |
+
var visProp = methods.pauseInvisible.getHiddenProp();
|
| 619 |
+
if (visProp) {
|
| 620 |
+
var evtname = visProp.replace(/[H|h]idden/,'') + 'visibilitychange';
|
| 621 |
+
document.addEventListener(evtname, function() {
|
| 622 |
+
if (methods.pauseInvisible.isHidden()) {
|
| 623 |
+
if(slider.startTimeout) {
|
| 624 |
+
clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible
|
| 625 |
+
} else {
|
| 626 |
+
slider.pause(); //Or just pause
|
| 627 |
+
}
|
| 628 |
+
}
|
| 629 |
+
else {
|
| 630 |
+
if(slider.started) {
|
| 631 |
+
slider.play(); //Initiated before, just play
|
| 632 |
+
} else {
|
| 633 |
+
if (slider.vars.initDelay > 0) {
|
| 634 |
+
setTimeout(slider.play, slider.vars.initDelay);
|
| 635 |
+
} else {
|
| 636 |
+
slider.play(); //Didn't init before: simply init or wait for it
|
| 637 |
+
}
|
| 638 |
+
}
|
| 639 |
+
}
|
| 640 |
+
});
|
| 641 |
+
}
|
| 642 |
+
},
|
| 643 |
+
isHidden: function() {
|
| 644 |
+
var prop = methods.pauseInvisible.getHiddenProp();
|
| 645 |
+
if (!prop) {
|
| 646 |
+
return false;
|
| 647 |
+
}
|
| 648 |
+
return document[prop];
|
| 649 |
+
},
|
| 650 |
+
getHiddenProp: function() {
|
| 651 |
+
var prefixes = ['webkit','moz','ms','o'];
|
| 652 |
+
// if 'hidden' is natively supported just return it
|
| 653 |
+
if ('hidden' in document) {
|
| 654 |
+
return 'hidden';
|
| 655 |
+
}
|
| 656 |
+
// otherwise loop over all the known prefixes until we find one
|
| 657 |
+
for ( var i = 0; i < prefixes.length; i++ ) {
|
| 658 |
+
if ((prefixes[i] + 'Hidden') in document) {
|
| 659 |
+
return prefixes[i] + 'Hidden';
|
| 660 |
+
}
|
| 661 |
+
}
|
| 662 |
+
// otherwise it's not supported
|
| 663 |
+
return null;
|
| 664 |
+
}
|
| 665 |
+
},
|
| 666 |
+
setToClearWatchedEvent: function() {
|
| 667 |
+
clearTimeout(watchedEventClearTimer);
|
| 668 |
+
watchedEventClearTimer = setTimeout(function() {
|
| 669 |
+
watchedEvent = "";
|
| 670 |
+
}, 3000);
|
| 671 |
+
}
|
| 672 |
+
};
|
| 673 |
+
|
| 674 |
+
// public methods
|
| 675 |
+
slider.wcflexAnimate = function(target, pause, override, withSync, fromNav) {
|
| 676 |
+
if (!slider.vars.animationLoop && target !== slider.currentSlide) {
|
| 677 |
+
slider.direction = (target > slider.currentSlide) ? "next" : "prev";
|
| 678 |
+
}
|
| 679 |
+
|
| 680 |
+
if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev";
|
| 681 |
+
|
| 682 |
+
if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) {
|
| 683 |
+
if (asNav && withSync) {
|
| 684 |
+
var master = $(slider.vars.asNavFor).data('wcflexslider');
|
| 685 |
+
slider.atEnd = target === 0 || target === slider.count - 1;
|
| 686 |
+
master.wcflexAnimate(target, true, false, true, fromNav);
|
| 687 |
+
slider.direction = (slider.currentItem < target) ? "next" : "prev";
|
| 688 |
+
master.direction = slider.direction;
|
| 689 |
+
|
| 690 |
+
if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) {
|
| 691 |
+
slider.currentItem = target;
|
| 692 |
+
slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
|
| 693 |
+
target = Math.floor(target/slider.visible);
|
| 694 |
+
} else {
|
| 695 |
+
slider.currentItem = target;
|
| 696 |
+
slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
|
| 697 |
+
return false;
|
| 698 |
+
}
|
| 699 |
+
}
|
| 700 |
+
|
| 701 |
+
slider.animating = true;
|
| 702 |
+
slider.animatingTo = target;
|
| 703 |
+
|
| 704 |
+
// SLIDESHOW:
|
| 705 |
+
if (pause) { slider.pause(); }
|
| 706 |
+
|
| 707 |
+
// API: before() animation Callback
|
| 708 |
+
slider.vars.before(slider);
|
| 709 |
+
|
| 710 |
+
// SYNC:
|
| 711 |
+
if (slider.syncExists && !fromNav) { methods.sync("animate"); }
|
| 712 |
+
|
| 713 |
+
// CONTROLNAV
|
| 714 |
+
if (slider.vars.controlNav) { methods.controlNav.active(); }
|
| 715 |
+
|
| 716 |
+
// !CAROUSEL:
|
| 717 |
+
// CANDIDATE: slide active class (for add/remove slide)
|
| 718 |
+
if (!carousel) { slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide'); }
|
| 719 |
+
|
| 720 |
+
// INFINITE LOOP:
|
| 721 |
+
// CANDIDATE: atEnd
|
| 722 |
+
slider.atEnd = target === 0 || target === slider.last;
|
| 723 |
+
|
| 724 |
+
// DIRECTIONNAV:
|
| 725 |
+
if (slider.vars.directionNav) { methods.directionNav.update(); }
|
| 726 |
+
|
| 727 |
+
if (target === slider.last) {
|
| 728 |
+
// API: end() of cycle Callback
|
| 729 |
+
slider.vars.end(slider);
|
| 730 |
+
// SLIDESHOW && !INFINITE LOOP:
|
| 731 |
+
if (!slider.vars.animationLoop) { slider.pause(); }
|
| 732 |
+
}
|
| 733 |
+
|
| 734 |
+
// SLIDE:
|
| 735 |
+
if (!fade) {
|
| 736 |
+
var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW,
|
| 737 |
+
margin, slideString, calcNext;
|
| 738 |
+
|
| 739 |
+
// INFINITE LOOP / REVERSE:
|
| 740 |
+
if (carousel) {
|
| 741 |
+
//margin = (slider.vars.itemWidth > slider.w) ? slider.vars.itemMargin * 2 : slider.vars.itemMargin;
|
| 742 |
+
margin = slider.vars.itemMargin;
|
| 743 |
+
calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo;
|
| 744 |
+
slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext;
|
| 745 |
+
} else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") {
|
| 746 |
+
slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0;
|
| 747 |
+
} else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") {
|
| 748 |
+
slideString = (reverse) ? 0 : (slider.count + 1) * dimension;
|
| 749 |
+
} else {
|
| 750 |
+
slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
|
| 751 |
+
}
|
| 752 |
+
slider.setProps(slideString, "", slider.vars.animationSpeed);
|
| 753 |
+
if (slider.transitions) {
|
| 754 |
+
if (!slider.vars.animationLoop || !slider.atEnd) {
|
| 755 |
+
slider.animating = false;
|
| 756 |
+
slider.currentSlide = slider.animatingTo;
|
| 757 |
+
}
|
| 758 |
+
|
| 759 |
+
// Unbind previous transitionEnd events and re-bind new transitionEnd event
|
| 760 |
+
slider.container.unbind("webkitTransitionEnd transitionend");
|
| 761 |
+
slider.container.bind("webkitTransitionEnd transitionend", function() {
|
| 762 |
+
clearTimeout(slider.ensureAnimationEnd);
|
| 763 |
+
slider.wrapup(dimension);
|
| 764 |
+
});
|
| 765 |
+
|
| 766 |
+
// Insurance for the ever-so-fickle transitionEnd event
|
| 767 |
+
clearTimeout(slider.ensureAnimationEnd);
|
| 768 |
+
slider.ensureAnimationEnd = setTimeout(function() {
|
| 769 |
+
slider.wrapup(dimension);
|
| 770 |
+
}, slider.vars.animationSpeed + 100);
|
| 771 |
+
|
| 772 |
+
} else {
|
| 773 |
+
slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){
|
| 774 |
+
slider.wrapup(dimension);
|
| 775 |
+
});
|
| 776 |
+
}
|
| 777 |
+
} else { // FADE:
|
| 778 |
+
if (!touch) {
|
| 779 |
+
//slider.slides.eq(slider.currentSlide).fadeOut(slider.vars.animationSpeed, slider.vars.easing);
|
| 780 |
+
//slider.slides.eq(target).fadeIn(slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
|
| 781 |
+
|
| 782 |
+
slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing);
|
| 783 |
+
slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
|
| 784 |
+
|
| 785 |
+
} else {
|
| 786 |
+
slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
|
| 787 |
+
slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
|
| 788 |
+
slider.wrapup(dimension);
|
| 789 |
+
}
|
| 790 |
+
}
|
| 791 |
+
// SMOOTH HEIGHT:
|
| 792 |
+
if (slider.vars.smoothHeight) { methods.smoothHeight(slider.vars.animationSpeed); }
|
| 793 |
+
}
|
| 794 |
+
};
|
| 795 |
+
slider.wrapup = function(dimension) {
|
| 796 |
+
// SLIDE:
|
| 797 |
+
if (!fade && !carousel) {
|
| 798 |
+
if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) {
|
| 799 |
+
slider.setProps(dimension, "jumpEnd");
|
| 800 |
+
} else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) {
|
| 801 |
+
slider.setProps(dimension, "jumpStart");
|
| 802 |
+
}
|
| 803 |
+
}
|
| 804 |
+
slider.animating = false;
|
| 805 |
+
slider.currentSlide = slider.animatingTo;
|
| 806 |
+
// API: after() animation Callback
|
| 807 |
+
slider.vars.after(slider);
|
| 808 |
+
};
|
| 809 |
+
|
| 810 |
+
// SLIDESHOW:
|
| 811 |
+
slider.animateSlides = function() {
|
| 812 |
+
if (!slider.animating && focused ) { slider.wcflexAnimate(slider.getTarget("next")); }
|
| 813 |
+
};
|
| 814 |
+
// SLIDESHOW:
|
| 815 |
+
slider.pause = function() {
|
| 816 |
+
clearInterval(slider.animatedSlides);
|
| 817 |
+
slider.animatedSlides = null;
|
| 818 |
+
slider.playing = false;
|
| 819 |
+
// PAUSEPLAY:
|
| 820 |
+
if (slider.vars.pausePlay) { methods.pausePlay.update("play"); }
|
| 821 |
+
// SYNC:
|
| 822 |
+
if (slider.syncExists) { methods.sync("pause"); }
|
| 823 |
+
};
|
| 824 |
+
// SLIDESHOW:
|
| 825 |
+
slider.play = function() {
|
| 826 |
+
if (slider.playing) { clearInterval(slider.animatedSlides); }
|
| 827 |
+
slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
|
| 828 |
+
slider.started = slider.playing = true;
|
| 829 |
+
// PAUSEPLAY:
|
| 830 |
+
if (slider.vars.pausePlay) { methods.pausePlay.update("pause"); }
|
| 831 |
+
// SYNC:
|
| 832 |
+
if (slider.syncExists) { methods.sync("play"); }
|
| 833 |
+
};
|
| 834 |
+
// STOP:
|
| 835 |
+
slider.stop = function () {
|
| 836 |
+
slider.pause();
|
| 837 |
+
slider.stopped = true;
|
| 838 |
+
};
|
| 839 |
+
slider.canAdvance = function(target, fromNav) {
|
| 840 |
+
// ASNAV:
|
| 841 |
+
var last = (asNav) ? slider.pagingCount - 1 : slider.last;
|
| 842 |
+
return (fromNav) ? true :
|
| 843 |
+
(asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true :
|
| 844 |
+
(asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false :
|
| 845 |
+
(target === slider.currentSlide && !asNav) ? false :
|
| 846 |
+
(slider.vars.animationLoop) ? true :
|
| 847 |
+
(slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false :
|
| 848 |
+
(slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false :
|
| 849 |
+
true;
|
| 850 |
+
};
|
| 851 |
+
slider.getTarget = function(dir) {
|
| 852 |
+
slider.direction = dir;
|
| 853 |
+
if (dir === "next") {
|
| 854 |
+
return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1;
|
| 855 |
+
} else {
|
| 856 |
+
return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1;
|
| 857 |
+
}
|
| 858 |
+
};
|
| 859 |
+
|
| 860 |
+
// SLIDE:
|
| 861 |
+
slider.setProps = function(pos, special, dur) {
|
| 862 |
+
var target = (function() {
|
| 863 |
+
var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo,
|
| 864 |
+
posCalc = (function() {
|
| 865 |
+
if (carousel) {
|
| 866 |
+
return (special === "setTouch") ? pos :
|
| 867 |
+
(reverse && slider.animatingTo === slider.last) ? 0 :
|
| 868 |
+
(reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
|
| 869 |
+
(slider.animatingTo === slider.last) ? slider.limit : posCheck;
|
| 870 |
+
} else {
|
| 871 |
+
switch (special) {
|
| 872 |
+
case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos;
|
| 873 |
+
case "setTouch": return (reverse) ? pos : pos;
|
| 874 |
+
case "jumpEnd": return (reverse) ? pos : slider.count * pos;
|
| 875 |
+
case "jumpStart": return (reverse) ? slider.count * pos : pos;
|
| 876 |
+
default: return pos;
|
| 877 |
+
}
|
| 878 |
+
}
|
| 879 |
+
}());
|
| 880 |
+
|
| 881 |
+
return (posCalc * -1) + "px";
|
| 882 |
+
}());
|
| 883 |
+
|
| 884 |
+
if (slider.transitions) {
|
| 885 |
+
target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)";
|
| 886 |
+
dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
|
| 887 |
+
slider.container.css("-" + slider.pfx + "-transition-duration", dur);
|
| 888 |
+
slider.container.css("transition-duration", dur);
|
| 889 |
+
}
|
| 890 |
+
|
| 891 |
+
slider.args[slider.prop] = target;
|
| 892 |
+
if (slider.transitions || dur === undefined) { slider.container.css(slider.args); }
|
| 893 |
+
|
| 894 |
+
slider.container.css('transform',target);
|
| 895 |
+
};
|
| 896 |
+
|
| 897 |
+
slider.setup = function(type) {
|
| 898 |
+
// SLIDE:
|
| 899 |
+
if (!fade) {
|
| 900 |
+
var sliderOffset, arr;
|
| 901 |
+
|
| 902 |
+
if (type === "init") {
|
| 903 |
+
slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
|
| 904 |
+
// INFINITE LOOP:
|
| 905 |
+
slider.cloneCount = 0;
|
| 906 |
+
slider.cloneOffset = 0;
|
| 907 |
+
// REVERSE:
|
| 908 |
+
if (reverse) {
|
| 909 |
+
arr = $.makeArray(slider.slides).reverse();
|
| 910 |
+
slider.slides = $(arr);
|
| 911 |
+
slider.container.empty().append(slider.slides);
|
| 912 |
+
}
|
| 913 |
+
}
|
| 914 |
+
// INFINITE LOOP && !CAROUSEL:
|
| 915 |
+
if (slider.vars.animationLoop && !carousel) {
|
| 916 |
+
slider.cloneCount = 2;
|
| 917 |
+
slider.cloneOffset = 1;
|
| 918 |
+
// clear out old clones
|
| 919 |
+
if (type !== "init") { slider.container.find('.clone').remove(); }
|
| 920 |
+
slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true'))
|
| 921 |
+
.prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true'));
|
| 922 |
+
}
|
| 923 |
+
slider.newSlides = $(slider.vars.selector, slider);
|
| 924 |
+
|
| 925 |
+
sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset;
|
| 926 |
+
// VERTICAL:
|
| 927 |
+
if (vertical && !carousel) {
|
| 928 |
+
slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
|
| 929 |
+
setTimeout(function(){
|
| 930 |
+
slider.newSlides.css({"display": "block"});
|
| 931 |
+
slider.doMath();
|
| 932 |
+
slider.viewport.height(slider.h);
|
| 933 |
+
slider.setProps(sliderOffset * slider.h, "init");
|
| 934 |
+
}, (type === "init") ? 100 : 0);
|
| 935 |
+
} else {
|
| 936 |
+
slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
|
| 937 |
+
slider.setProps(sliderOffset * slider.computedW, "init");
|
| 938 |
+
setTimeout(function(){
|
| 939 |
+
slider.doMath();
|
| 940 |
+
slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"});
|
| 941 |
+
// SMOOTH HEIGHT:
|
| 942 |
+
if (slider.vars.smoothHeight) { methods.smoothHeight(); }
|
| 943 |
+
}, (type === "init") ? 100 : 0);
|
| 944 |
+
}
|
| 945 |
+
} else { // FADE:
|
| 946 |
+
slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"});
|
| 947 |
+
if (type === "init") {
|
| 948 |
+
if (!touch) {
|
| 949 |
+
//slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing);
|
| 950 |
+
if (slider.vars.fadeFirstSlide == false) {
|
| 951 |
+
slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).css({"opacity": 1});
|
| 952 |
+
} else {
|
| 953 |
+
slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing);
|
| 954 |
+
}
|
| 955 |
+
} else {
|
| 956 |
+
slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2});
|
| 957 |
+
}
|
| 958 |
+
}
|
| 959 |
+
// SMOOTH HEIGHT:
|
| 960 |
+
if (slider.vars.smoothHeight) { methods.smoothHeight(); }
|
| 961 |
+
}
|
| 962 |
+
// !CAROUSEL:
|
| 963 |
+
// CANDIDATE: active slide
|
| 964 |
+
if (!carousel) { slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide"); }
|
| 965 |
+
|
| 966 |
+
//FlexSlider: init() Callback
|
| 967 |
+
slider.vars.init(slider);
|
| 968 |
+
};
|
| 969 |
+
|
| 970 |
+
slider.doMath = function() {
|
| 971 |
+
var slide = slider.slides.first(),
|
| 972 |
+
slideMargin = slider.vars.itemMargin,
|
| 973 |
+
minItems = slider.vars.minItems,
|
| 974 |
+
maxItems = slider.vars.maxItems;
|
| 975 |
+
|
| 976 |
+
slider.w = (slider.viewport===undefined) ? slider.width() : slider.viewport.width();
|
| 977 |
+
slider.h = slide.height();
|
| 978 |
+
slider.boxPadding = slide.outerWidth() - slide.width();
|
| 979 |
+
|
| 980 |
+
// CAROUSEL:
|
| 981 |
+
if (carousel) {
|
| 982 |
+
slider.itemT = slider.vars.itemWidth + slideMargin;
|
| 983 |
+
slider.minW = (minItems) ? minItems * slider.itemT : slider.w;
|
| 984 |
+
slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w;
|
| 985 |
+
slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems :
|
| 986 |
+
(slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems :
|
| 987 |
+
(slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth;
|
| 988 |
+
|
| 989 |
+
slider.visible = Math.floor(slider.w/(slider.itemW));
|
| 990 |
+
slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible;
|
| 991 |
+
slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
|
| 992 |
+
slider.last = slider.pagingCount - 1;
|
| 993 |
+
slider.limit = (slider.pagingCount === 1) ? 0 :
|
| 994 |
+
(slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
|
| 995 |
+
} else {
|
| 996 |
+
slider.itemW = slider.w;
|
| 997 |
+
slider.pagingCount = slider.count;
|
| 998 |
+
slider.last = slider.count - 1;
|
| 999 |
+
}
|
| 1000 |
+
slider.computedW = slider.itemW - slider.boxPadding;
|
| 1001 |
+
};
|
| 1002 |
+
|
| 1003 |
+
slider.update = function(pos, action) {
|
| 1004 |
+
slider.doMath();
|
| 1005 |
+
|
| 1006 |
+
// update currentSlide and slider.animatingTo if necessary
|
| 1007 |
+
if (!carousel) {
|
| 1008 |
+
if (pos < slider.currentSlide) {
|
| 1009 |
+
slider.currentSlide += 1;
|
| 1010 |
+
} else if (pos <= slider.currentSlide && pos !== 0) {
|
| 1011 |
+
slider.currentSlide -= 1;
|
| 1012 |
+
}
|
| 1013 |
+
slider.animatingTo = slider.currentSlide;
|
| 1014 |
+
}
|
| 1015 |
+
|
| 1016 |
+
// update controlNav
|
| 1017 |
+
if (slider.vars.controlNav && !slider.manualControls) {
|
| 1018 |
+
if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) {
|
| 1019 |
+
methods.controlNav.update("add");
|
| 1020 |
+
} else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) {
|
| 1021 |
+
if (carousel && slider.currentSlide > slider.last) {
|
| 1022 |
+
slider.currentSlide -= 1;
|
| 1023 |
+
slider.animatingTo -= 1;
|
| 1024 |
+
}
|
| 1025 |
+
methods.controlNav.update("remove", slider.last);
|
| 1026 |
+
}
|
| 1027 |
+
}
|
| 1028 |
+
// update directionNav
|
| 1029 |
+
if (slider.vars.directionNav) { methods.directionNav.update(); }
|
| 1030 |
+
|
| 1031 |
+
};
|
| 1032 |
+
|
| 1033 |
+
slider.addSlide = function(obj, pos) {
|
| 1034 |
+
var $obj = $(obj);
|
| 1035 |
+
|
| 1036 |
+
slider.count += 1;
|
| 1037 |
+
slider.last = slider.count - 1;
|
| 1038 |
+
|
| 1039 |
+
// append new slide
|
| 1040 |
+
if (vertical && reverse) {
|
| 1041 |
+
(pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj);
|
| 1042 |
+
} else {
|
| 1043 |
+
(pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj);
|
| 1044 |
+
}
|
| 1045 |
+
|
| 1046 |
+
// update currentSlide, animatingTo, controlNav, and directionNav
|
| 1047 |
+
slider.update(pos, "add");
|
| 1048 |
+
|
| 1049 |
+
// update slider.slides
|
| 1050 |
+
slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
|
| 1051 |
+
// re-setup the slider to accomdate new slide
|
| 1052 |
+
slider.setup();
|
| 1053 |
+
|
| 1054 |
+
//FlexSlider: added() Callback
|
| 1055 |
+
slider.vars.added(slider);
|
| 1056 |
+
};
|
| 1057 |
+
slider.removeSlide = function(obj) {
|
| 1058 |
+
var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;
|
| 1059 |
+
|
| 1060 |
+
// update count
|
| 1061 |
+
slider.count -= 1;
|
| 1062 |
+
slider.last = slider.count - 1;
|
| 1063 |
+
|
| 1064 |
+
// remove slide
|
| 1065 |
+
if (isNaN(obj)) {
|
| 1066 |
+
$(obj, slider.slides).remove();
|
| 1067 |
+
} else {
|
| 1068 |
+
(vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove();
|
| 1069 |
+
}
|
| 1070 |
+
|
| 1071 |
+
// update currentSlide, animatingTo, controlNav, and directionNav
|
| 1072 |
+
slider.doMath();
|
| 1073 |
+
slider.update(pos, "remove");
|
| 1074 |
+
|
| 1075 |
+
// update slider.slides
|
| 1076 |
+
slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
|
| 1077 |
+
// re-setup the slider to accomdate new slide
|
| 1078 |
+
slider.setup();
|
| 1079 |
+
|
| 1080 |
+
// FlexSlider: removed() Callback
|
| 1081 |
+
slider.vars.removed(slider);
|
| 1082 |
+
};
|
| 1083 |
+
|
| 1084 |
+
//FlexSlider: Initialize
|
| 1085 |
+
methods.init();
|
| 1086 |
+
};
|
| 1087 |
+
|
| 1088 |
+
// Ensure the slider isn't focussed if the window loses focus.
|
| 1089 |
+
$( window ).blur( function ( e ) {
|
| 1090 |
+
focused = false;
|
| 1091 |
+
}).focus( function ( e ) {
|
| 1092 |
+
focused = true;
|
| 1093 |
+
});
|
| 1094 |
+
|
| 1095 |
+
//FlexSlider: Default Settings
|
| 1096 |
+
$.wcflexslider.defaults = {
|
| 1097 |
+
namespace: "wcflex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin
|
| 1098 |
+
selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
|
| 1099 |
+
animation: "fade", //String: Select your animation type, "fade" or "slide"
|
| 1100 |
+
easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
|
| 1101 |
+
direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
|
| 1102 |
+
reverse: false, //{NEW} Boolean: Reverse the animation direction
|
| 1103 |
+
animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
|
| 1104 |
+
smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
|
| 1105 |
+
startAt: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide)
|
| 1106 |
+
slideshow: true, //Boolean: Animate slider automatically
|
| 1107 |
+
slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds
|
| 1108 |
+
animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds
|
| 1109 |
+
initDelay: 0, //{NEW} Integer: Set an initialization delay, in milliseconds
|
| 1110 |
+
randomize: false, //Boolean: Randomize slide order
|
| 1111 |
+
fadeFirstSlide: true, //Boolean: Fade in the first slide when animation type is "fade"
|
| 1112 |
+
thumbCaptions: false, //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav.
|
| 1113 |
+
|
| 1114 |
+
// Usability features
|
| 1115 |
+
pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
|
| 1116 |
+
pauseOnHover: false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
|
| 1117 |
+
pauseInvisible: true, //{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage.
|
| 1118 |
+
useCSS: true, //{NEW} Boolean: Slider will use CSS3 transitions if available
|
| 1119 |
+
touch: true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
|
| 1120 |
+
video: false, //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches
|
| 1121 |
+
|
| 1122 |
+
// Primary Controls
|
| 1123 |
+
controlNav: true, //Boolean: Create navigation for paging control of each slide? Note: Leave true for manualControls usage
|
| 1124 |
+
directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false)
|
| 1125 |
+
prevText: "Previous", //String: Set the text for the "previous" directionNav item
|
| 1126 |
+
nextText: "Next", //String: Set the text for the "next" directionNav item
|
| 1127 |
+
|
| 1128 |
+
// Secondary Navigation
|
| 1129 |
+
keyboard: true, //Boolean: Allow slider navigating via keyboard left/right keys
|
| 1130 |
+
multipleKeyboard: false, //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
|
| 1131 |
+
mousewheel: false, //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
|
| 1132 |
+
pausePlay: false, //Boolean: Create pause/play dynamic element
|
| 1133 |
+
pauseText: "Pause", //String: Set the text for the "pause" pausePlay item
|
| 1134 |
+
playText: "Play", //String: Set the text for the "play" pausePlay item
|
| 1135 |
+
|
| 1136 |
+
// Special properties
|
| 1137 |
+
controlsContainer: "", //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".wcflexslider-container"). Property is ignored if given element is not found.
|
| 1138 |
+
manualControls: "", //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".wcflex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
|
| 1139 |
+
customDirectionNav: "", //{NEW} jQuery Object/Selector: Custom prev / next button. Must be two jQuery elements. In order to make the events work they have to have the classes "prev" and "next" (plus namespace)
|
| 1140 |
+
sync: "", //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
|
| 1141 |
+
asNavFor: "", //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider
|
| 1142 |
+
|
| 1143 |
+
// Carousel Options
|
| 1144 |
+
itemWidth: 0, //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
|
| 1145 |
+
itemMargin: 0, //{NEW} Integer: Margin between carousel items.
|
| 1146 |
+
minItems: 1, //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
|
| 1147 |
+
maxItems: 0, //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
|
| 1148 |
+
move: 0, //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
|
| 1149 |
+
allowOneSlide: true, //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide
|
| 1150 |
+
|
| 1151 |
+
// Callback API
|
| 1152 |
+
start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide
|
| 1153 |
+
before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation
|
| 1154 |
+
after: function(){}, //Callback: function(slider) - Fires after each slider animation completes
|
| 1155 |
+
end: function(){}, //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
|
| 1156 |
+
added: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is added
|
| 1157 |
+
removed: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is removed
|
| 1158 |
+
init: function() {} //{NEW} Callback: function(slider) - Fires after the slider is initially setup
|
| 1159 |
+
};
|
| 1160 |
+
|
| 1161 |
+
//FlexSlider: Plugin Function
|
| 1162 |
+
$.fn.wcflexslider = function(options) {
|
| 1163 |
+
if (options === undefined) { options = {}; }
|
| 1164 |
+
|
| 1165 |
+
if (typeof options === "object") {
|
| 1166 |
+
return this.each(function() {
|
| 1167 |
+
var $this = $(this),
|
| 1168 |
+
selector = (options.selector) ? options.selector : ".slides > li",
|
| 1169 |
+
$slides = $this.find(selector);
|
| 1170 |
+
|
| 1171 |
+
if ( ( $slides.length === 1 && options.allowOneSlide === true ) || $slides.length === 0 ) {
|
| 1172 |
+
$slides.fadeIn(400);
|
| 1173 |
+
if (options.start) { options.start($this); }
|
| 1174 |
+
} else if ($this.data('wcflexslider') === undefined) {
|
| 1175 |
+
new $.wcflexslider(this, options);
|
| 1176 |
+
}
|
| 1177 |
+
});
|
| 1178 |
+
} else {
|
| 1179 |
+
// Helper strings to quickly perform functions on the slider
|
| 1180 |
+
var $slider = $(this).data('wcflexslider');
|
| 1181 |
+
switch (options) {
|
| 1182 |
+
case "play": $slider.play(); break;
|
| 1183 |
+
case "pause": $slider.pause(); break;
|
| 1184 |
+
case "stop": $slider.stop(); break;
|
| 1185 |
+
case "next": $slider.wcflexAnimate($slider.getTarget("next"), true); break;
|
| 1186 |
+
case "prev":
|
| 1187 |
+
case "previous": $slider.wcflexAnimate($slider.getTarget("prev"), true); break;
|
| 1188 |
+
default: if (typeof options === "number") { $slider.wcflexAnimate(options, true); }
|
| 1189 |
+
}
|
| 1190 |
+
}
|
| 1191 |
+
};
|
| 1192 |
+
})(jQuery);
|
