Pastakhov has submitted this change and it was merged.

Change subject: update library slick to 1.5.7 (v 1.4.5)
......................................................................


update library slick to 1.5.7 (v 1.4.5)

Change-Id: Icd57b2402da304edf41aa413e45ac904288d1494
---
M PhpTagsWidgets.php
M resources/libs/slick/CONTRIBUTING.markdown
M resources/libs/slick/README.markdown
A resources/libs/slick/slick-theme.css
M resources/libs/slick/slick.css
M resources/libs/slick/slick.js
6 files changed, 1,481 insertions(+), 610 deletions(-)

Approvals:
  Pastakhov: Verified; Looks good to me, approved



diff --git a/PhpTagsWidgets.php b/PhpTagsWidgets.php
index ad33fd0..6cfcc0b 100644
--- a/PhpTagsWidgets.php
+++ b/PhpTagsWidgets.php
@@ -15,7 +15,7 @@
        die( 'This file is an extension to MediaWiki and thus not a valid entry 
point.' );
 }
 
-const PHPTAGS_WIDGETS_VERSION = '1.4.4';
+const PHPTAGS_WIDGETS_VERSION = '1.4.5';
 
 // Register this extension on Special:Version
 $wgExtensionCredits['phptags'][] = array(
@@ -60,7 +60,10 @@
 
 $wgResourceModules['ext.PhpTagsWidgets.slick'] = array(
        'scripts' => 'libs/slick/slick.js',
-       'styles' => 'libs/slick/slick.css',
+       'styles' => array(
+               'libs/slick/slick.css',
+               'libs/slick/slick-theme.css',
+       ),
        //'dependencies' => array( 'jquery' ),
 ) + $tpl;
 
diff --git a/resources/libs/slick/CONTRIBUTING.markdown 
b/resources/libs/slick/CONTRIBUTING.markdown
index 5635b6f..9509e7e 100644
--- a/resources/libs/slick/CONTRIBUTING.markdown
+++ b/resources/libs/slick/CONTRIBUTING.markdown
@@ -2,30 +2,33 @@
 
 ### Test case required
 
-All bug reports and problem issues require a jsFiddle. You can create one at 
[jsfiddle.net](http://jsfiddle.net).
+**All bug reports and problem issues require a jsFiddle**.
+[Please fork this JSFiddle as a 
baseline](http://jsfiddle.net/simeydotme/fmo50w7n/).
 
 + A test case clearly demonstrates the bug or issue.
 + It contains the bare minimum HTML, CSS, and JavaScript required to 
demonstrate the bug.
++ Assets are not minified (we cannot debug .min.js files).
 + A link to your production site is **not** a reduced test case.
 
-Providing a test case is the best way to get your issue addressed. Without a 
test case, your issue may be closed.
-
-You must provide a clear and simple way to reproduce the issue with the 
provided demo.
+Providing a test case is the best way to get your issue addressed. Without a 
test case; your issue may be closed.
+You must provide a clear and simple way to reproduce the issue with the 
provided fiddle.
 
 ## Support
 
-If you are having problems getting Slick to work, or can't figure something 
out, this repository's issues section is not the place to ask about it.
+Although Slick is designed to be super easy to use, there's always things that 
can go wrong, especially when interacting with other plugins and complicated 
websites. If you are **having problems getting Slick to work**, or can't figure 
something out, **this repository**'s issues section **is not the place to ask 
about it**.
 
 I have set up a subreddit for Slick discussion at 
[reddit.com/r/slickcarousel](http://www.reddit.com/r/slickcarousel/).
+And a gitter chatroom here: 
[gitter.im/kenwheeler/slick](https://gitter.im/kenwheeler/slick)
 
-Please use this as an area to discuss Slick and any issues you may have.
+Please use these forums as an area to discuss Slick and any issues you may 
have.
 
 ## Feature Requests
 
-If you would like to request or propose a feature, please do so in the the 
Slick subreddit - 
[reddit.com/r/slickcarousel](http://www.reddit.com/r/slickcarousel/). 
+If you would like to request or propose a feature, please do so in the the 
Slick subreddit or gitter chat:
+[reddit.com/r/slickcarousel](http://www.reddit.com/r/slickcarousel/) / 
[gitter.im/kenwheeler/slick](https://gitter.im/kenwheeler/slick).
 
 ## Pull requests
 
-Contributions are welcome! That said, please be prepared to edit your pull 
request at request, and provide a jsFiddle of your fork working interoperably 
with every "mode" that Slick supports, and with varying numbers of slides, 
slidesToShow & slidesToScroll. Failure to do so will result in your pull 
request being closed.
+**Contributions are welcome**! That said, please *be prepared to edit* your 
pull request at request, and provide a jsFiddle of your fork working 
interoperably with every "mode" that Slick supports, and with varying numbers 
of slides, slidesToShow & slidesToScroll. Failure to do so will result in your 
pull request being closed.
 
-Please note that while Slick is open source, this is still my baby, and by 
submitting a pull request you are authorizing me to edit or modify it in any 
way shape or form. You will be listed in Github as a contributor, but I have 
and will continue to steer the direction of this project.
+*Please note that while Slick is open source, this is still my baby, and by 
submitting a pull request you are authorizing me to edit or modify it in any 
way shape or form. You will be listed in Github as a contributor, but I have 
and will continue to steer the direction of this project.*
diff --git a/resources/libs/slick/README.markdown 
b/resources/libs/slick/README.markdown
index 11070bf..0e5bef9 100644
--- a/resources/libs/slick/README.markdown
+++ b/resources/libs/slick/README.markdown
@@ -16,26 +16,50 @@
 In your ```<head>``` add:
 
 ````
-<link rel="stylesheet" type="text/css" 
href="//cdn.jsdelivr.net/jquery.slick/1.3.15/slick.css"/>
+<link rel="stylesheet" type="text/css" 
href="//cdn.jsdelivr.net/jquery.slick/1.5.6/slick.css"/>
+
+// Add the slick-theme.css if you want default styling
+<link rel="stylesheet" type="text/css" 
href="//cdn.jsdelivr.net/jquery.slick/1.5.6/slick-theme.css"/>
 ````
 
 Then, before your closing ```<body>``` tag add:
 
 ```
-<script type="text/javascript" 
src="//cdn.jsdelivr.net/jquery.slick/1.3.15/slick.min.js"></script>
+<script type="text/javascript" 
src="//cdn.jsdelivr.net/jquery.slick/1.5.6/slick.min.js"></script>
 ```
 
-#### Bower
+#### Package Managers
 
 ````
-bower install --save slick.js
+//Bower
+bower install --save slick-carousel
+
+//NPM
+npm install slick-carousel
 ````
 
 #### Contributing
 
 PLEASE review CONTRIBUTING.markdown prior to requesting a feature, filing a 
pull request or filing an issue.
 
-#### Options
+### Data Attribute Settings
+
+In slick 1.5 you can now add settings using the data-slick attribute. You 
still need to call $(element).slick() to initialize slick on the element.
+
+Example:
+
+```markup
+<div data-slick='{"slidesToShow": 4, "slidesToScroll": 4}'>
+  <div><h3>1</h3></div>
+  <div><h3>2</h3></div>
+  <div><h3>3</h3></div>
+  <div><h3>4</h3></div>
+  <div><h3>5</h3></div>
+  <div><h3>6</h3></div>
+</div>
+```
+
+#### Settings
 
 Option | Type | Default | Description
 ------ | ---- | ------- | -----------
@@ -50,25 +74,24 @@
 dotsClass | string | 'slick-dots' | Class for slide indicator dots container
 draggable | boolean | true | Enables desktop dragging
 easing | string |  'linear' | animate() fallback easing
+edgeFriction | integer | 0.15 | Resistance when swiping edges of non-infinite 
carousels
 fade | boolean | false | Enables fade
 arrows | boolean | true | Enable Next/Prev arrows
 appendArrows | string | $(element) | Change where the navigation arrows are 
attached (Selector, htmlString, Array, Element, jQuery object)
 appendDots | string | $(element) | Change where the navigation dots are 
attached (Selector, htmlString, Array, Element, jQuery object)
+mobileFirst | boolean | false | Responsive settings use mobile first 
calculation
 prevArrow | string (html|jQuery selector) | object (DOM node|jQuery object) | 
<button type="button" class="slick-prev">Previous</button> | Allows you to 
select a node or customize the HTML for the "Previous" arrow.
 nextArrow | string (html|jQuery selector) | object (DOM node|jQuery object) | 
<button type="button" class="slick-next">Next</button> | Allows you to select a 
node or customize the HTML for the "Next" arrow.
 infinite | boolean | true | Infinite looping
 initialSlide | integer | 0 | Slide to start on
 lazyLoad | string | 'ondemand' | Accepts 'ondemand' or 'progressive' for lazy 
load technique
-onBeforeChange(this, currentIndex,targetIndex) | method | null | Before slide 
change callback
-onAfterChange(this, index) | method | null | After slide change callback
-onInit(this) | method | null | When Slick initializes for the first time 
callback
-onReInit(this) | method | null | Every time Slick (re-)initializes callback
-onSetPosition(this) | method | null | Every time Slick recalculates position
 pauseOnHover | boolean | true | Pauses autoplay on hover
 pauseOnDotsHover | boolean | false | Pauses autoplay when a dot is hovered
 respondTo | string | 'window' | Width that responsive object responds to. Can 
be 'window', 'slider' or 'min' (the smaller of the two).
-responsive | object | null | Breakpoint triggered settings
-slide | string | 'div' | Slide element query
+responsive | object | null | Object containing breakpoints and settings 
objects (see demo). Enables settings sets at given screen width. Set settings 
to "unslick" instead of an object to disable slick at a given breakpoint.
+rows | int | 1 | Setting this to more than 1 initializes grid mode. Use 
slidesPerRow to set how many slides should be in each row.
+slide | string | '' | Slide element query
+slidesPerRow | int | 1 | With grid mode intialized via the rows option, this 
sets how many slides are in each grid row. dver
 slidesToShow | int | 1 | # of slides to show at a time
 slidesToScroll | int | 1 | # of slides to scroll at a time
 speed | int | 300 | Transition speed
@@ -79,29 +102,82 @@
 useCSS | boolean | true | Enable/Disable CSS Transitions
 variableWidth | boolean | false | Disables automatic slide width calculation
 vertical | boolean | false | Vertical slide direction
+verticalSwiping | boolean | false | Changes swipe direction to vertical
 rtl | boolean | false | Change the slider's direction to become right-to-left
 waitForAnimate | boolean | true | Ignores requests to advance the slide while 
animating
+zIndex | number | 1000 | Set the zIndex values for slides, useful for IE9 and 
lower
+
+### Events
+
+In slick 1.4, callback methods have been deprecated and replaced with events. 
Use them before the initialization of slick as shown below:
+
+```javascript
+// On swipe event
+$('.your-element').on('swipe', function(event, slick, direction){
+  console.log(direction);
+  // left
+});
+
+// On edge hit
+$('.your-element').on('edge', function(event, slick, direction){
+  console.log('edge was hit')
+});
+
+// On before slide change
+$('.your-element').on('beforeChange', function(event, slick, currentSlide, 
nextSlide){
+  console.log(nextSlide);
+});
+```
+
+Event | Params | Description
+------ | -------- | -----------
+afterChange | event, slick, currentSlide | After slide change callback
+beforeChange | event, slick, currentSlide, nextSlide | Before slide change 
callback
+breakpoint | event, slick, breakpoint | Fires after a breakpoint is hit
+destroy | event, slick | When slider is destroyed, or unslicked.
+edge | event, slick, direction | Fires when an edge is overscrolled in 
non-infinite mode.
+init | event, slick | When Slick initializes for the first time callback
+reInit | event, slick | Every time Slick (re-)initializes callback
+setPosition | event, slick | Every time Slick recalculates position
+swipe | event, slick, direction | Fires after swipe/drag
 
 
 #### Methods
 
+Methods are called on slick instances through the slick method itself in 
version 1.4, see below:
+
+```javascript
+// Add a slide
+$('.your-element').slick('slickAdd',"<div></div>");
+
+// Get the current slide
+var currentSlide = $('.your-element').slick('slickCurrentSlide');
+```
+
+This new syntax allows you to call any internal slick method as well:
+
+```javascript
+// Manually refresh positioning of slick
+$('.your-element').slick('setPosition');
+```
+
+
 Method | Argument | Description
 ------ | -------- | -----------
-slick() | options : object | Initializes Slick
-unslick() |  | Destroys Slick
-slickNext() |  |  Triggers next slide
-slickPrev() | | Triggers previous slide
-slickPause() | | Pause Autoplay
-slickPlay() | | Start Autoplay
-slickGoTo() | index : int | Goes to slide by index
-slickCurrentSlide() |  |  Returns the current slide index
-slickAdd() | element : html or DOM object, index: int, addBefore: bool | Add a 
slide. If an index is provided, will add at that index, or before if addBefore 
is set. If no index is provided, add to the end or to the beginning if 
addBefore is set. Accepts HTML String || Object
-slickRemove() | index: int, removeBefore: bool | Remove slide by index. If 
removeBefore is set true, remove slide preceding index, or the first slide if 
no index is specified. If removeBefore is set to false, remove the slide 
following index, or the last slide if no index is set.
-slickRemoveAll() | | Removes all slides
-slickFilter() | filter : selector or function | Filters slides using jQuery 
.filter syntax
-slickUnfilter() | | Removes applied filter
-slickGetOption(option) | option : string(option name) | Gets an option value.
-slickSetOption(option,value,refresh) | option : string(option name), value : 
depends on option, refresh : boolean | Sets an option live. Set refresh to true 
if it is an option that changes the display
+slick | options : object | Initializes Slick
+unslick |  | Destroys Slick
+slickNext |  |  Triggers next slide
+slickPrev | | Triggers previous slide
+slickPause | | Pause Autoplay
+slickPlay | | Start Autoplay
+slickGoTo | index : int, dontAnimate : bool | Goes to slide by index, skipping 
animation if second parameter is set to true
+slickCurrentSlide |  |  Returns the current slide index
+slickAdd | element : html or DOM object, index: int, addBefore: bool | Add a 
slide. If an index is provided, will add at that index, or before if addBefore 
is set. If no index is provided, add to the end or to the beginning if 
addBefore is set. Accepts HTML String || Object
+slickRemove | index: int, removeBefore: bool | Remove slide by index. If 
removeBefore is set true, remove slide preceding index, or the first slide if 
no index is specified. If removeBefore is set to false, remove the slide 
following index, or the last slide if no index is set.
+slickFilter | filter : selector or function | Filters slides using jQuery 
.filter syntax
+slickUnfilter | | Removes applied filter
+slickGetOption | option : string(option name) | Gets an option value.
+slickSetOption | option : string(option name), value : depends on option, 
refresh : boolean | Sets an option live. Set refresh to true if it is an option 
that changes the display
 
 
 #### Example
diff --git a/resources/libs/slick/slick-theme.css 
b/resources/libs/slick/slick-theme.css
new file mode 100644
index 0000000..a53cd69
--- /dev/null
+++ b/resources/libs/slick/slick-theme.css
@@ -0,0 +1,201 @@
+@charset 'UTF-8';
+/* Slider */
+.slick-loading .slick-list
+{
+    background: #fff url('./ajax-loader.gif') center center no-repeat;
+}
+
+/* Icons */
+@font-face
+{
+    font-family: 'slick';
+    font-weight: normal;
+    font-style: normal;
+
+    src: url('./fonts/slick.eot');
+    src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), 
url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') 
format('truetype'), url('./fonts/slick.svg#slick') format('svg');
+}
+/* Arrows */
+.slick-prev,
+.slick-next
+{
+    font-size: 0;
+    line-height: 0;
+
+    position: absolute;
+    top: 50%;
+
+    display: block;
+
+    width: 20px;
+    height: 20px;
+    margin-top: -10px;
+    padding: 0;
+
+    cursor: pointer;
+
+    color: transparent;
+    border: none;
+    outline: none;
+    background: transparent;
+}
+.slick-prev:hover,
+.slick-prev:focus,
+.slick-next:hover,
+.slick-next:focus
+{
+    color: transparent;
+    outline: none;
+    background: transparent;
+}
+.slick-prev:hover:before,
+.slick-prev:focus:before,
+.slick-next:hover:before,
+.slick-next:focus:before
+{
+    opacity: 1;
+}
+.slick-prev.slick-disabled:before,
+.slick-next.slick-disabled:before
+{
+    opacity: .25;
+}
+
+.slick-prev:before,
+.slick-next:before
+{
+    font-family: 'slick';
+    font-size: 20px;
+    line-height: 1;
+
+    opacity: .75;
+    color: white;
+
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+}
+
+.slick-prev
+{
+    left: -25px;
+}
+[dir='rtl'] .slick-prev
+{
+    right: -25px;
+    left: auto;
+}
+.slick-prev:before
+{
+    content: '←';
+}
+[dir='rtl'] .slick-prev:before
+{
+    content: '→';
+}
+
+.slick-next
+{
+    right: -25px;
+}
+[dir='rtl'] .slick-next
+{
+    right: auto;
+    left: -25px;
+}
+.slick-next:before
+{
+    content: '→';
+}
+[dir='rtl'] .slick-next:before
+{
+    content: '←';
+}
+
+/* Dots */
+.slick-slider
+{
+    margin-bottom: 30px;
+}
+
+.slick-dots
+{
+    position: absolute;
+    bottom: -45px;
+
+    display: block;
+
+    width: 100%;
+    padding: 0;
+
+    list-style: none;
+
+    text-align: center;
+}
+.slick-dots li
+{
+    position: relative;
+
+    display: inline-block;
+
+    width: 20px;
+    height: 20px;
+    margin: 0 5px;
+    padding: 0;
+
+    cursor: pointer;
+}
+.slick-dots li button
+{
+    font-size: 0;
+    line-height: 0;
+
+    display: block;
+
+    width: 20px;
+    height: 20px;
+    padding: 5px;
+
+    cursor: pointer;
+
+    color: transparent;
+    border: 0;
+    outline: none;
+    background: transparent;
+}
+.slick-dots li button:hover,
+.slick-dots li button:focus
+{
+    outline: none;
+}
+.slick-dots li button:hover:before,
+.slick-dots li button:focus:before
+{
+    opacity: 1;
+}
+.slick-dots li button:before
+{
+    font-family: 'slick';
+    font-size: 6px;
+    line-height: 20px;
+
+    position: absolute;
+    top: 0;
+    left: 0;
+
+    width: 20px;
+    height: 20px;
+
+    content: '•';
+    text-align: center;
+
+    opacity: .25;
+    color: black;
+
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+}
+.slick-dots li.slick-active button:before
+{
+    opacity: .75;
+    color: black;
+}
diff --git a/resources/libs/slick/slick.css b/resources/libs/slick/slick.css
index 2570f48..e7f5607 100644
--- a/resources/libs/slick/slick.css
+++ b/resources/libs/slick/slick.css
@@ -1,57 +1,119 @@
-@charset "UTF-8";
 /* Slider */
-.slick-slider { position: relative; display: block; box-sizing: border-box; 
-moz-box-sizing: border-box; -webkit-touch-callout: none; -webkit-user-select: 
none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; 
user-select: none; -ms-touch-action: pan-y; touch-action: pan-y; 
-webkit-tap-highlight-color: transparent; }
+.slick-slider
+{
+    position: relative;
 
-.slick-list { position: relative; overflow: hidden; display: block; margin: 0; 
padding: 0; }
-.slick-list:focus { outline: none; }
-.slick-loading .slick-list { background: #fff url("./ajax-loader.gif") center 
center no-repeat; }
-.slick-list.dragging { cursor: pointer; cursor: hand; }
+    display: block;
 
-.slick-slider .slick-track { -webkit-transform: translate3d(0, 0, 0); 
-moz-transform: translate3d(0, 0, 0); -ms-transform: translate3d(0, 0, 0); 
-o-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
+    -moz-box-sizing: border-box;
+         box-sizing: border-box;
 
-.slick-track { position: relative; left: 0; top: 0; display: block; }
-.slick-track:before, .slick-track:after { content: ""; display: table; }
-.slick-track:after { clear: both; }
-.slick-loading .slick-track { visibility: hidden; }
+    -webkit-user-select: none;
+       -moz-user-select: none;
+        -ms-user-select: none;
+            user-select: none;
 
-.slick-slide { float: left; height: 100%; min-height: 1px; display: none; }
-[dir="rtl"] .slick-slide { float: right; }
-.slick-slide img { display: block; }
-.slick-slide.slick-loading img { display: none; }
-.slick-slide.dragging img { pointer-events: none; }
-.slick-initialized .slick-slide { display: block; }
-.slick-loading .slick-slide { visibility: hidden; }
-.slick-vertical .slick-slide { display: block; height: auto; border: 1px solid 
transparent; }
+    -webkit-touch-callout: none;
+    -khtml-user-select: none;
+    -ms-touch-action: pan-y;
+        touch-action: pan-y;
+    -webkit-tap-highlight-color: transparent;
+}
 
-/* Icons */
-@font-face { font-family: "slick"; src: url("./fonts/slick.eot"); src: 
url("./fonts/slick.eot?#iefix") format("embedded-opentype"), 
url("./fonts/slick.woff") format("woff"), url("./fonts/slick.ttf") 
format("truetype"), url("./fonts/slick.svg#slick") format("svg"); font-weight: 
normal; font-style: normal; }
-/* Arrows */
-.slick-prev, .slick-next { position: absolute; display: block; height: 20px; 
width: 20px; line-height: 0; font-size: 0; cursor: pointer; background: 
transparent; color: transparent; top: 50%; margin-top: -10px; padding: 0; 
border: none; outline: none; }
-.slick-prev:hover, .slick-prev:focus, .slick-next:hover, .slick-next:focus { 
outline: none; background: transparent; color: transparent; }
-.slick-prev:hover:before, .slick-prev:focus:before, .slick-next:hover:before, 
.slick-next:focus:before { opacity: 1; }
-.slick-prev.slick-disabled:before, .slick-next.slick-disabled:before { 
opacity: 0.25; }
+.slick-list
+{
+    position: relative;
 
-.slick-prev:before, .slick-next:before { font-family: "slick"; font-size: 
20px; line-height: 1; color: white; opacity: 0.75; -webkit-font-smoothing: 
antialiased; -moz-osx-font-smoothing: grayscale; }
+    display: block;
+    overflow: hidden;
 
-.slick-prev { left: -25px; }
-[dir="rtl"] .slick-prev { left: auto; right: -25px; }
-.slick-prev:before { content: "←"; }
-[dir="rtl"] .slick-prev:before { content: "→"; }
+    margin: 0;
+    padding: 0;
+}
+.slick-list:focus
+{
+    outline: none;
+}
+.slick-list.dragging
+{
+    cursor: pointer;
+    cursor: hand;
+}
 
-.slick-next { right: -25px; }
-[dir="rtl"] .slick-next { left: -25px; right: auto; }
-.slick-next:before { content: "→"; }
-[dir="rtl"] .slick-next:before { content: "←"; }
+.slick-slider .slick-track,
+.slick-slider .slick-list
+{
+    -webkit-transform: translate3d(0, 0, 0);
+       -moz-transform: translate3d(0, 0, 0);
+        -ms-transform: translate3d(0, 0, 0);
+         -o-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+}
 
-/* Dots */
-.slick-slider { margin-bottom: 30px; }
+.slick-track
+{
+    position: relative;
+    top: 0;
+    left: 0;
 
-.slick-dots { position: absolute; bottom: -45px; list-style: none; display: 
block; text-align: center; padding: 0; width: 100%; }
-.slick-dots li { position: relative; display: inline-block; height: 20px; 
width: 20px; margin: 0 5px; padding: 0; cursor: pointer; }
-.slick-dots li button { border: 0; background: transparent; display: block; 
height: 20px; width: 20px; outline: none; line-height: 0; font-size: 0; color: 
transparent; padding: 5px; cursor: pointer; }
-.slick-dots li button:hover, .slick-dots li button:focus { outline: none; }
-.slick-dots li button:hover:before, .slick-dots li button:focus:before { 
opacity: 1; }
-.slick-dots li button:before { position: absolute; top: 0; left: 0; content: 
"•"; width: 20px; height: 20px; font-family: "slick"; font-size: 6px; 
line-height: 20px; text-align: center; color: black; opacity: 0.25; 
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
-.slick-dots li.slick-active button:before { color: black; opacity: 0.75; }
+    display: block;
+}
+.slick-track:before,
+.slick-track:after
+{
+    display: table;
 
-/*# sourceMappingURL=slick.css.map */
+    content: '';
+}
+.slick-track:after
+{
+    clear: both;
+}
+.slick-loading .slick-track
+{
+    visibility: hidden;
+}
+
+.slick-slide
+{
+    display: none;
+    float: left;
+
+    height: 100%;
+    min-height: 1px;
+}
+[dir='rtl'] .slick-slide
+{
+    float: right;
+}
+.slick-slide img
+{
+    display: block;
+}
+.slick-slide.slick-loading img
+{
+    display: none;
+}
+.slick-slide.dragging img
+{
+    pointer-events: none;
+}
+.slick-initialized .slick-slide
+{
+    display: block;
+}
+.slick-loading .slick-slide
+{
+    visibility: hidden;
+}
+.slick-vertical .slick-slide
+{
+    display: block;
+
+    height: auto;
+
+    border: 1px solid transparent;
+}
+.slick-arrow.slick-hidden {
+    display: none;
+}
\ No newline at end of file
diff --git a/resources/libs/slick/slick.js b/resources/libs/slick/slick.js
index e302777..bb79b57 100644
--- a/resources/libs/slick/slick.js
+++ b/resources/libs/slick/slick.js
@@ -6,7 +6,7 @@
 |___/_|_|\___|_|\_(_)/ |___/
                    |__/
 
- Version: 1.3.15
+ Version: 1.5.7
   Author: Ken Wheeler
  Website: http://kenwheeler.github.io
     Docs: http://kenwheeler.github.io/slick
@@ -14,9 +14,7 @@
   Issues: http://github.com/kenwheeler/slick/issues
 
  */
-
 /* global window, document, define, jQuery, setInterval, clearInterval */
-
 (function(factory) {
     'use strict';
     if (typeof define === 'function' && define.amd) {
@@ -37,8 +35,7 @@
 
         function Slick(element, settings) {
 
-            var _ = this,
-                responsiveSettings, breakpoint;
+            var _ = this, dataSettings;
 
             _.defaults = {
                 accessibility: true,
@@ -47,36 +44,35 @@
                 appendDots: $(element),
                 arrows: true,
                 asNavFor: null,
-                prevArrow: '<button type="button" data-role="none" 
class="slick-prev">Previous</button>',
-                nextArrow: '<button type="button" data-role="none" 
class="slick-next">Next</button>',
+                prevArrow: '<button type="button" data-role="none" 
class="slick-prev" aria-label="Previous" tabindex="0" 
role="button">Previous</button>',
+                nextArrow: '<button type="button" data-role="none" 
class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',
                 autoplay: false,
                 autoplaySpeed: 3000,
                 centerMode: false,
                 centerPadding: '50px',
                 cssEase: 'ease',
                 customPaging: function(slider, i) {
-                    return '<button type="button" data-role="none">' + (i + 1) 
+ '</button>';
+                    return '<button type="button" data-role="none" 
role="button" aria-required="false" tabindex="0">' + (i + 1) + '</button>';
                 },
                 dots: false,
                 dotsClass: 'slick-dots',
                 draggable: true,
                 easing: 'linear',
+                edgeFriction: 0.35,
                 fade: false,
                 focusOnSelect: false,
                 infinite: true,
                 initialSlide: 0,
                 lazyLoad: 'ondemand',
-                onBeforeChange: null,
-                onAfterChange: null,
-                onInit: null,
-                onReInit: null,
-                onSetPosition: null,
+                mobileFirst: false,
                 pauseOnHover: true,
                 pauseOnDotsHover: false,
                 respondTo: 'window',
                 responsive: null,
+                rows: 1,
                 rtl: false,
-                slide: 'div',
+                slide: '',
+                slidesPerRow: 1,
                 slidesToShow: 1,
                 slidesToScroll: 1,
                 speed: 500,
@@ -87,7 +83,9 @@
                 useCSS: true,
                 variableWidth: false,
                 vertical: false,
-                waitForAnimate: true
+                verticalSwiping: false,
+                waitForAnimate: true,
+                zIndex: 1000
             };
 
             _.initials = {
@@ -113,7 +111,8 @@
                 swipeLeft: null,
                 $list: null,
                 touchObject: {},
-                transformsEnabled: false
+                transformsEnabled: false,
+                unslicked: false
             };
 
             $.extend(_, _.initials);
@@ -124,38 +123,34 @@
             _.breakpoints = [];
             _.breakpointSettings = [];
             _.cssTransitions = false;
+            _.hidden = 'hidden';
             _.paused = false;
             _.positionProp = null;
             _.respondTo = null;
+            _.rowCount = 1;
             _.shouldClick = true;
             _.$slider = $(element);
             _.$slidesCache = null;
             _.transformType = null;
             _.transitionType = null;
+            _.visibilityChange = 'visibilitychange';
             _.windowWidth = 0;
             _.windowTimer = null;
 
-            _.options = $.extend({}, _.defaults, settings);
+            dataSettings = $(element).data('slick') || {};
+
+            _.options = $.extend({}, _.defaults, dataSettings, settings);
 
             _.currentSlide = _.options.initialSlide;
 
             _.originalSettings = _.options;
-            responsiveSettings = _.options.responsive || null;
 
-            if (responsiveSettings && responsiveSettings.length > -1) {
-                _.respondTo = _.options.respondTo || "window";
-                for (breakpoint in responsiveSettings) {
-                    if (responsiveSettings.hasOwnProperty(breakpoint)) {
-                        _.breakpoints.push(responsiveSettings[
-                            breakpoint].breakpoint);
-                        _.breakpointSettings[responsiveSettings[
-                            breakpoint].breakpoint] =
-                            responsiveSettings[breakpoint].settings;
-                    }
-                }
-                _.breakpoints.sort(function(a, b) {
-                    return b - a;
-                });
+            if (typeof document.mozHidden !== 'undefined') {
+                _.hidden = 'mozHidden';
+                _.visibilityChange = 'mozvisibilitychange';
+            } else if (typeof document.webkitHidden !== 'undefined') {
+                _.hidden = 'webkitHidden';
+                _.visibilityChange = 'webkitvisibilitychange';
             }
 
             _.autoPlay = $.proxy(_.autoPlay, _);
@@ -176,9 +171,10 @@
             // Extracted from jQuery v1.11 source
             _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
 
-            _.init();
 
-            _.checkResponsive();
+            _.registerBreakpoints();
+            _.init(true);
+            _.checkResponsive(true);
 
         }
 
@@ -186,7 +182,7 @@
 
     }());
 
-    Slick.prototype.addSlide = function(markup, index, addBefore) {
+    Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, 
index, addBefore) {
 
         var _ = this;
 
@@ -222,7 +218,7 @@
         _.$slideTrack.append(_.$slides);
 
         _.$slides.each(function(index, element) {
-            $(element).attr("index",index);
+            $(element).attr('data-slick-index', index);
         });
 
         _.$slidesCache = _.$slides;
@@ -231,14 +227,22 @@
 
     };
 
+    Slick.prototype.animateHeight = function() {
+        var _ = this;
+        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true 
&& _.options.vertical === false) {
+            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
+            _.$list.animate({
+                height: targetHeight
+            }, _.options.speed);
+        }
+    };
+
     Slick.prototype.animateSlide = function(targetLeft, callback) {
 
-        var animProps = {}, _ = this;
+        var animProps = {},
+            _ = this;
 
-        if(_.options.slidesToShow === 1 && _.options.adaptiveHeight === true 
&& _.options.vertical === false) {
-            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
-            _.$list.animate({height: targetHeight},_.options.speed);
-        }
+        _.animateHeight();
 
         if (_.options.rtl === true && _.options.vertical === false) {
             targetLeft = -targetLeft;
@@ -257,7 +261,9 @@
         } else {
 
             if (_.cssTransitions === false) {
-
+                if (_.options.rtl === true) {
+                    _.currentLeft = -(_.currentLeft);
+                }
                 $({
                     animStart: _.currentLeft
                 }).animate({
@@ -266,6 +272,7 @@
                     duration: _.options.speed,
                     easing: _.options.easing,
                     step: function(now) {
+                        now = Math.ceil(now);
                         if (_.options.vertical === false) {
                             animProps[_.animType] = 'translate(' +
                                 now + 'px, 0px)';
@@ -286,6 +293,7 @@
             } else {
 
                 _.applyTransition();
+                targetLeft = Math.ceil(targetLeft);
 
                 if (_.options.vertical === false) {
                     animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 
0px, 0px)';
@@ -310,8 +318,23 @@
     };
 
     Slick.prototype.asNavFor = function(index) {
-        var _ = this, asNavFor = _.options.asNavFor != null ? 
$(_.options.asNavFor).getSlick() : null;
-        if(asNavFor != null) asNavFor.slideHandler(index, true);
+
+        var _ = this,
+            asNavFor = _.options.asNavFor;
+
+        if ( asNavFor && asNavFor !== null ) {
+            asNavFor = $(asNavFor).not(_.$slider);
+        }
+
+        if ( asNavFor !== null && typeof asNavFor === 'object' ) {
+            asNavFor.each(function() {
+                var target = $(this).slick('getSlick');
+                if(!target.unslicked) {
+                    target.slideHandler(index, true);
+                }
+            });
+        }
+
     };
 
     Slick.prototype.applyTransition = function(slide) {
@@ -396,21 +419,40 @@
 
         var _ = this;
 
-        if (_.options.arrows === true && _.slideCount > 
_.options.slidesToShow) {
+        if (_.options.arrows === true ) {
 
-            _.$prevArrow = $(_.options.prevArrow);
-            _.$nextArrow = $(_.options.nextArrow);
+            _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
+            _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
 
-            if (_.htmlExpr.test(_.options.prevArrow)) {
-                _.$prevArrow.appendTo(_.options.appendArrows);
-            }
+            if( _.slideCount > _.options.slidesToShow ) {
 
-            if (_.htmlExpr.test(_.options.nextArrow)) {
-                _.$nextArrow.appendTo(_.options.appendArrows);
-            }
+                
_.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
+                
_.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
 
-            if (_.options.infinite !== true) {
-                _.$prevArrow.addClass('slick-disabled');
+                if (_.htmlExpr.test(_.options.prevArrow)) {
+                    _.$prevArrow.prependTo(_.options.appendArrows);
+                }
+
+                if (_.htmlExpr.test(_.options.nextArrow)) {
+                    _.$nextArrow.appendTo(_.options.appendArrows);
+                }
+
+                if (_.options.infinite !== true) {
+                    _.$prevArrow
+                        .addClass('slick-disabled')
+                        .attr('aria-disabled', 'true');
+                }
+
+            } else {
+
+                _.$prevArrow.add( _.$nextArrow )
+
+                    .addClass('slick-hidden')
+                    .attr({
+                        'aria-disabled': 'true',
+                        'tabindex': '-1'
+                    });
+
             }
 
         }
@@ -435,8 +477,7 @@
             _.$dots = $(dotString).appendTo(
                 _.options.appendDots);
 
-            _.$dots.find('li').first().addClass(
-                'slick-active');
+            
_.$dots.find('li').first().addClass('slick-active').attr('aria-hidden', 
'false');
 
         }
 
@@ -446,13 +487,17 @@
 
         var _ = this;
 
-        _.$slides = _.$slider.children(_.options.slide +
-            ':not(.slick-cloned)').addClass(
-            'slick-slide');
+        _.$slides =
+            _.$slider
+                .children( _.options.slide + ':not(.slick-cloned)')
+                .addClass('slick-slide');
+
         _.slideCount = _.$slides.length;
 
         _.$slides.each(function(index, element) {
-            $(element).attr("index",index);
+            $(element)
+                .attr('data-slick-index', index)
+                .data('originalStyling', $(element).attr('style') || '');
         });
 
         _.$slidesCache = _.$slides;
@@ -464,10 +509,10 @@
             _.$slides.wrapAll('<div class="slick-track"/>').parent();
 
         _.$list = _.$slideTrack.wrap(
-            '<div class="slick-list"/>').parent();
+            '<div aria-live="polite" class="slick-list"/>').parent();
         _.$slideTrack.css('opacity', 0);
 
-        if (_.options.centerMode === true) {
+        if (_.options.centerMode === true || _.options.swipeToSlide === true) {
             _.options.slidesToScroll = 1;
         }
 
@@ -481,11 +526,8 @@
 
         _.updateDots();
 
-        if (_.options.accessibility === true) {
-            _.$list.prop('tabIndex', 0);
-        }
 
-        _.setSlideClasses(typeof this.currentSlide === 'number' ? 
this.currentSlide : 0);
+        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide 
: 0);
 
         if (_.options.draggable === true) {
             _.$list.addClass('draggable');
@@ -493,58 +535,130 @@
 
     };
 
-    Slick.prototype.checkResponsive = function() {
+    Slick.prototype.buildRows = function() {
 
-        var _ = this,
-            breakpoint, targetBreakpoint, respondToWidth;
-        var sliderWidth = _.$slider.width();
-        var windowWidth = window.innerWidth || $(window).width();
-        if (_.respondTo === "window") {
-          respondToWidth = windowWidth;
-        } else if (_.respondTo === "slider") {
-          respondToWidth = sliderWidth;
-        } else if (_.respondTo === "min") {
-          respondToWidth = Math.min(windowWidth, sliderWidth);
+        var _ = this, a, b, c, newSlides, numOfSlides, 
originalSlides,slidesPerSection;
+
+        newSlides = document.createDocumentFragment();
+        originalSlides = _.$slider.children();
+
+        if(_.options.rows > 1) {
+
+            slidesPerSection = _.options.slidesPerRow * _.options.rows;
+            numOfSlides = Math.ceil(
+                originalSlides.length / slidesPerSection
+            );
+
+            for(a = 0; a < numOfSlides; a++){
+                var slide = document.createElement('div');
+                for(b = 0; b < _.options.rows; b++) {
+                    var row = document.createElement('div');
+                    for(c = 0; c < _.options.slidesPerRow; c++) {
+                        var target = (a * slidesPerSection + ((b * 
_.options.slidesPerRow) + c));
+                        if (originalSlides.get(target)) {
+                            row.appendChild(originalSlides.get(target));
+                        }
+                    }
+                    slide.appendChild(row);
+                }
+                newSlides.appendChild(slide);
+            }
+
+            _.$slider.html(newSlides);
+            _.$slider.children().children().children()
+                .css({
+                    'width':(100 / _.options.slidesPerRow) + '%',
+                    'display': 'inline-block'
+                });
+
         }
 
-        if (_.originalSettings.responsive && _.originalSettings
-            .responsive.length > -1 && _.originalSettings.responsive !== null) 
{
+    };
+
+    Slick.prototype.checkResponsive = function(initial, forceUpdate) {
+
+        var _ = this,
+            breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = 
false;
+        var sliderWidth = _.$slider.width();
+        var windowWidth = window.innerWidth || $(window).width();
+
+        if (_.respondTo === 'window') {
+            respondToWidth = windowWidth;
+        } else if (_.respondTo === 'slider') {
+            respondToWidth = sliderWidth;
+        } else if (_.respondTo === 'min') {
+            respondToWidth = Math.min(windowWidth, sliderWidth);
+        }
+
+        if ( _.options.responsive &&
+            _.options.responsive.length &&
+            _.options.responsive !== null) {
 
             targetBreakpoint = null;
 
             for (breakpoint in _.breakpoints) {
                 if (_.breakpoints.hasOwnProperty(breakpoint)) {
-                    if (respondToWidth < _.breakpoints[breakpoint]) {
-                        targetBreakpoint = _.breakpoints[breakpoint];
+                    if (_.originalSettings.mobileFirst === false) {
+                        if (respondToWidth < _.breakpoints[breakpoint]) {
+                            targetBreakpoint = _.breakpoints[breakpoint];
+                        }
+                    } else {
+                        if (respondToWidth > _.breakpoints[breakpoint]) {
+                            targetBreakpoint = _.breakpoints[breakpoint];
+                        }
                     }
                 }
             }
 
             if (targetBreakpoint !== null) {
                 if (_.activeBreakpoint !== null) {
-                    if (targetBreakpoint !== _.activeBreakpoint) {
+                    if (targetBreakpoint !== _.activeBreakpoint || 
forceUpdate) {
                         _.activeBreakpoint =
                             targetBreakpoint;
-                        _.options = $.extend({}, _.originalSettings,
-                            _.breakpointSettings[
-                                targetBreakpoint]);
-                        _.refresh();
+                        if (_.breakpointSettings[targetBreakpoint] === 
'unslick') {
+                            _.unslick(targetBreakpoint);
+                        } else {
+                            _.options = $.extend({}, _.originalSettings,
+                                _.breakpointSettings[
+                                    targetBreakpoint]);
+                            if (initial === true) {
+                                _.currentSlide = _.options.initialSlide;
+                            }
+                            _.refresh(initial);
+                        }
+                        triggerBreakpoint = targetBreakpoint;
                     }
                 } else {
                     _.activeBreakpoint = targetBreakpoint;
-                    _.options = $.extend({}, _.originalSettings,
-                        _.breakpointSettings[
-                            targetBreakpoint]);
-                    _.refresh();
+                    if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
+                        _.unslick(targetBreakpoint);
+                    } else {
+                        _.options = $.extend({}, _.originalSettings,
+                            _.breakpointSettings[
+                                targetBreakpoint]);
+                        if (initial === true) {
+                            _.currentSlide = _.options.initialSlide;
+                        }
+                        _.refresh(initial);
+                    }
+                    triggerBreakpoint = targetBreakpoint;
                 }
             } else {
                 if (_.activeBreakpoint !== null) {
                     _.activeBreakpoint = null;
                     _.options = _.originalSettings;
-                    _.refresh();
+                    if (initial === true) {
+                        _.currentSlide = _.options.initialSlide;
+                    }
+                    _.refresh(initial);
+                    triggerBreakpoint = targetBreakpoint;
                 }
             }
 
+            // only trigger breakpoints during an actual break. not on 
initialize.
+            if( !initial && triggerBreakpoint !== false ) {
+                _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
+            }
         }
 
     };
@@ -553,10 +667,17 @@
 
         var _ = this,
             $target = $(event.target),
-            indexOffset, slideOffset, unevenOffset,navigables, prevNavigable;
+            indexOffset, slideOffset, unevenOffset;
 
         // If target is a link, prevent default action.
-        $target.is('a') && event.preventDefault();
+        if($target.is('a')) {
+            event.preventDefault();
+        }
+
+        // If target is not the <li> element (ie: a child), find the <li>.
+        if(!$target.is('li')) {
+            $target = $target.closest('li');
+        }
 
         unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
         indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % 
_.options.slidesToScroll;
@@ -566,7 +687,7 @@
             case 'previous':
                 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : 
_.options.slidesToShow - indexOffset;
                 if (_.slideCount > _.options.slidesToShow) {
-                    _.slideHandler(_.currentSlide  - slideOffset, false, 
dontAnimate);
+                    _.slideHandler(_.currentSlide - slideOffset, false, 
dontAnimate);
                 }
                 break;
 
@@ -579,27 +700,101 @@
 
             case 'index':
                 var index = event.data.index === 0 ? 0 :
-                    event.data.index || $(event.target).parent().index() * 
_.options.slidesToScroll;
+                    event.data.index || $target.index() * 
_.options.slidesToScroll;
 
-                navigables = _.getNavigableIndexes();
-                prevNavigable = 0;
-                if(navigables[index] && navigables[index] === index) {
-                    if(index > navigables[navigables.length -1]){
-                        index = navigables[navigables.length -1];
-                    } else {
-                        for(var n in navigables) {
-                            if(index < navigables[n]) {
-                                index = prevNavigable;
-                                break;
-                            }
-                            prevNavigable = navigables[n];
-                        }
-                    }
-                }
-                _.slideHandler(index, false, dontAnimate);
+                _.slideHandler(_.checkNavigable(index), false, dontAnimate);
+                $target.children().trigger('focus');
+                break;
 
             default:
                 return;
+        }
+
+    };
+
+    Slick.prototype.checkNavigable = function(index) {
+
+        var _ = this,
+            navigables, prevNavigable;
+
+        navigables = _.getNavigableIndexes();
+        prevNavigable = 0;
+        if (index > navigables[navigables.length - 1]) {
+            index = navigables[navigables.length - 1];
+        } else {
+            for (var n in navigables) {
+                if (index < navigables[n]) {
+                    index = prevNavigable;
+                    break;
+                }
+                prevNavigable = navigables[n];
+            }
+        }
+
+        return index;
+    };
+
+    Slick.prototype.cleanUpEvents = function() {
+
+        var _ = this;
+
+        if (_.options.dots && _.$dots !== null) {
+
+            $('li', _.$dots).off('click.slick', _.changeSlide);
+
+            if (_.options.pauseOnDotsHover === true && _.options.autoplay === 
true) {
+
+                $('li', _.$dots)
+                    .off('mouseenter.slick', $.proxy(_.setPaused, _, true))
+                    .off('mouseleave.slick', $.proxy(_.setPaused, _, false));
+
+            }
+
+        }
+
+        if (_.options.arrows === true && _.slideCount > 
_.options.slidesToShow) {
+            _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
+            _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
+        }
+
+        _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
+        _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
+        _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
+        _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
+
+        _.$list.off('click.slick', _.clickHandler);
+
+        $(document).off(_.visibilityChange, _.visibility);
+
+        _.$list.off('mouseenter.slick', $.proxy(_.setPaused, _, true));
+        _.$list.off('mouseleave.slick', $.proxy(_.setPaused, _, false));
+
+        if (_.options.accessibility === true) {
+            _.$list.off('keydown.slick', _.keyHandler);
+        }
+
+        if (_.options.focusOnSelect === true) {
+            $(_.$slideTrack).children().off('click.slick', _.selectHandler);
+        }
+
+        $(window).off('orientationchange.slick.slick-' + _.instanceUid, 
_.orientationChange);
+
+        $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
+
+        $('[draggable!=true]', _.$slideTrack).off('dragstart', 
_.preventDefault);
+
+        $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
+        $(document).off('ready.slick.slick-' + _.instanceUid, _.setPosition);
+    };
+
+    Slick.prototype.cleanUpRows = function() {
+
+        var _ = this, originalSlides;
+
+        if(_.options.rows > 1) {
+            originalSlides = _.$slides.children().children();
+            originalSlides.removeAttr('style');
+            _.$slider.html(originalSlides);
         }
 
     };
@@ -608,15 +803,15 @@
 
         var _ = this;
 
-        if(_.shouldClick === false) {
+        if (_.shouldClick === false) {
             event.stopImmediatePropagation();
             event.stopPropagation();
             event.preventDefault();
         }
 
-    }
+    };
 
-    Slick.prototype.destroy = function() {
+    Slick.prototype.destroy = function(refresh) {
 
         var _ = this;
 
@@ -624,38 +819,71 @@
 
         _.touchObject = {};
 
-        $('.slick-cloned', _.$slider).remove();
+        _.cleanUpEvents();
+
+        $('.slick-cloned', _.$slider).detach();
+
         if (_.$dots) {
             _.$dots.remove();
         }
-        if (_.$prevArrow && (typeof _.options.prevArrow !== 'object')) {
-            _.$prevArrow.remove();
-        }
-        if (_.$nextArrow && (typeof _.options.nextArrow !== 'object')) {
-            _.$nextArrow.remove();
-        }
-        if (_.$slides.parent().hasClass('slick-track')) {
-            _.$slides.unwrap().unwrap();
+
+        if ( _.options.arrows === true ) {
+
+            if ( _.$prevArrow && _.$prevArrow.length ) {
+
+                _.$prevArrow
+                    .removeClass('slick-disabled slick-arrow slick-hidden')
+                    .removeAttr('aria-hidden aria-disabled tabindex')
+                    .css("display","");
+
+                if ( _.htmlExpr.test( _.options.prevArrow )) {
+                    _.$prevArrow.remove();
+                }
+            }
+
+            if ( _.$nextArrow && _.$nextArrow.length ) {
+
+                _.$nextArrow
+                    .removeClass('slick-disabled slick-arrow slick-hidden')
+                    .removeAttr('aria-hidden aria-disabled tabindex')
+                    .css("display","");
+
+                if ( _.htmlExpr.test( _.options.nextArrow )) {
+                    _.$nextArrow.remove();
+                }
+            }
+
         }
 
-        _.$slides.removeClass(
-            'slick-slide slick-active slick-center slick-visible')
-            .removeAttr('index')
-            .css({
-                position: '',
-                left: '',
-                top: '',
-                zIndex: '',
-                opacity: '',
-                width: ''
-            });
+        if (_.$slides) {
+
+            _.$slides
+                .removeClass('slick-slide slick-active slick-center 
slick-visible slick-current')
+                .removeAttr('aria-hidden')
+                .removeAttr('data-slick-index')
+                .each(function(){
+                    $(this).attr('style', $(this).data('originalStyling'));
+                });
+
+            _.$slideTrack.children(this.options.slide).detach();
+
+            _.$slideTrack.detach();
+
+            _.$list.detach();
+
+            _.$slider.append(_.$slides);
+        }
+
+        _.cleanUpRows();
 
         _.$slider.removeClass('slick-slider');
         _.$slider.removeClass('slick-initialized');
 
-        _.$list.off('.slick');
-        $(window).off('.slick-' + _.instanceUid);
-        $(document).off('.slick-' + _.instanceUid);
+        _.unslicked = true;
+
+        if(!refresh) {
+            _.$slider.trigger('destroy', [_]);
+        }
 
     };
 
@@ -664,7 +892,7 @@
         var _ = this,
             transition = {};
 
-        transition[_.transitionType] = "";
+        transition[_.transitionType] = '';
 
         if (_.options.fade === false) {
             _.$slideTrack.css(transition);
@@ -674,43 +902,33 @@
 
     };
 
-    Slick.prototype.fadeSlide = function(oldSlide, slideIndex, callback) {
+    Slick.prototype.fadeSlide = function(slideIndex, callback) {
 
         var _ = this;
 
         if (_.cssTransitions === false) {
 
             _.$slides.eq(slideIndex).css({
-                zIndex: 1000
+                zIndex: _.options.zIndex
             });
 
             _.$slides.eq(slideIndex).animate({
                 opacity: 1
             }, _.options.speed, _.options.easing, callback);
 
-            _.$slides.eq(oldSlide).animate({
-                opacity: 0
-            }, _.options.speed, _.options.easing);
-
         } else {
 
             _.applyTransition(slideIndex);
-            _.applyTransition(oldSlide);
 
             _.$slides.eq(slideIndex).css({
                 opacity: 1,
-                zIndex: 1000
-            });
-
-            _.$slides.eq(oldSlide).css({
-                opacity: 0
+                zIndex: _.options.zIndex
             });
 
             if (callback) {
                 setTimeout(function() {
 
                     _.disableTransition(slideIndex);
-                    _.disableTransition(oldSlide);
 
                     callback.call();
                 }, _.options.speed);
@@ -720,7 +938,31 @@
 
     };
 
-    Slick.prototype.filterSlides = function(filter) {
+    Slick.prototype.fadeSlideOut = function(slideIndex) {
+
+        var _ = this;
+
+        if (_.cssTransitions === false) {
+
+            _.$slides.eq(slideIndex).animate({
+                opacity: 0,
+                zIndex: _.options.zIndex - 2
+            }, _.options.speed, _.options.easing);
+
+        } else {
+
+            _.applyTransition(slideIndex);
+
+            _.$slides.eq(slideIndex).css({
+                opacity: 0,
+                zIndex: _.options.zIndex - 2
+            });
+
+        }
+
+    };
+
+    Slick.prototype.filterSlides = Slick.prototype.slickFilter = 
function(filter) {
 
         var _ = this;
 
@@ -738,10 +980,9 @@
 
     };
 
-    Slick.prototype.getCurrent = function() {
+    Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = 
function() {
 
         var _ = this;
-
         return _.currentSlide;
 
     };
@@ -754,13 +995,19 @@
         var counter = 0;
         var pagerQty = 0;
 
-        if(_.options.infinite === true) {
-            pagerQty = Math.ceil(_.slideCount / _.options.slidesToScroll);
-        } else {
-            while (breakPoint < _.slideCount){
+        if (_.options.infinite === true) {
+            while (breakPoint < _.slideCount) {
                 ++pagerQty;
                 breakPoint = counter + _.options.slidesToShow;
-                counter += _.options.slidesToScroll <= _.options.slidesToShow 
? _.options.slidesToScroll  : _.options.slidesToShow;
+                counter += _.options.slidesToScroll <= _.options.slidesToShow 
? _.options.slidesToScroll : _.options.slidesToShow;
+            }
+        } else if (_.options.centerMode === true) {
+            pagerQty = _.slideCount;
+        } else {
+            while (breakPoint < _.slideCount) {
+                ++pagerQty;
+                breakPoint = counter + _.options.slidesToShow;
+                counter += _.options.slidesToScroll <= _.options.slidesToShow 
? _.options.slidesToScroll : _.options.slidesToShow;
             }
         }
 
@@ -774,11 +1021,10 @@
             targetLeft,
             verticalHeight,
             verticalOffset = 0,
-            slideWidth,
             targetSlide;
 
         _.slideOffset = 0;
-        verticalHeight = _.$slides.first().outerHeight();
+        verticalHeight = _.$slides.first().outerHeight(true);
 
         if (_.options.infinite === true) {
             if (_.slideCount > _.options.slidesToShow) {
@@ -787,7 +1033,7 @@
             }
             if (_.slideCount % _.options.slidesToScroll !== 0) {
                 if (slideIndex + _.options.slidesToScroll > _.slideCount && 
_.slideCount > _.options.slidesToShow) {
-                    if(slideIndex > _.slideCount) {
+                    if (slideIndex > _.slideCount) {
                         _.slideOffset = ((_.options.slidesToShow - (slideIndex 
- _.slideCount)) * _.slideWidth) * -1;
                         verticalOffset = ((_.options.slidesToShow - 
(slideIndex - _.slideCount)) * verticalHeight) * -1;
                     } else {
@@ -797,13 +1043,13 @@
                 }
             }
         } else {
-            if(slideIndex + _.options.slidesToShow > _.slideCount) {
+            if (slideIndex + _.options.slidesToShow > _.slideCount) {
                 _.slideOffset = ((slideIndex + _.options.slidesToShow) - 
_.slideCount) * _.slideWidth;
                 verticalOffset = ((slideIndex + _.options.slidesToShow) - 
_.slideCount) * verticalHeight;
             }
         }
 
-        if (_.slideCount <= _.options.slidesToShow){
+        if (_.slideCount <= _.options.slidesToShow) {
             _.slideOffset = 0;
             verticalOffset = 0;
         }
@@ -823,14 +1069,16 @@
 
         if (_.options.variableWidth === true) {
 
-            if(_.slideCount <= _.options.slidesToShow || _.options.infinite 
=== false) {
+            if (_.slideCount <= _.options.slidesToShow || _.options.infinite 
=== false) {
                 targetSlide = 
_.$slideTrack.children('.slick-slide').eq(slideIndex);
             } else {
                 targetSlide = 
_.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
             }
+
             targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
+
             if (_.options.centerMode === true) {
-                if(_.options.infinite === false) {
+                if (_.options.infinite === false) {
                     targetSlide = 
_.$slideTrack.children('.slick-slide').eq(slideIndex);
                 } else {
                     targetSlide = 
_.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 
1);
@@ -840,57 +1088,97 @@
             }
         }
 
-         // 1680
-
         return targetLeft;
+
+    };
+
+    Slick.prototype.getOption = Slick.prototype.slickGetOption = 
function(option) {
+
+        var _ = this;
+
+        return _.options[option];
 
     };
 
     Slick.prototype.getNavigableIndexes = function() {
 
-        var _ = this;
+        var _ = this,
+            breakPoint = 0,
+            counter = 0,
+            indexes = [],
+            max;
 
-        var breakPoint = 0;
-        var counter = 0;
-        var indexes = [];
+        if (_.options.infinite === false) {
+            max = _.slideCount;
+        } else {
+            breakPoint = _.options.slidesToScroll * -1;
+            counter = _.options.slidesToScroll * -1;
+            max = _.slideCount * 2;
+        }
 
-        while (breakPoint < _.slideCount){
+        while (breakPoint < max) {
             indexes.push(breakPoint);
             breakPoint = counter + _.options.slidesToScroll;
-            counter += _.options.slidesToScroll <= _.options.slidesToShow ? 
_.options.slidesToScroll  : _.options.slidesToShow;
+            counter += _.options.slidesToScroll <= _.options.slidesToShow ? 
_.options.slidesToScroll : _.options.slidesToShow;
         }
 
         return indexes;
 
     };
 
+    Slick.prototype.getSlick = function() {
+
+        return this;
+
+    };
+
     Slick.prototype.getSlideCount = function() {
 
-        var _ = this, slidesTraversed;
+        var _ = this,
+            slidesTraversed, swipedSlide, centerOffset;
 
-        if(_.options.swipeToSlide === true) {
-            var swipedSlide = null;
-            _.$slideTrack.find('.slick-slide').each(function(index, slide){
-                if (slide.offsetLeft + ($(slide).outerWidth() / 2) > 
(_.swipeLeft * -1)) {
+        centerOffset = _.options.centerMode === true ? _.slideWidth * 
Math.floor(_.options.slidesToShow / 2) : 0;
+
+        if (_.options.swipeToSlide === true) {
+            _.$slideTrack.find('.slick-slide').each(function(index, slide) {
+                if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 
2) > (_.swipeLeft * -1)) {
                     swipedSlide = slide;
                     return false;
                 }
             });
-            slidesTraversed = Math.abs($(swipedSlide).attr('index') - 
_.currentSlide);
+
+            slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') 
- _.currentSlide) || 1;
+
             return slidesTraversed;
+
         } else {
             return _.options.slidesToScroll;
         }
 
     };
 
-    Slick.prototype.init = function() {
+    Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, 
dontAnimate) {
+
+        var _ = this;
+
+        _.changeSlide({
+            data: {
+                message: 'index',
+                index: parseInt(slide)
+            }
+        }, dontAnimate);
+
+    };
+
+    Slick.prototype.init = function(creation) {
 
         var _ = this;
 
         if (!$(_.$slider).hasClass('slick-initialized')) {
 
             $(_.$slider).addClass('slick-initialized');
+
+            _.buildRows();
             _.buildOut();
             _.setProps();
             _.startLoad();
@@ -898,10 +1186,15 @@
             _.initializeEvents();
             _.updateArrows();
             _.updateDots();
+
         }
 
-        if (_.options.onInit !== null) {
-            _.options.onInit.call(this, _);
+        if (creation) {
+            _.$slider.trigger('init', [_]);
+        }
+
+        if (_.options.accessibility === true) {
+            _.initADA();
         }
 
     };
@@ -933,14 +1226,8 @@
 
         if (_.options.dots === true && _.options.pauseOnDotsHover === true && 
_.options.autoplay === true) {
             $('li', _.$dots)
-                .on('mouseenter.slick', function(){
-                    _.paused = true;
-                    _.autoPlayClear();
-                })
-                .on('mouseleave.slick', function(){
-                    _.paused = false;
-                    _.autoPlay();
-                });
+                .on('mouseenter.slick', $.proxy(_.setPaused, _, true))
+                .on('mouseleave.slick', $.proxy(_.setPaused, _, false));
         }
 
     };
@@ -968,42 +1255,24 @@
 
         _.$list.on('click.slick', _.clickHandler);
 
-        if (_.options.pauseOnHover === true && _.options.autoplay === true) {
-            _.$list.on('mouseenter.slick', function(){
-                _.paused = true;
-                _.autoPlayClear();
-            });
-            _.$list.on('mouseleave.slick', function(){
-                _.paused = false;
-                _.autoPlay();
-            });
-        }
+        $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
 
-        if(_.options.accessibility === true) {
+        _.$list.on('mouseenter.slick', $.proxy(_.setPaused, _, true));
+        _.$list.on('mouseleave.slick', $.proxy(_.setPaused, _, false));
+
+        if (_.options.accessibility === true) {
             _.$list.on('keydown.slick', _.keyHandler);
         }
 
-        if(_.options.focusOnSelect === true) {
-            $(_.options.slide, _.$slideTrack).on('click.slick', 
_.selectHandler);
+        if (_.options.focusOnSelect === true) {
+            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
         }
 
-        $(window).on('orientationchange.slick.slick-' + _.instanceUid, 
function() {
-            _.checkResponsive();
-            _.setPosition();
-        });
+        $(window).on('orientationchange.slick.slick-' + _.instanceUid, 
$.proxy(_.orientationChange, _));
 
-        $(window).on('resize.slick.slick-' + _.instanceUid, function() {
-            if ($(window).width() !== _.windowWidth) {
-                clearTimeout(_.windowDelay);
-                _.windowDelay = window.setTimeout(function() {
-                    _.windowWidth = $(window).width();
-                    _.checkResponsive();
-                    _.setPosition();
-                }, 50);
-            }
-        });
+        $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, 
_));
 
-        $('*[draggable!=true]', _.$slideTrack).on('dragstart', function(e){ 
e.preventDefault(); })
+        $('[draggable!=true]', _.$slideTrack).on('dragstart', 
_.preventDefault);
 
         $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
         $(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition);
@@ -1038,19 +1307,21 @@
     Slick.prototype.keyHandler = function(event) {
 
         var _ = this;
-
-        if (event.keyCode === 37 && _.options.accessibility === true) {
-            _.changeSlide({
-                data: {
-                    message: 'previous'
-                }
-            });
-        } else if (event.keyCode === 39 && _.options.accessibility === true) {
-            _.changeSlide({
-                data: {
-                    message: 'next'
-                }
-            });
+         //Dont slide if the cursor is inside the form fields and arrow keys 
are pressed
+        if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
+            if (event.keyCode === 37 && _.options.accessibility === true) {
+                _.changeSlide({
+                    data: {
+                        message: 'previous'
+                    }
+                });
+            } else if (event.keyCode === 39 && _.options.accessibility === 
true) {
+                _.changeSlide({
+                    data: {
+                        message: 'next'
+                    }
+                });
+            }
         }
 
     };
@@ -1062,45 +1333,56 @@
 
         function loadImages(imagesScope) {
             $('img[data-lazy]', imagesScope).each(function() {
-                var image = $(this),
-                    imageSource = $(this).attr('data-lazy');
 
-                image
-                  .load(function() { image.animate({ opacity: 1 }, 200); })
-                  .css({ opacity: 0 })
-                  .attr('src', imageSource)
-                  .removeAttr('data-lazy')
-                  .removeClass('slick-loading');
+                var image = $(this),
+                    imageSource = $(this).attr('data-lazy'),
+                    imageToLoad = document.createElement('img');
+
+                imageToLoad.onload = function() {
+                    image
+                        .animate({ opacity: 0 }, 100, function() {
+                            image
+                                .attr('src', imageSource)
+                                .animate({ opacity: 1 }, 200, function() {
+                                    image
+                                        .removeAttr('data-lazy')
+                                        .removeClass('slick-loading');
+                                });
+                        });
+                };
+
+                imageToLoad.src = imageSource;
+
             });
         }
 
         if (_.options.centerMode === true) {
             if (_.options.infinite === true) {
-                rangeStart = _.currentSlide + (_.options.slidesToShow/2 + 1);
+                rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
                 rangeEnd = rangeStart + _.options.slidesToShow + 2;
             } else {
-                rangeStart = Math.max(0, _.currentSlide - 
(_.options.slidesToShow/2 + 1));
-                rangeEnd = 2 + (_.options.slidesToShow/2 + 1) + _.currentSlide;
+                rangeStart = Math.max(0, _.currentSlide - 
(_.options.slidesToShow / 2 + 1));
+                rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + 
_.currentSlide;
             }
         } else {
             rangeStart = _.options.infinite ? _.options.slidesToShow + 
_.currentSlide : _.currentSlide;
             rangeEnd = rangeStart + _.options.slidesToShow;
-            if (_.options.fade === true ) {
-                if(rangeStart > 0) rangeStart--;
-                if(rangeEnd <= _.slideCount) rangeEnd++;
+            if (_.options.fade === true) {
+                if (rangeStart > 0) rangeStart--;
+                if (rangeEnd <= _.slideCount) rangeEnd++;
             }
         }
 
         loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
         loadImages(loadRange);
 
-          if (_.slideCount <= _.options.slidesToShow){
-              cloneRange = _.$slider.find('.slick-slide')
-              loadImages(cloneRange)
-          }else
+        if (_.slideCount <= _.options.slidesToShow) {
+            cloneRange = _.$slider.find('.slick-slide');
+            loadImages(cloneRange);
+        } else
         if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
             cloneRange = _.$slider.find('.slick-cloned').slice(0, 
_.options.slidesToShow);
-            loadImages(cloneRange)
+            loadImages(cloneRange);
         } else if (_.currentSlide === 0) {
             cloneRange = 
_.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
             loadImages(cloneRange);
@@ -1128,13 +1410,50 @@
 
     };
 
+    Slick.prototype.next = Slick.prototype.slickNext = function() {
+
+        var _ = this;
+
+        _.changeSlide({
+            data: {
+                message: 'next'
+            }
+        });
+
+    };
+
+    Slick.prototype.orientationChange = function() {
+
+        var _ = this;
+
+        _.checkResponsive();
+        _.setPosition();
+
+    };
+
+    Slick.prototype.pause = Slick.prototype.slickPause = function() {
+
+        var _ = this;
+
+        _.autoPlayClear();
+        _.paused = true;
+
+    };
+
+    Slick.prototype.play = Slick.prototype.slickPlay = function() {
+
+        var _ = this;
+
+        _.paused = false;
+        _.autoPlay();
+
+    };
+
     Slick.prototype.postSlide = function(index) {
 
         var _ = this;
 
-        if (_.options.onAfterChange !== null) {
-            _.options.onAfterChange.call(this, _, index);
-        }
+        _.$slider.trigger('afterChange', [_, index]);
 
         _.animating = false;
 
@@ -1145,7 +1464,26 @@
         if (_.options.autoplay === true && _.paused === false) {
             _.autoPlay();
         }
+        if (_.options.accessibility === true) {
+            _.initADA();
+        }
 
+    };
+
+    Slick.prototype.prev = Slick.prototype.slickPrev = function() {
+
+        var _ = this;
+
+        _.changeSlide({
+            data: {
+                message: 'previous'
+            }
+        });
+
+    };
+
+    Slick.prototype.preventDefault = function(e) {
+        e.preventDefault();
     };
 
     Slick.prototype.progressiveLazyLoad = function() {
@@ -1158,34 +1496,82 @@
         if (imgCount > 0) {
             targetImage = $('img[data-lazy]', _.$slider).first();
             targetImage.attr('src', 
targetImage.attr('data-lazy')).removeClass('slick-loading').load(function() {
-                targetImage.removeAttr('data-lazy');
-                _.progressiveLazyLoad();
-            })
-         .error(function () {
-          targetImage.removeAttr('data-lazy');
-          _.progressiveLazyLoad();
-         });
+                    targetImage.removeAttr('data-lazy');
+                    _.progressiveLazyLoad();
+
+                    if (_.options.adaptiveHeight === true) {
+                        _.setPosition();
+                    }
+                })
+                .error(function() {
+                    targetImage.removeAttr('data-lazy');
+                    _.progressiveLazyLoad();
+                });
         }
 
     };
 
-    Slick.prototype.refresh = function() {
+    Slick.prototype.refresh = function( initializing ) {
 
         var _ = this,
             currentSlide = _.currentSlide;
 
-        _.destroy();
+        _.destroy(true);
 
-        $.extend(_, _.initials);
+        $.extend(_, _.initials, { currentSlide: currentSlide });
 
         _.init();
 
-        _.changeSlide({
-            data: {
-                message: 'index',
-                index: currentSlide,
+        if( !initializing ) {
+
+            _.changeSlide({
+                data: {
+                    message: 'index',
+                    index: currentSlide
+                }
+            }, false);
+
+        }
+
+    };
+
+    Slick.prototype.registerBreakpoints = function() {
+
+        var _ = this, breakpoint, currentBreakpoint, l,
+            responsiveSettings = _.options.responsive || null;
+
+        if ( $.type(responsiveSettings) === "array" && 
responsiveSettings.length ) {
+
+            _.respondTo = _.options.respondTo || 'window';
+
+            for ( breakpoint in responsiveSettings ) {
+
+                l = _.breakpoints.length-1;
+                currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
+
+                if (responsiveSettings.hasOwnProperty(breakpoint)) {
+
+                    // loop through the breakpoints and cut out any existing
+                    // ones with the same breakpoint number, we don't want 
dupes.
+                    while( l >= 0 ) {
+                        if( _.breakpoints[l] && _.breakpoints[l] === 
currentBreakpoint ) {
+                            _.breakpoints.splice(l,1);
+                        }
+                        l--;
+                    }
+
+                    _.breakpoints.push(currentBreakpoint);
+                    _.breakpointSettings[currentBreakpoint] = 
responsiveSettings[breakpoint].settings;
+
+                }
+
             }
-        }, true);
+
+            _.breakpoints.sort(function(a, b) {
+                return ( _.options.mobileFirst ) ? a-b : b-a;
+            });
+
+        }
 
     };
 
@@ -1193,8 +1579,10 @@
 
         var _ = this;
 
-        _.$slides = _.$slideTrack.children(_.options.slide).addClass(
-            'slick-slide');
+        _.$slides =
+            _.$slideTrack
+                .children(_.options.slide)
+                .addClass('slick-slide');
 
         _.slideCount = _.$slides.length;
 
@@ -1206,37 +1594,50 @@
             _.currentSlide = 0;
         }
 
+        _.registerBreakpoints();
+
         _.setProps();
-
         _.setupInfinite();
-
         _.buildArrows();
-
         _.updateArrows();
-
         _.initArrowEvents();
-
         _.buildDots();
-
         _.updateDots();
-
         _.initDotEvents();
 
-        if(_.options.focusOnSelect === true) {
-            $(_.options.slide, _.$slideTrack).on('click.slick', 
_.selectHandler);
+        _.checkResponsive(false, true);
+
+        if (_.options.focusOnSelect === true) {
+            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
         }
 
         _.setSlideClasses(0);
 
         _.setPosition();
 
-        if (_.options.onReInit !== null) {
-            _.options.onReInit.call(this, _);
+        _.$slider.trigger('reInit', [_]);
+
+        if (_.options.autoplay === true) {
+            _.focusHandler();
         }
 
     };
 
-    Slick.prototype.removeSlide = function(index, removeBefore, removeAll) {
+    Slick.prototype.resize = function() {
+
+        var _ = this;
+
+        if ($(window).width() !== _.windowWidth) {
+            clearTimeout(_.windowDelay);
+            _.windowDelay = window.setTimeout(function() {
+                _.windowWidth = $(window).width();
+                _.checkResponsive();
+                if( !_.unslicked ) { _.setPosition(); }
+            }, 50);
+        }
+    };
+
+    Slick.prototype.removeSlide = Slick.prototype.slickRemove = 
function(index, removeBefore, removeAll) {
 
         var _ = this;
 
@@ -1253,7 +1654,7 @@
 
         _.unload();
 
-        if(removeAll === true) {
+        if (removeAll === true) {
             _.$slideTrack.children().remove();
         } else {
             _.$slideTrack.children(this.options.slide).eq(index).remove();
@@ -1274,13 +1675,14 @@
     Slick.prototype.setCSS = function(position) {
 
         var _ = this,
-            positionProps = {}, x, y;
+            positionProps = {},
+            x, y;
 
         if (_.options.rtl === true) {
             position = -position;
         }
-        x = _.positionProp == 'left' ? position + 'px' : '0px';
-        y = _.positionProp == 'top' ? position + 'px' : '0px';
+        x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
+        y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
 
         positionProps[_.positionProp] = position;
 
@@ -1322,17 +1724,12 @@
         _.listHeight = _.$list.height();
 
 
-        if(_.options.vertical === false && _.options.variableWidth === false) {
+        if (_.options.vertical === false && _.options.variableWidth === false) 
{
             _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
             _.$slideTrack.width(Math.ceil((_.slideWidth * 
_.$slideTrack.children('.slick-slide').length)));
 
         } else if (_.options.variableWidth === true) {
-            var trackWidth = 0;
-            _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
-            _.$slideTrack.children('.slick-slide').each(function(){
-                trackWidth += Math.ceil($(this).outerWidth(true));
-            });
-            _.$slideTrack.width(Math.ceil(trackWidth) + 1);
+            _.$slideTrack.width(5000 * _.slideCount);
         } else {
             _.slideWidth = Math.ceil(_.listWidth);
             
_.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * 
_.$slideTrack.children('.slick-slide').length)));
@@ -1355,7 +1752,7 @@
                     position: 'relative',
                     right: targetLeft,
                     top: 0,
-                    zIndex: 800,
+                    zIndex: _.options.zIndex - 2,
                     opacity: 0
                 });
             } else {
@@ -1363,14 +1760,14 @@
                     position: 'relative',
                     left: targetLeft,
                     top: 0,
-                    zIndex: 800,
+                    zIndex: _.options.zIndex - 2,
                     opacity: 0
                 });
             }
         });
 
         _.$slides.eq(_.currentSlide).css({
-            zIndex: 900,
+            zIndex: _.options.zIndex - 1,
             opacity: 1
         });
 
@@ -1380,9 +1777,40 @@
 
         var _ = this;
 
-        if(_.options.slidesToShow === 1 && _.options.adaptiveHeight === true 
&& _.options.vertical === false) {
+        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true 
&& _.options.vertical === false) {
             var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
             _.$list.css('height', targetHeight);
+        }
+
+    };
+
+    Slick.prototype.setOption = Slick.prototype.slickSetOption = 
function(option, value, refresh) {
+
+        var _ = this, l, item;
+
+        if( option === "responsive" && $.type(value) === "array" ) {
+            for ( item in value ) {
+                if( $.type( _.options.responsive ) !== "array" ) {
+                    _.options.responsive = [ value[item] ];
+                } else {
+                    l = _.options.responsive.length-1;
+                    // loop through the responsive object and splice out 
duplicates.
+                    while( l >= 0 ) {
+                        if( _.options.responsive[l].breakpoint === 
value[item].breakpoint ) {
+                            _.options.responsive.splice(l,1);
+                        }
+                        l--;
+                    }
+                    _.options.responsive.push( value[item] );
+                }
+            }
+        } else {
+            _.options[option] = value;
+        }
+
+        if (refresh === true) {
+            _.unload();
+            _.reinit();
         }
 
     };
@@ -1401,9 +1829,7 @@
             _.setFade();
         }
 
-        if (_.options.onSetPosition !== null) {
-            _.options.onSetPosition.call(this, _);
-        }
+        _.$slider.trigger('setPosition', [_]);
 
     };
 
@@ -1423,38 +1849,48 @@
         if (bodyStyle.WebkitTransition !== undefined ||
             bodyStyle.MozTransition !== undefined ||
             bodyStyle.msTransition !== undefined) {
-            if(_.options.useCSS === true) {
+            if (_.options.useCSS === true) {
                 _.cssTransitions = true;
+            }
+        }
+
+        if ( _.options.fade ) {
+            if ( typeof _.options.zIndex === 'number' ) {
+                if( _.options.zIndex < 3 ) {
+                    _.options.zIndex = 3;
+                }
+            } else {
+                _.options.zIndex = _.defaults.zIndex;
             }
         }
 
         if (bodyStyle.OTransform !== undefined) {
             _.animType = 'OTransform';
-            _.transformType = "-o-transform";
+            _.transformType = '-o-transform';
             _.transitionType = 'OTransition';
             if (bodyStyle.perspectiveProperty === undefined && 
bodyStyle.webkitPerspective === undefined) _.animType = false;
         }
         if (bodyStyle.MozTransform !== undefined) {
             _.animType = 'MozTransform';
-            _.transformType = "-moz-transform";
+            _.transformType = '-moz-transform';
             _.transitionType = 'MozTransition';
             if (bodyStyle.perspectiveProperty === undefined && 
bodyStyle.MozPerspective === undefined) _.animType = false;
         }
         if (bodyStyle.webkitTransform !== undefined) {
             _.animType = 'webkitTransform';
-            _.transformType = "-webkit-transform";
+            _.transformType = '-webkit-transform';
             _.transitionType = 'webkitTransition';
             if (bodyStyle.perspectiveProperty === undefined && 
bodyStyle.webkitPerspective === undefined) _.animType = false;
         }
         if (bodyStyle.msTransform !== undefined) {
             _.animType = 'msTransform';
-            _.transformType = "-ms-transform";
+            _.transformType = '-ms-transform';
             _.transitionType = 'msTransition';
             if (bodyStyle.msTransform === undefined) _.animType = false;
         }
         if (bodyStyle.transform !== undefined && _.animType !== false) {
             _.animType = 'transform';
-            _.transformType = "transform";
+            _.transformType = 'transform';
             _.transitionType = 'transition';
         }
         _.transformsEnabled = (_.animType !== null && _.animType !== false);
@@ -1467,46 +1903,94 @@
         var _ = this,
             centerOffset, allSlides, indexOffset, remainder;
 
-        
_.$slider.find('.slick-slide').removeClass('slick-active').removeClass('slick-center');
-        allSlides = _.$slider.find('.slick-slide');
+        allSlides = _.$slider
+            .find('.slick-slide')
+            .removeClass('slick-active slick-center slick-current')
+            .attr('aria-hidden', 'true');
+
+        _.$slides
+            .eq(index)
+            .addClass('slick-current');
 
         if (_.options.centerMode === true) {
 
             centerOffset = Math.floor(_.options.slidesToShow / 2);
 
-            if(_.options.infinite === true) {
+            if (_.options.infinite === true) {
 
                 if (index >= centerOffset && index <= (_.slideCount - 1) - 
centerOffset) {
-                    _.$slides.slice(index - centerOffset, index + centerOffset 
+ 1).addClass('slick-active');
+
+                    _.$slides
+                        .slice(index - centerOffset, index + centerOffset + 1)
+                        .addClass('slick-active')
+                        .attr('aria-hidden', 'false');
+
                 } else {
+
                     indexOffset = _.options.slidesToShow + index;
-                    allSlides.slice(indexOffset - centerOffset + 1, 
indexOffset + centerOffset + 2).addClass('slick-active');
+                    allSlides
+                        .slice(indexOffset - centerOffset + 1, indexOffset + 
centerOffset + 2)
+                        .addClass('slick-active')
+                        .attr('aria-hidden', 'false');
+
                 }
 
                 if (index === 0) {
-                    allSlides.eq(allSlides.length - 1 - 
_.options.slidesToShow).addClass('slick-center');
+
+                    allSlides
+                        .eq(allSlides.length - 1 - _.options.slidesToShow)
+                        .addClass('slick-center');
+
                 } else if (index === _.slideCount - 1) {
-                    
allSlides.eq(_.options.slidesToShow).addClass('slick-center');
+
+                    allSlides
+                        .eq(_.options.slidesToShow)
+                        .addClass('slick-center');
+
                 }
 
             }
 
-            _.$slides.eq(index).addClass('slick-center');
+            _.$slides
+                .eq(index)
+                .addClass('slick-center');
 
         } else {
 
             if (index >= 0 && index <= (_.slideCount - 
_.options.slidesToShow)) {
-                _.$slides.slice(index, index + 
_.options.slidesToShow).addClass('slick-active');
-            } else if ( allSlides.length <= _.options.slidesToShow ) {
-                allSlides.addClass('slick-active');
+
+                _.$slides
+                    .slice(index, index + _.options.slidesToShow)
+                    .addClass('slick-active')
+                    .attr('aria-hidden', 'false');
+
+            } else if (allSlides.length <= _.options.slidesToShow) {
+
+                allSlides
+                    .addClass('slick-active')
+                    .attr('aria-hidden', 'false');
+
             } else {
-                remainder = _.slideCount%_.options.slidesToShow;
+
+                remainder = _.slideCount % _.options.slidesToShow;
                 indexOffset = _.options.infinite === true ? 
_.options.slidesToShow + index : index;
-                if(_.options.slidesToShow == _.options.slidesToScroll && 
(_.slideCount - index) < _.options.slidesToShow) {
-                    
allSlides.slice(indexOffset-(_.options.slidesToShow-remainder), indexOffset + 
remainder).addClass('slick-active');
+
+                if (_.options.slidesToShow == _.options.slidesToScroll && 
(_.slideCount - index) < _.options.slidesToShow) {
+
+                    allSlides
+                        .slice(indexOffset - (_.options.slidesToShow - 
remainder), indexOffset + remainder)
+                        .addClass('slick-active')
+                        .attr('aria-hidden', 'false');
+
                 } else {
-                    allSlides.slice(indexOffset, indexOffset + 
_.options.slidesToShow).addClass('slick-active');
+
+                    allSlides
+                        .slice(indexOffset, indexOffset + 
_.options.slidesToShow)
+                        .addClass('slick-active')
+                        .attr('aria-hidden', 'false');
+
                 }
+
             }
 
         }
@@ -1539,16 +2023,16 @@
                 }
 
                 for (i = _.slideCount; i > (_.slideCount -
-                    infiniteCount); i -= 1) {
+                        infiniteCount); i -= 1) {
                     slideIndex = i - 1;
                     $(_.$slides[slideIndex]).clone(true).attr('id', '')
-                        .attr('index', slideIndex-_.slideCount)
+                        .attr('data-slick-index', slideIndex - _.slideCount)
                         .prependTo(_.$slideTrack).addClass('slick-cloned');
                 }
                 for (i = 0; i < infiniteCount; i += 1) {
                     slideIndex = i;
                     $(_.$slides[slideIndex]).clone(true).attr('id', '')
-                        .attr('index', slideIndex+_.slideCount)
+                        .attr('data-slick-index', slideIndex + _.slideCount)
                         .appendTo(_.$slideTrack).addClass('slick-cloned');
                 }
                 
_.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
@@ -1561,29 +2045,48 @@
 
     };
 
+    Slick.prototype.setPaused = function(paused) {
+
+        var _ = this;
+
+        if (_.options.autoplay === true && _.options.pauseOnHover === true) {
+            _.paused = paused;
+            if (!paused) {
+                _.autoPlay();
+            } else {
+                _.autoPlayClear();
+            }
+        }
+    };
+
     Slick.prototype.selectHandler = function(event) {
 
         var _ = this;
-        var index = 
parseInt($(event.target).parents('.slick-slide').attr("index"));
-        if(!index) index = 0;
 
-        if(_.slideCount <= _.options.slidesToShow){
-            _.$slider.find('.slick-slide').removeClass('slick-active');
-            _.$slides.eq(index).addClass('slick-active');
-            if(_.options.centerMode === true) {
-                _.$slider.find('.slick-slide').removeClass('slick-center');
-                _.$slides.eq(index).addClass('slick-center');
-            }
+        var targetElement =
+            $(event.target).is('.slick-slide') ?
+                $(event.target) :
+                $(event.target).parents('.slick-slide');
+
+        var index = parseInt(targetElement.attr('data-slick-index'));
+
+        if (!index) index = 0;
+
+        if (_.slideCount <= _.options.slidesToShow) {
+
+            _.setSlideClasses(index);
             _.asNavFor(index);
             return;
+
         }
+
         _.slideHandler(index);
 
     };
 
-    Slick.prototype.slideHandler = function(index,sync,dontAnimate) {
+    Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
 
-        var targetSlide, animSlide, oldSlide, slideLeft, unevenOffset, 
targetLeft = null,
+        var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
             _ = this;
 
         sync = sync || false;
@@ -1611,9 +2114,9 @@
         _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
 
         if (_.options.infinite === false && _.options.centerMode === false && 
(index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
-            if(_.options.fade === false) {
+            if (_.options.fade === false) {
                 targetSlide = _.currentSlide;
-                if(dontAnimate!==true) {
+                if (dontAnimate !== true) {
                     _.animateSlide(slideLeft, function() {
                         _.postSlide(targetSlide);
                     });
@@ -1623,9 +2126,9 @@
             }
             return;
         } else if (_.options.infinite === false && _.options.centerMode === 
true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
-            if(_.options.fade === false) {
+            if (_.options.fade === false) {
                 targetSlide = _.currentSlide;
-                if(dontAnimate!==true) {
+                if (dontAnimate !== true) {
                     _.animateSlide(slideLeft, function() {
                         _.postSlide(targetSlide);
                     });
@@ -1658,9 +2161,7 @@
 
         _.animating = true;
 
-        if (_.options.onBeforeChange !== null && index !== _.currentSlide) {
-            _.options.onBeforeChange.call(this, _, _.currentSlide, animSlide);
-        }
+        _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
 
         oldSlide = _.currentSlide;
         _.currentSlide = animSlide;
@@ -1671,17 +2172,22 @@
         _.updateArrows();
 
         if (_.options.fade === true) {
-            if(dontAnimate!==true) {
-                _.fadeSlide(oldSlide,animSlide, function() {
+            if (dontAnimate !== true) {
+
+                _.fadeSlideOut(oldSlide);
+
+                _.fadeSlide(animSlide, function() {
                     _.postSlide(animSlide);
                 });
+
             } else {
                 _.postSlide(animSlide);
             }
+            _.animateHeight();
             return;
         }
 
-        if(dontAnimate!==true) {
+        if (dontAnimate !== true) {
             _.animateSlide(targetLeft, function() {
                 _.postSlide(animSlide);
             });
@@ -1734,6 +2240,13 @@
         if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
             return (_.options.rtl === false ? 'right' : 'left');
         }
+        if (_.options.verticalSwiping === true) {
+            if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
+                return 'left';
+            } else {
+                return 'right';
+            }
+        }
 
         return 'vertical';
 
@@ -1741,7 +2254,8 @@
 
     Slick.prototype.swipeEnd = function(event) {
 
-        var _ = this, slideCount;
+        var _ = this,
+            slideCount;
 
         _.dragging = false;
 
@@ -1751,23 +2265,31 @@
             return false;
         }
 
+        if (_.touchObject.edgeHit === true) {
+            _.$slider.trigger('edge', [_, _.swipeDirection()]);
+        }
+
         if (_.touchObject.swipeLength >= _.touchObject.minSwipe) {
 
             switch (_.swipeDirection()) {
                 case 'left':
-                    _.slideHandler(_.currentSlide + _.getSlideCount());
+                    slideCount = _.options.swipeToSlide ? 
_.checkNavigable(_.currentSlide + _.getSlideCount()) : _.currentSlide + 
_.getSlideCount();
+                    _.slideHandler(slideCount);
                     _.currentDirection = 0;
                     _.touchObject = {};
+                    _.$slider.trigger('swipe', [_, 'left']);
                     break;
 
                 case 'right':
-                    _.slideHandler(_.currentSlide - _.getSlideCount());
+                    slideCount = _.options.swipeToSlide ? 
_.checkNavigable(_.currentSlide - _.getSlideCount()) : _.currentSlide - 
_.getSlideCount();
+                    _.slideHandler(slideCount);
                     _.currentDirection = 1;
                     _.touchObject = {};
+                    _.$slider.trigger('swipe', [_, 'right']);
                     break;
             }
         } else {
-            if(_.touchObject.startX !== _.touchObject.curX) {
+            if (_.touchObject.startX !== _.touchObject.curX) {
                 _.slideHandler(_.currentSlide);
                 _.touchObject = {};
             }
@@ -1780,9 +2302,9 @@
         var _ = this;
 
         if ((_.options.swipe === false) || ('ontouchend' in document && 
_.options.swipe === false)) {
-           return;
+            return;
         } else if (_.options.draggable === false && 
event.type.indexOf('mouse') !== -1) {
-           return;
+            return;
         }
 
         _.touchObject.fingerCount = event.originalEvent && 
event.originalEvent.touches !== undefined ?
@@ -1790,6 +2312,11 @@
 
         _.touchObject.minSwipe = _.listWidth / _.options
             .touchThreshold;
+
+        if (_.options.verticalSwiping === true) {
+            _.touchObject.minSwipe = _.listHeight / _.options
+                .touchThreshold;
+        }
 
         switch (event.data.action) {
 
@@ -1812,7 +2339,8 @@
     Slick.prototype.swipeMove = function(event) {
 
         var _ = this,
-            curLeft, swipeDirection, positionOffset, touches;
+            edgeWasHit = false,
+            curLeft, swipeDirection, swipeLength, positionOffset, touches;
 
         touches = event.originalEvent !== undefined ? 
event.originalEvent.touches : null;
 
@@ -1828,6 +2356,11 @@
         _.touchObject.swipeLength = Math.round(Math.sqrt(
             Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
 
+        if (_.options.verticalSwiping === true) {
+            _.touchObject.swipeLength = Math.round(Math.sqrt(
+                Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
+        }
+
         swipeDirection = _.swipeDirection();
 
         if (swipeDirection === 'vertical') {
@@ -1839,12 +2372,29 @@
         }
 
         positionOffset = (_.options.rtl === false ? 1 : -1) * 
(_.touchObject.curX > _.touchObject.startX ? 1 : -1);
+        if (_.options.verticalSwiping === true) {
+            positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : 
-1;
+        }
+
+
+        swipeLength = _.touchObject.swipeLength;
+
+        _.touchObject.edgeHit = false;
+
+        if (_.options.infinite === false) {
+            if ((_.currentSlide === 0 && swipeDirection === 'right') || 
(_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
+                swipeLength = _.touchObject.swipeLength * 
_.options.edgeFriction;
+                _.touchObject.edgeHit = true;
+            }
+        }
 
         if (_.options.vertical === false) {
-            _.swipeLeft = curLeft + _.touchObject.swipeLength * positionOffset;
+            _.swipeLeft = curLeft + swipeLength * positionOffset;
         } else {
-            _.swipeLeft = curLeft + (_.touchObject
-                .swipeLength * (_.$list.height() / _.listWidth)) * 
positionOffset;
+            _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / 
_.listWidth)) * positionOffset;
+        }
+        if (_.options.verticalSwiping === true) {
+            _.swipeLeft = curLeft + swipeLength * positionOffset;
         }
 
         if (_.options.fade === true || _.options.touchMove === false) {
@@ -1881,7 +2431,7 @@
 
     };
 
-    Slick.prototype.unfilterSlides = function() {
+    Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = 
function() {
 
         var _ = this;
 
@@ -1904,40 +2454,65 @@
         var _ = this;
 
         $('.slick-cloned', _.$slider).remove();
+
         if (_.$dots) {
             _.$dots.remove();
         }
-        if (_.$prevArrow && (typeof _.options.prevArrow !== 'object')) {
+
+        if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
             _.$prevArrow.remove();
         }
-        if (_.$nextArrow && (typeof _.options.nextArrow !== 'object')) {
+
+        if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
             _.$nextArrow.remove();
         }
-        _.$slides.removeClass(
-            'slick-slide slick-active slick-visible').css('width', '');
+
+        _.$slides
+            .removeClass('slick-slide slick-active slick-visible 
slick-current')
+            .attr('aria-hidden', 'true')
+            .css('width', '');
+
+    };
+
+    Slick.prototype.unslick = function(fromBreakpoint) {
+
+        var _ = this;
+        _.$slider.trigger('unslick', [_, fromBreakpoint]);
+        _.destroy();
 
     };
 
     Slick.prototype.updateArrows = function() {
 
-        var _ = this, centerOffset;
+        var _ = this,
+            centerOffset;
 
-        centerOffset = Math.floor(_.options.slidesToShow / 2)
+        centerOffset = Math.floor(_.options.slidesToShow / 2);
 
-        if (_.options.arrows === true && _.options.infinite !==
-            true && _.slideCount > _.options.slidesToShow) {
-            _.$prevArrow.removeClass('slick-disabled');
-            _.$nextArrow.removeClass('slick-disabled');
+        if ( _.options.arrows === true &&
+            _.slideCount > _.options.slidesToShow &&
+            !_.options.infinite ) {
+
+            _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 
'false');
+            _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 
'false');
+
             if (_.currentSlide === 0) {
-                _.$prevArrow.addClass('slick-disabled');
-                _.$nextArrow.removeClass('slick-disabled');
+
+                _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 
'true');
+                
_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
+
             } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow 
&& _.options.centerMode === false) {
-                _.$nextArrow.addClass('slick-disabled');
-                _.$prevArrow.removeClass('slick-disabled');
-            } else if (_.currentSlide > _.slideCount - _.options.slidesToShow 
+ centerOffset  && _.options.centerMode === true) {
-                _.$nextArrow.addClass('slick-disabled');
-                _.$prevArrow.removeClass('slick-disabled');
+
+                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 
'true');
+                
_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
+
+            } else if (_.currentSlide >= _.slideCount - 1 && 
_.options.centerMode === true) {
+
+                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 
'true');
+                
_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
+
             }
+
         }
 
     };
@@ -1948,170 +2523,121 @@
 
         if (_.$dots !== null) {
 
-            _.$dots.find('li').removeClass('slick-active');
-            _.$dots.find('li').eq(Math.floor(_.currentSlide / 
_.options.slidesToScroll)).addClass('slick-active');
+            _.$dots
+                .find('li')
+                .removeClass('slick-active')
+                .attr('aria-hidden', 'true');
+
+            _.$dots
+                .find('li')
+                .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
+                .addClass('slick-active')
+                .attr('aria-hidden', 'false');
 
         }
 
     };
 
-    $.fn.slick = function(options) {
+    Slick.prototype.visibility = function() {
+
         var _ = this;
-        return _.each(function(index, element) {
 
-            element.slick = new Slick(element, options);
-
-        });
-    };
-
-    $.fn.slickAdd = function(slide, slideIndex, addBefore) {
-        var _ = this;
-        return _.each(function(index, element) {
-
-            element.slick.addSlide(slide, slideIndex, addBefore);
-
-        });
-    };
-
-    $.fn.slickCurrentSlide = function() {
-        var _ = this;
-        return _.get(0).slick.getCurrent();
-    };
-
-    $.fn.slickFilter = function(filter) {
-        var _ = this;
-        return _.each(function(index, element) {
-
-            element.slick.filterSlides(filter);
-
-        });
-    };
-
-    $.fn.slickGoTo = function(slide, dontAnimate) {
-        var _ = this;
-        return _.each(function(index, element) {
-
-            element.slick.changeSlide({
-                data: {
-                    message: 'index',
-                    index: parseInt(slide)
-                }
-            }, dontAnimate);
-
-        });
-    };
-
-    $.fn.slickNext = function() {
-        var _ = this;
-        return _.each(function(index, element) {
-
-            element.slick.changeSlide({
-                data: {
-                    message: 'next'
-                }
-            });
-
-        });
-    };
-
-    $.fn.slickPause = function() {
-        var _ = this;
-        return _.each(function(index, element) {
-
-            element.slick.autoPlayClear();
-            element.slick.paused = true;
-
-        });
-    };
-
-    $.fn.slickPlay = function() {
-        var _ = this;
-        return _.each(function(index, element) {
-
-            element.slick.paused = false;
-            element.slick.autoPlay();
-
-        });
-    };
-
-    $.fn.slickPrev = function() {
-        var _ = this;
-        return _.each(function(index, element) {
-
-            element.slick.changeSlide({
-                data: {
-                    message: 'previous'
-                }
-            });
-
-        });
-    };
-
-    $.fn.slickRemove = function(slideIndex, removeBefore) {
-        var _ = this;
-        return _.each(function(index, element) {
-
-            element.slick.removeSlide(slideIndex, removeBefore);
-
-        });
-    };
-
-    $.fn.slickRemoveAll = function() {
-        var _ = this;
-        return _.each(function(index, element) {
-
-            element.slick.removeSlide(null, null, true);
-
-        });
-    };
-
-    $.fn.slickGetOption = function(option) {
-        var _ = this;
-        return _.get(0).slick.options[option];
-    };
-
-    $.fn.slickSetOption = function(option, value, refresh) {
-        var _ = this;
-        return _.each(function(index, element) {
-
-            element.slick.options[option] = value;
-
-            if (refresh === true) {
-                element.slick.unload();
-                element.slick.reinit();
+        if (document[_.hidden]) {
+            _.paused = true;
+            _.autoPlayClear();
+        } else {
+            if (_.options.autoplay === true) {
+                _.paused = false;
+                _.autoPlay();
             }
+        }
 
+    };
+    Slick.prototype.initADA = function() {
+        var _ = this;
+        _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
+            'aria-hidden': 'true',
+            'tabindex': '-1'
+        }).find('a, input, button, select').attr({
+            'tabindex': '-1'
+        });
+
+        _.$slideTrack.attr('role', 'listbox');
+
+        _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
+            $(this).attr({
+                'role': 'option',
+                'aria-describedby': 'slick-slide' + _.instanceUid + i + ''
+            });
+        });
+
+        if (_.$dots !== null) {
+            _.$dots.attr('role', 'tablist').find('li').each(function(i) {
+                $(this).attr({
+                    'role': 'presentation',
+                    'aria-selected': 'false',
+                    'aria-controls': 'navigation' + _.instanceUid + i + '',
+                    'id': 'slick-slide' + _.instanceUid + i + ''
+                });
+            })
+                .first().attr('aria-selected', 'true').end()
+                .find('button').attr('role', 'button').end()
+                .closest('div').attr('role', 'toolbar');
+        }
+        _.activateADA();
+
+    };
+
+    Slick.prototype.activateADA = function() {
+        var _ = this,
+        _isSlideOnFocus =_.$slider.find('*').is(':focus');
+        // _isSlideOnFocus = _.$slides.is(':focus') || 
_.$slides.find('*').is(':focus');
+
+        _.$slideTrack.find('.slick-active').attr({
+            'aria-hidden': 'false',
+            'tabindex': '0'
+        }).find('a, input, button, select').attr({
+            'tabindex': '0'
+        });
+
+        (_isSlideOnFocus) &&  _.$slideTrack.find('.slick-active').focus();
+
+    };
+
+    Slick.prototype.focusHandler = function() {
+        var _ = this;
+        _.$slider.on('focus.slick blur.slick', '*', function(event) {
+            event.stopImmediatePropagation();
+            var sf = $(this);
+            setTimeout(function() {
+                if (_.isPlay) {
+                    if (sf.is(':focus')) {
+                        _.autoPlayClear();
+                        _.paused = true;
+                    } else {
+                        _.paused = false;
+                        _.autoPlay();
+                    }
+                }
+            }, 0);
         });
     };
 
-    $.fn.slickUnfilter = function() {
-        var _ = this;
-        return _.each(function(index, element) {
-
-            element.slick.unfilterSlides();
-
-        });
-    };
-
-    $.fn.unslick = function() {
-        var _ = this;
-        return _.each(function(index, element) {
-
-          if (element.slick) {
-            element.slick.destroy();
-          }
-
-        });
-    };
-
-    $.fn.getSlick = function() {
-        var s = null;
-        var _ = this;
-        _.each(function(index, element) {
-            s = element.slick;
-        });
-
-        return s;
+    $.fn.slick = function() {
+        var _ = this,
+            opt = arguments[0],
+            args = Array.prototype.slice.call(arguments, 1),
+            l = _.length,
+            i = 0,
+            ret;
+        for (i; i < l; i++) {
+            if (typeof opt == 'object' || typeof opt == 'undefined')
+                _[i].slick = new Slick(_[i], opt);
+            else
+                ret = _[i].slick[opt].apply(_[i].slick, args);
+            if (typeof ret != 'undefined') return ret;
+        }
+        return _;
     };
 
 }));

-- 
To view, visit https://gerrit.wikimedia.org/r/246154
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd57b2402da304edf41aa413e45ac904288d1494
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTagsWidgets
Gerrit-Branch: master
Gerrit-Owner: Pastakhov <[email protected]>
Gerrit-Reviewer: Pastakhov <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to