Crelly Slider - Version 1.4.4

Version Description

  • Fixed JavaScript fatal error in WordPress 5.6.
  • Removed deprecated JavaScript code.
Download this release

Release Info

Developer fabiorino
Plugin Icon 128x128 Crelly Slider
Version 1.4.4
Comparing to
See all releases

Code changes from version 1.4.3 to 1.4.4

crellyslider.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Crelly Slider
4
  * Plugin URI: https://wordpress.org/plugins/crelly-slider/
5
  * Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations.
6
- * Version: 1.4.3
7
  * Author: Fabio Rinaldi
8
  * Author URI: https://github.com/fabiorino
9
  * Text Domain: crelly-slider
@@ -18,7 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
18
 
19
  define('CS_DEBUG', false);
20
 
21
- define('CS_VERSION', '1.4.3');
22
  define('CS_MIN_CAPABILITY', 'manage_options');
23
  define('CS_PATH', plugin_dir_path(__FILE__));
24
  define('CS_PLUGIN_URL', plugins_url() . '/crelly-slider');
3
  * Plugin Name: Crelly Slider
4
  * Plugin URI: https://wordpress.org/plugins/crelly-slider/
5
  * Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations.
6
+ * Version: 1.4.4
7
  * Author: Fabio Rinaldi
8
  * Author URI: https://github.com/fabiorino
9
  * Text Domain: crelly-slider
18
 
19
  define('CS_DEBUG', false);
20
 
21
+ define('CS_VERSION', '1.4.4');
22
  define('CS_MIN_CAPABILITY', 'manage_options');
23
  define('CS_PATH', plugin_dir_path(__FILE__));
24
  define('CS_PLUGIN_URL', plugins_url() . '/crelly-slider');
css/crellyslider.css CHANGED
@@ -2,7 +2,7 @@
2
  * Plugin Name: Crelly Slider
3
  * Plugin URI: https://wordpress.org/plugins/crelly-slider/
4
  * Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations.
5
- * Version: 1.4.3
6
  * Author: Fabio Rinaldi
7
  * Author URI: https://github.com/fabiorino
8
  * License: MIT
@@ -19,6 +19,11 @@
19
  font-family: 'Verdana', sans-serif;
20
  }
21
 
 
 
 
 
 
22
  .crellyslider a {
23
  color: #0073aa;
24
  }
2
  * Plugin Name: Crelly Slider
3
  * Plugin URI: https://wordpress.org/plugins/crelly-slider/
4
  * Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations.
5
+ * Version: 1.4.4
6
  * Author: Fabio Rinaldi
7
  * Author URI: https://github.com/fabiorino
8
  * License: MIT
19
  font-family: 'Verdana', sans-serif;
20
  }
21
 
22
+ .crellyslider,
23
+ .crellyslider * {
24
+ touch-action: pan-y; /* Needed for swipe-left and swipe-right on mobile */
25
+ }
26
+
27
  .crellyslider a {
28
  color: #0073aa;
29
  }
css/crellyslider.min.css CHANGED
@@ -2,10 +2,10 @@
2
  * Plugin Name: Crelly Slider
3
  * Plugin URI: https://wordpress.org/plugins/crelly-slider/
4
  * Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations.
5
- * Version: 1.4.3
6
  * Author: Fabio Rinaldi
7
  * Author URI: https://github.com/fabiorino
8
  * License: MIT
9
  */
10
 
11
- .crellyslider>.cs-controls>.cs-next,.crellyslider>.cs-controls>.cs-previous,.crellyslider>.cs-preloader>.cs-loader{background-repeat:no-repeat;background-position:center center;border:10px;box-shadow:0 3px 10px rgba(0,0,0,.16),0 3px 10px rgba(0,0,0,.23)}.crellyslider{margin:0 auto;position:relative;white-space:nowrap;overflow:hidden;line-height:1.5;font-size:14px;color:#000;font-family:Verdana,sans-serif}.crellyslider a,.crellyslider a:hover{color:#0073aa}.crellyslider>.cs-preloader{width:100%;height:100%;z-index:999;background-color:#fff;position:relative;overflow:hidden}.crellyslider>.cs-preloader>.cs-bg{position:absolute;top:0;left:0;z-index:11;display:block;width:100%;height:100%;filter:blur(5px);-webkit-filter:blur(5px);-moz-filter:blur(5px);-o-filter:blur(5px);-ms-filter:blur(5px)}.crellyslider>.cs-preloader>.cs-loader{width:50px;height:50px;position:absolute;top:50%;left:50%;margin-top:-25px;margin-left:-25px;z-index:12;background-color:#fff;border-radius:50%}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner{top:16px;left:50%;margin-left:-2px;display:inline-block;position:relative;-webkit-animation:cs-bounce-middle .6s ease .1s infinite;animation:cs-bounce-middle .6s ease .1s infinite}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner,.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:after,.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:before{width:4px;height:18px;background-color:#0b60a9;border-radius:2px}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:after,.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:before{content:"";position:absolute;display:block;top:50%;-webkit-transform:translateY(-10px) translateZ(0);transform:translateY(-10px) translateZ(0)}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:before{left:-6px;-webkit-animation:cs-bounce-middle .6s ease 0s infinite;animation:cs-bounce-middle .6s ease 0s infinite}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:after{left:6px;-webkit-animation:cs-bounce-middle .6s ease .2s infinite;animation:cs-bounce-middle .6s ease .2s infinite}@-webkit-keyframes cs-bounce-middle{0%,100%{height:4px;margin-top:8px;margin-bottom:8px}50%{height:20px;margin-top:0;margin-bottom:0}}@keyframes cs-bounce-middle{0%,100%{height:4px;margin-top:8px;margin-bottom:8px}50%{height:20px;margin-top:0;margin-bottom:0}}.crellyslider>.cs-controls,.crellyslider>.cs-navigation{z-index:999;-webkit-transition:all .2s;-moz-transition:all .2s;-o-transition:all .2s;-ms-transition:all .2s;transition:all .2s;opacity:0;filter:alpha(opacity=0)}.crellyslider:hover>.cs-controls,.crellyslider:hover>.cs-navigation{opacity:1;filter:alpha(opacity=100)}.crellyslider>.cs-slides{list-style:none;margin:0;padding:0}.crellyslider>.cs-slides>.cs-slide{margin:0;padding:0;position:absolute;overflow:hidden;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.crellyslider>.cs-slides>.cs-slide>.cs-background-link{opacity:0;z-index:0;padding:0;width:100%!important;height:100%!important;top:0!important;left:0!important}.crellyslider>.cs-slides>.cs-slide>*{position:absolute;display:block;cursor:default;-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;font-size:14px}.crellyslider>.cs-slides>.cs-slide>a{cursor:pointer}.crellyslider>.cs-slides>.cs-slide>a>img,.crellyslider>.cs-slides>.cs-slide>img{max-width:none!important}.crellyslider>.cs-slides>.cs-slide a,.crellyslider>.cs-slides>.cs-slide>a>img{text-decoration:none;outline:0;border:none}.crellyslider>.cs-controls{position:absolute;width:100%;top:50%;margin-top:-9px}.crellyslider>.cs-controls>.cs-next,.crellyslider>.cs-controls>.cs-previous{display:block;width:35px;height:35px;position:absolute;cursor:pointer;background-color:#fff;border-radius:50%}.crellyslider>.cs-controls>.cs-previous{background-image:url(../images/arrow-left.png);left:30px}.crellyslider>.cs-controls>.cs-next{background-image:url(../images/arrow-right.png);right:30px}.crellyslider>.cs-navigation{position:absolute;width:100%;height:0;bottom:40px;text-align:center}.crellyslider>.cs-navigation>.cs-slide-link{width:15px;height:15px;display:inline-block;cursor:pointer;margin:6px;background-color:#fff;box-shadow:0 3px 10px rgba(0,0,0,.16),0 3px 10px rgba(0,0,0,.23);border:10px;border-radius:50%;opacity:.5;filter:alpha(opacity=50)}.crellyslider>.cs-navigation>.cs-slide-link.cs-active{opacity:1;filter:alpha(opacity=100)}.crellyslider>.cs-progress-bar{width:0%;height:4px;position:absolute;top:0;background-color:#fff;opacity:.5;filter:alpha(opacity=50);z-index:999}.crellyslider>.cs-progress-bar.cs-progress-bar-hidden{opacity:0;filter:alpha(opacity=0)}
2
  * Plugin Name: Crelly Slider
3
  * Plugin URI: https://wordpress.org/plugins/crelly-slider/
4
  * Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations.
5
+ * Version: 1.4.4
6
  * Author: Fabio Rinaldi
7
  * Author URI: https://github.com/fabiorino
8
  * License: MIT
9
  */
10
 
11
+ .crellyslider{margin:0 auto;position:relative;white-space:nowrap;overflow:hidden;line-height:1.5;font-size:14px;color:#000;font-family:Verdana,sans-serif}.crellyslider,.crellyslider *{touch-action:pan-y}.crellyslider a{color:#0073aa}.crellyslider a:hover{color:#0073aa}.crellyslider>.cs-preloader{width:100%;height:100%;z-index:999;background-color:#fff;position:relative;overflow:hidden}.crellyslider>.cs-preloader>.cs-bg{position:absolute;top:0;left:0;z-index:11;display:block;width:100%;height:100%;filter:blur(5px);-webkit-filter:blur(5px);-moz-filter:blur(5px);-o-filter:blur(5px);-ms-filter:blur(5px)}.crellyslider>.cs-preloader>.cs-loader{width:50px;height:50px;position:absolute;top:50%;left:50%;margin-top:-25px;margin-left:-25px;z-index:12;background-color:#fff;box-shadow:0 3px 10px rgba(0,0,0,.16),0 3px 10px rgba(0,0,0,.23);background-repeat:no-repeat;background-position:center center;border:10px;border-radius:50%}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner{top:16px;left:50%;margin-left:-2px}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner,.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:after,.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:before{width:4px;height:18px;background-color:#0b60a9;border-radius:2px}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner{display:inline-block;position:relative}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:after,.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:before{content:"";position:absolute;display:block;top:0}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:before{left:-6px}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:after{left:6px}@-webkit-keyframes cs-bounce-middle{0%{height:4px;margin-top:8px;margin-bottom:8px}50%{height:20px;margin-top:0;margin-bottom:0}100%{height:4px;margin-top:8px;margin-bottom:8px}}@keyframes cs-bounce-middle{0%{height:4px;margin-top:8px;margin-bottom:8px}50%{height:20px;margin-top:0;margin-bottom:0}100%{height:4px;margin-top:8px;margin-bottom:8px}}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner{-webkit-animation:cs-bounce-middle .6s ease .1s infinite;animation:cs-bounce-middle .6s ease .1s infinite}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:after,.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:before{top:50%;-webkit-transform:translateY(-10px) translateZ(0);transform:translateY(-10px) translateZ(0)}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:before{-webkit-animation:cs-bounce-middle .6s ease 0s infinite;animation:cs-bounce-middle .6s ease 0s infinite}.crellyslider>.cs-preloader>.cs-loader>.cs-spinner:after{-webkit-animation:cs-bounce-middle .6s ease .2s infinite;animation:cs-bounce-middle .6s ease .2s infinite}.crellyslider>.cs-controls,.crellyslider>.cs-navigation{z-index:999;-webkit-transition:all .2s;-moz-transition:all .2s;-o-transition:all .2s;-ms-transition:all .2s;transition:all .2s;opacity:0}.crellyslider:hover>.cs-controls,.crellyslider:hover>.cs-navigation{opacity:1}.crellyslider>.cs-slides{list-style:none;margin:0;padding:0}.crellyslider>.cs-slides>.cs-slide{margin:0;padding:0;position:absolute;overflow:hidden;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.crellyslider>.cs-slides>.cs-slide>.cs-background-link{opacity:0;z-index:0;padding:0;width:100%!important;height:100%!important;top:0!important;left:0!important}.crellyslider>.cs-slides>.cs-slide>*{position:absolute;display:block;cursor:default;-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;font-size:14px}.crellyslider>.cs-slides>.cs-slide>a{cursor:pointer}.crellyslider>.cs-slides>.cs-slide>a>img,.crellyslider>.cs-slides>.cs-slide>img{max-width:none!important}.crellyslider>.cs-slides>.cs-slide a,.crellyslider>.cs-slides>.cs-slide>a>img{text-decoration:none;outline:0;border:none}.crellyslider>.cs-controls{position:absolute;width:100%;top:50%;margin-top:-9px}.crellyslider>.cs-controls>.cs-next,.crellyslider>.cs-controls>.cs-previous{display:block;width:35px;height:35px;position:absolute;cursor:pointer;background-color:#fff;box-shadow:0 3px 10px rgba(0,0,0,.16),0 3px 10px rgba(0,0,0,.23);background-repeat:no-repeat;background-position:center center;border:10px;border-radius:50%}.crellyslider>.cs-controls>.cs-previous{background-image:url(../images/arrow-left.png);left:30px}.crellyslider>.cs-controls>.cs-next{background-image:url(../images/arrow-right.png);right:30px}.crellyslider>.cs-navigation{position:absolute;width:100%;height:0;bottom:40px;text-align:center}.crellyslider>.cs-navigation>.cs-slide-link{width:15px;height:15px;display:inline-block;cursor:pointer;margin:6px;background-color:#fff;box-shadow:0 3px 10px rgba(0,0,0,.16),0 3px 10px rgba(0,0,0,.23);border:10px;border-radius:50%;opacity:.5}.crellyslider>.cs-navigation>.cs-slide-link.cs-active{opacity:1}.crellyslider>.cs-progress-bar{width:0%;height:4px;position:absolute;top:0;background-color:#fff;opacity:.5;z-index:999}.crellyslider>.cs-progress-bar.cs-progress-bar-hidden{opacity:0}
js/jquery.crellyslider.js CHANGED
@@ -2,7 +2,7 @@
2
  * Plugin Name: Crelly Slider
3
  * Plugin URI: https://wordpress.org/plugins/crelly-slider/
4
  * Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations.
5
- * Version: 1.4.3
6
  * Author: Fabio Rinaldi
7
  * Author URI: https://github.com/fabiorino
8
  * License: MIT
@@ -22,8 +22,16 @@ var crellyslider_vimeo_api_ready = false;
22
  /** EXTERNAL RESOURCES **/
23
  /************************/
24
 
25
- // Custom build of jQuery mobile. I need it for swipeleft and swiperight
26
- (function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,n,r){function T(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function N(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=T(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l]}return t}function C(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function k(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function L(){g=!1}function A(){g=!0}function O(){E=0,v.length=0,m=!1,A()}function M(){L()}function _(){D(),c=setTimeout(function(){c=0,O()},e.vmouse.resetTimerDuration)}function D(){c&&(clearTimeout(c),c=0)}function P(t,n,r){var i;if(r&&r[t]||!r&&k(n.target,t))i=N(n,t),e(n.target).trigger(i);return i}function H(t){var n=e.data(t.target,s),r;!m&&(!E||E!==n)&&(r=P("v"+t.type,t),r&&(r.isDefaultPrevented()&&t.preventDefault(),r.isPropagationStopped()&&t.stopPropagation(),r.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function B(t){var n=T(t).touches,r,i,o;n&&n.length===1&&(r=t.target,i=C(r),i.hasVirtualBinding&&(E=w++,e.data(r,s,E),D(),M(),d=!1,o=T(t).touches[0],h=o.pageX,p=o.pageY,P("vmouseover",t,i),P("vmousedown",t,i)))}function j(e){if(g)return;d||P("vmousecancel",e,C(e.target)),d=!0,_()}function F(t){if(g)return;var n=T(t).touches[0],r=d,i=e.vmouse.moveDistanceThreshold,s=C(t.target);d=d||Math.abs(n.pageX-h)>i||Math.abs(n.pageY-p)>i,d&&!r&&P("vmousecancel",t,s),P("vmousemove",t,s),_()}function I(e){if(g)return;A();var t=C(e.target),n,r;P("vmouseup",e,t),d||(n=P("vclick",e,t),n&&n.isDefaultPrevented()&&(r=T(e).changedTouches[0],v.push({touchID:E,x:r.clientX,y:r.clientY}),m=!0)),P("vmouseout",e,t),d=!1,_()}function q(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function R(){}function U(t){var n=t.substr(1);return{setup:function(){q(this)||e.data(this,i,{});var r=e.data(this,i);r[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,H),e(this).bind(n,R),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",B).bind("touchend",I).bind("touchmove",F).bind("scroll",j))},teardown:function(){--l[t],l[t]||b.unbind(n,H),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",B).unbind("touchmove",F).unbind("touchend",I).unbind("scroll",j));var r=e(this),s=e.data(this,i);s&&(s[t]=!1),r.unbind(n,R),q(this)||r.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[],f=e.event.props.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S,x;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(x=0;x<o.length;x++)e.event.special[o[x]]=U(o[x]);y&&n.addEventListener("click",function(t){var n=v.length,r=t.target,i,o,u,a,f,l;if(n){i=t.clientX,o=t.clientY,S=e.vmouse.clickDistanceThreshold,u=r;while(u){for(a=0;a<n;a++){f=v[a],l=0;if(u===r&&Math.abs(f.x-i)<S&&Math.abs(f.y-o)<S||e.data(u,s)===f.touchID){t.preventDefault(),t.stopPropagation();return}}u=u.parentNode}}},!0)})(e,t,n),function(e){e.mobile={}}(e),function(e,t){var r={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,r),e.extend(e.mobile.support,r)}(e),function(e,t,r){function l(t,n,i,s){var o=i.type;i.type=n,s?e.event.trigger(i,r,t):e.event.dispatch.call(t,i),i.type=o}var i=e(n),s=e.mobile.support.touch,o="touchmove scroll",u=s?"touchstart":"mousedown",a=s?"touchend":"mouseup",f=s?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)},e.attrFn&&(e.attrFn[n]=!0)}),e.event.special.scrollstart={enabled:!0,setup:function(){function s(e,n){r=n,l(t,r?"scrollstart":"scrollstop",e)}var t=this,n=e(t),r,i;n.bind(o,function(t){if(!e.event.special.scrollstart.enabled)return;r||s(t,!0),clearTimeout(i),i=setTimeout(function(){s(t,!1)},50)})},teardown:function(){e(this).unbind(o)}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,n=e(t),r=!1;n.bind("vmousedown",function(s){function a(){clearTimeout(u)}function f(){a(),n.unbind("vclick",c).unbind("vmouseup",a),i.unbind("vmousecancel",f)}function c(e){f(),!r&&o===e.target?l(t,"tap",e):r&&e.preventDefault()}r=!1;if(s.which&&s.which!==1)return!1;var o=s.target,u;n.bind("vmouseup",a).bind("vclick",c),i.bind("vmousecancel",f),u=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(r=!0),l(t,"taphold",e.Event("taphold",{target:o}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),i.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var n=t.pageXOffset,r=t.pageYOffset,i=e.clientX,s=e.clientY;if(e.pageY===0&&Math.floor(s)>Math.floor(e.pageY)||e.pageX===0&&Math.floor(i)>Math.floor(e.pageX))i-=n,s-=r;else if(s<e.pageY-r||i<e.pageX-n)i=e.pageX-n,s=e.pageY-r;return{x:i,y:s}},start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y],origin:e(t.target)}},stop:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y]}},handleSwipe:function(t,n,r,i){if(n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var s=t.coords[0]>n.coords[0]?"swipeleft":"swiperight";return l(r,"swipe",e.Event("swipe",{target:i,swipestart:t,swipestop:n}),!0),l(r,s,e.Event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,r=e(n),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(e.event.special.swipe.eventInProgress)return;e.event.special.swipe.eventInProgress=!0;var r,o=e.event.special.swipe.start(t),u=t.target,l=!1;s.move=function(t){if(!o||t.isDefaultPrevented())return;r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(o,r,n,u),l&&(e.event.special.swipe.eventInProgress=!1)),Math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,i.off(f,s.move),s.move=null},i.on(f,s.move).one(a,s.stop)},r.on(u,s.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,t.length--,t.length===0&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(u,n.start),n.move&&i.off(f,n.move),n.stop&&i.off(a,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)});
 
 
 
 
 
 
 
 
27
 
28
  // YouTube API:
29
  function loadYoutubeAPI() {
@@ -534,7 +542,7 @@ var crellyslider_vimeo_api_ready = false;
534
  function addListeners() {
535
  // Make responsive. Run if resizing horizontally and the slider is not at the right dimension
536
  if(settings.responsive) {
537
- $(window).resize(function() {
538
  if(window_width_before_setResponsive != $(window).width() && ((settings.layout == 'full-width' && getWidth() != $(SLIDER).width()) || ($(SLIDER).width() < getWidth() || (($(SLIDER).width() > getWidth()) && getWidth() < settings.startWidth)))) {
539
  setResponsive();
540
  }
@@ -549,16 +557,20 @@ var crellyslider_vimeo_api_ready = false;
549
  });*/
550
 
551
  // Previous control click
552
- SLIDER.find(CRELLY).find('.cs-controls > .cs-previous').click(function() {
553
  changeSlide(getPreviousSlide());
554
  });
555
 
556
  // Next Control click
557
- SLIDER.find(CRELLY).find('.cs-controls > .cs-next').click(function() {
558
  changeSlide(getNextSlide());
559
  });
560
 
561
  // Swipe and drag
 
 
 
 
562
  if(settings.enableSwipe) {
563
  SLIDER.find(CRELLY).on('swipeleft', function() {
564
  resume();
@@ -572,19 +584,19 @@ var crellyslider_vimeo_api_ready = false;
572
  }
573
 
574
  // Navigation link click
575
- SLIDER.find(CRELLY).find('.cs-navigation > .cs-slide-link').click(function() {
576
  changeSlide($(this).index());
577
  });
578
 
579
  // Pause on hover
580
  if(settings.pauseOnHover) {
581
- SLIDER.find(CRELLY).find(SLIDES).hover(function() {
582
  if(prevent_hover_interactions == 0) {
583
  pause();
584
  }
585
  });
586
 
587
- SLIDER.find(CRELLY).find(SLIDES).mouseleave(function() {
588
  if(prevent_hover_interactions == 0) {
589
  resume();
590
  }
@@ -610,7 +622,7 @@ var crellyslider_vimeo_api_ready = false;
610
  else {
611
  // When the background image of the first slide is loaded
612
  $('<img>')
613
- .load(function() {
614
  addPreloaderHTML();
615
  })
616
  .attr('src', img_url)
2
  * Plugin Name: Crelly Slider
3
  * Plugin URI: https://wordpress.org/plugins/crelly-slider/
4
  * Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations.
5
+ * Version: 1.4.4
6
  * Author: Fabio Rinaldi
7
  * Author URI: https://github.com/fabiorino
8
  * License: MIT
22
  /** EXTERNAL RESOURCES **/
23
  /************************/
24
 
25
+ /**
26
+ * jquery.events.swipe v1.0.0 by Andrés Zsögön
27
+ * jQuery Plugin to obtain horizontal touch gestures from Android, iOS, Windows Phone
28
+ * http://github.com/andreszs/jquery.events.swipe
29
+ * License: MIT
30
+ * ------------
31
+ * Based on https://github.com/patrickhlauke/touch and https://github.com/marcandre/detect_swipe
32
+ */
33
+ // The code has been compressed with https://jscompress.com/
34
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(n){var e,t,i,o;o=window.PointerEvent?(e="pointerdown",t="pointermove",i="pointerup","pointercancel"):window.MSPointerEvent?(e="MSPointerDown",t="MSPointerMove",i="MSPointerUp","MSPointerCancel"):(e="touchstart",t="touchmove",i="touchend","touchcancel");var s={},r={},a=500,c=64,p=!1;function h(e){p&&console.info(e.type),void 0!==e.isPrimary&&!1===e.isPrimary||void 0!==e.touches&&1<e.touches.length||(s.t=(new Date).getTime(),void 0!==e.touches?(s.x=e.touches[0].pageX,s.y=e.touches[0].pageY):void 0!==e.pageX&&(s.x=e.pageX,s.y=e.pageY),r.x=s.x,r.y=s.y,this.addEventListener(t,u,!1),this.addEventListener(i,f,!1),this.addEventListener(o,g,!1))}function u(e){p&&console.info(e.type),void 0!==e.touches?(r.x=e.touches[0].pageX,r.y=e.touches[0].pageY):void 0!==e.pageX&&(r.x=e.pageX,r.y=e.pageY);var t=(new Date).getTime()-s.t,i=r.x-s.x,o=r.y-s.y;a<t?v(this):c<i&&Math.abs(o)<c?(p&&console.info("swiperight"),n(this).trigger("swipe","right").trigger("swiperight"),v(this)):c<-i&&Math.abs(o)<c?(p&&console.info("swipeleft"),n(this).trigger("swipe","left").trigger("swipeleft"),v(this)):16<Math.abs(i)&&Math.abs(i)>Math.abs(o)?(p&&console.log("Horizontal swipe started"),e.preventDefault()):8<Math.abs(o)&&Math.abs(o)>Math.abs(i)&&(p&&console.log("Vertical swipe started"),v(this))}function f(e){p&&console.info(e.type),v(this)}function g(e){p&&console.info(e.type),v(this)}function v(e){e.removeEventListener(t,u),e.removeEventListener(i,f),e.removeEventListener(o,f)}n.event.special.swipe={setup:function(){this.addEventListener(e,h,!1)}},n.each(["left","right"],function(){n.event.special["swipe"+this]={setup:function(){n(this).on("swipe",n.noop)}}})});
35
 
36
  // YouTube API:
37
  function loadYoutubeAPI() {
542
  function addListeners() {
543
  // Make responsive. Run if resizing horizontally and the slider is not at the right dimension
544
  if(settings.responsive) {
545
+ $(window).on('resize', function() {
546
  if(window_width_before_setResponsive != $(window).width() && ((settings.layout == 'full-width' && getWidth() != $(SLIDER).width()) || ($(SLIDER).width() < getWidth() || (($(SLIDER).width() > getWidth()) && getWidth() < settings.startWidth)))) {
547
  setResponsive();
548
  }
557
  });*/
558
 
559
  // Previous control click
560
+ SLIDER.find(CRELLY).find('.cs-controls > .cs-previous').on('click', function() {
561
  changeSlide(getPreviousSlide());
562
  });
563
 
564
  // Next Control click
565
+ SLIDER.find(CRELLY).find('.cs-controls > .cs-next').on('click', function() {
566
  changeSlide(getNextSlide());
567
  });
568
 
569
  // Swipe and drag
570
+ SLIDER.find(CRELLY).on('dragstart', function(e) {
571
+ e.stopPropagation();
572
+ return false;
573
+ });
574
  if(settings.enableSwipe) {
575
  SLIDER.find(CRELLY).on('swipeleft', function() {
576
  resume();
584
  }
585
 
586
  // Navigation link click
587
+ SLIDER.find(CRELLY).find('.cs-navigation > .cs-slide-link').on('click', function() {
588
  changeSlide($(this).index());
589
  });
590
 
591
  // Pause on hover
592
  if(settings.pauseOnHover) {
593
+ SLIDER.find(CRELLY).find(SLIDES).on('mouseenter', function() {
594
  if(prevent_hover_interactions == 0) {
595
  pause();
596
  }
597
  });
598
 
599
+ SLIDER.find(CRELLY).find(SLIDES).on('mouseleave', function() {
600
  if(prevent_hover_interactions == 0) {
601
  resume();
602
  }
622
  else {
623
  // When the background image of the first slide is loaded
624
  $('<img>')
625
+ .on('load', function() {
626
  addPreloaderHTML();
627
  })
628
  .attr('src', img_url)
js/jquery.crellyslider.min.js CHANGED
@@ -2,10 +2,10 @@
2
  * Plugin Name: Crelly Slider
3
  * Plugin URI: https://wordpress.org/plugins/crelly-slider/
4
  * Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations.
5
- * Version: 1.4.3
6
  * Author: Fabio Rinaldi
7
  * Author URI: https://github.com/fabiorino
8
  * License: MIT
9
  */
10
 
11
- var crellyslider_youtube_api_ready=!1,crellyslider_vimeo_api_ready=!1;!function(e){var t,i,n;t=this,i=document,n=function(e,t,i,n){var a,o;(function(e,t,i,n){function a(e){for(;e&&void 0!==e.originalEvent;)e=e.originalEvent;return e}function o(t){for(var i,n,a={};t;){for(n in i=e.data(t,k))i[n]&&(a[n]=a.hasVirtualBinding=!0);t=t.parentNode}return a}function s(){M=!0}function r(){M=!1}function c(){l(),P=setTimeout(function(){P=0,C=0,Y.length=0,O=!1,s()},e.vmouse.resetTimerDuration)}function l(){P&&(clearTimeout(P),P=0)}function d(t,i,o){var s;return(o&&o[t]||!o&&function(t,i){for(var n;t;){if((n=e.data(t,k))&&(!i||n[i]))return t;t=t.parentNode}return null}(i.target,t))&&(s=function(t,i){var o,s,r,c,l,d,p,f,u,h=t.type;if((t=e.Event(t)).type=i,o=t.originalEvent,s=e.event.props,h.search(/^(mouse|click)/)>-1&&(s=E),o)for(p=s.length;p;)t[c=s[--p]]=o[c];if(h.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1),-1!==h.search(/^touch/)&&(h=(r=a(o)).touches,l=r.changedTouches,d=h&&h.length?h[0]:l&&l.length?l[0]:n))for(f=0,u=D.length;f<u;f++)t[c=D[f]]=d[c];return t}(i,t),e(i.target).trigger(s)),s}function p(t){var i,n=e.data(t.target,S);!O&&(!C||C!==n)&&((i=d("v"+t.type,t))&&(i.isDefaultPrevented()&&t.preventDefault(),i.isPropagationStopped()&&t.stopPropagation(),i.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function f(t){var i,n,s,c=a(t).touches;c&&1===c.length&&((n=o(i=t.target)).hasVirtualBinding&&(C=z++,e.data(i,S,C),l(),r(),F=!1,s=a(t).touches[0],N=s.pageX,L=s.pageY,d("vmouseover",t,n),d("vmousedown",t,n)))}function u(e){M||(F||d("vmousecancel",e,o(e.target)),F=!0,c())}function h(t){if(!M){var i=a(t).touches[0],n=F,s=e.vmouse.moveDistanceThreshold,r=o(t.target);(F=F||Math.abs(i.pageX-N)>s||Math.abs(i.pageY-L)>s)&&!n&&d("vmousecancel",t,r),d("vmousemove",t,r),c()}}function v(e){if(!M){s();var t,i,n=o(e.target);d("vmouseup",e,n),F||(t=d("vclick",e,n))&&t.isDefaultPrevented()&&(i=a(e).changedTouches[0],Y.push({touchID:C,x:i.clientX,y:i.clientY}),O=!0),d("vmouseout",e,n),F=!1,c()}}function y(t){var i,n=e.data(t,k);if(n)for(i in n)if(n[i])return!0;return!1}function m(){}function g(t){var i=t.substr(1);return{setup:function(){y(this)||e.data(this,k,{}),e.data(this,k)[t]=!0,_[t]=(_[t]||0)+1,1===_[t]&&R.bind(i,p),e(this).bind(i,m),x&&(_.touchstart=(_.touchstart||0)+1,1===_.touchstart&&R.bind("touchstart",f).bind("touchend",v).bind("touchmove",h).bind("scroll",u))},teardown:function(){--_[t],_[t]||R.unbind(i,p),x&&(--_.touchstart,_.touchstart||R.unbind("touchstart",f).unbind("touchmove",h).unbind("touchend",v).unbind("scroll",u));var n=e(this),a=e.data(this,k);a&&(a[t]=!1),n.unbind(i,m),y(this)||n.removeData(k)}}}var b,w,k="virtualMouseBindings",S="virtualTouchID",T="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),D="clientX clientY pageX pageY screenX screenY".split(" "),I=e.event.mouseHooks?e.event.mouseHooks.props:[],E=e.event.props.concat(I),_={},P=0,N=0,L=0,F=!1,Y=[],O=!1,M=!1,x="addEventListener"in i,R=e(i),z=1,C=0;for(e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500},w=0;w<T.length;w++)e.event.special[T[w]]=g(T[w]);x&&i.addEventListener("click",function(t){var i,n,a,o,s,r=Y.length,c=t.target;if(r)for(i=t.clientX,n=t.clientY,b=e.vmouse.clickDistanceThreshold,a=c;a;){for(o=0;o<r;o++)if(s=Y[o],0,a===c&&Math.abs(s.x-i)<b&&Math.abs(s.y-n)<b||e.data(a,S)===s.touchID)return t.preventDefault(),void t.stopPropagation();a=a.parentNode}},!0)})(e,0,i),e.mobile={},o={touch:"ontouchend"in i},(a=e).mobile.support=a.mobile.support||{},a.extend(a.support,o),a.extend(a.mobile.support,o),function(e,t,n){function a(t,i,a,o){var s=a.type;a.type=i,o?e.event.trigger(a,n,t):e.event.dispatch.call(t,a),a.type=s}var o=e(i),s=e.mobile.support.touch,r="touchmove scroll",c=s?"touchstart":"mousedown",l=s?"touchend":"mouseup",d=s?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,i){e.fn[i]=function(e){return e?this.bind(i,e):this.trigger(i)},e.attrFn&&(e.attrFn[i]=!0)}),e.event.special.scrollstart={enabled:!0,setup:function(){function t(e,t){a(o,(i=t)?"scrollstart":"scrollstop",e)}var i,n,o=this;e(o).bind(r,function(a){e.event.special.scrollstart.enabled&&(i||t(a,!0),clearTimeout(n),n=setTimeout(function(){t(a,!1)},50))})},teardown:function(){e(this).unbind(r)}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,i=e(t),n=!1;i.bind("vmousedown",function(s){function r(){clearTimeout(d)}function c(){r(),i.unbind("vclick",l).unbind("vmouseup",r),o.unbind("vmousecancel",c)}function l(e){c(),n||p!==e.target?n&&e.preventDefault():a(t,"tap",e)}if(n=!1,s.which&&1!==s.which)return!1;var d,p=s.target;i.bind("vmouseup",r).bind("vclick",l),o.bind("vmousecancel",c),d=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(n=!0),a(t,"taphold",e.Event("taphold",{target:p}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),o.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var i=t.pageXOffset,n=t.pageYOffset,a=e.clientX,o=e.clientY;return 0===e.pageY&&Math.floor(o)>Math.floor(e.pageY)||0===e.pageX&&Math.floor(a)>Math.floor(e.pageX)?(a-=i,o-=n):(o<e.pageY-n||a<e.pageX-i)&&(a=e.pageX-i,o=e.pageY-n),{x:a,y:o}},start:function(t){var i=t.originalEvent.touches?t.originalEvent.touches[0]:t,n=e.event.special.swipe.getLocation(i);return{time:(new Date).getTime(),coords:[n.x,n.y],origin:e(t.target)}},stop:function(t){var i=t.originalEvent.touches?t.originalEvent.touches[0]:t,n=e.event.special.swipe.getLocation(i);return{time:(new Date).getTime(),coords:[n.x,n.y]}},handleSwipe:function(t,i,n,o){if(i.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-i.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-i.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var s=t.coords[0]>i.coords[0]?"swipeleft":"swiperight";return a(n,"swipe",e.Event("swipe",{target:o,swipestart:t,swipestop:i}),!0),a(n,s,e.Event(s,{target:o,swipestart:t,swipestop:i}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,i=this,n=e(i),a={};(t=e.data(this,"mobile-events"))||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=a,a.start=function(t){if(!e.event.special.swipe.eventInProgress){e.event.special.swipe.eventInProgress=!0;var n,s=e.event.special.swipe.start(t),r=t.target,c=!1;a.move=function(t){s&&!t.isDefaultPrevented()&&(n=e.event.special.swipe.stop(t),c||(c=e.event.special.swipe.handleSwipe(s,n,i,r))&&(e.event.special.swipe.eventInProgress=!1),Math.abs(s.coords[0]-n.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault())},a.stop=function(){c=!0,e.event.special.swipe.eventInProgress=!1,o.off(d,a.move),a.move=null},o.on(d,a.move).one(l,a.stop)}},n.on(c,a.start)},teardown:function(){var t,i;(t=e.data(this,"mobile-events"))&&(i=t.swipe,delete t.swipe,t.length--,0===t.length&&e.removeData(this,"mobile-events")),i&&(i.start&&e(this).off(c,i.start),i.move&&o.off(d,i.move),i.stop&&o.off(l,i.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,i){e.event.special[t]={setup:function(){e(this).bind(i,e.noop)},teardown:function(){e(this).unbind(i)}}})}(e,this)},"function"==typeof define&&define.amd?define(["jquery"],function(e){return n(e,0,i),e.mobile}):n(t.jQuery,0,i),e.CrellySlider=function(t,i){var n,a=e(t),o="div.crellyslider",s="ul.cs-slides",r="li.cs-slide",c="> *",l=0,d=!1,p=!1,f=!1,u=!0,h=new H(function(){},0),v=new Array,y=new Array,m={},g={},b=1,w=0;if(!crellyslider_youtube_api_ready&&S("youtube")&&function(){var e=document.createElement("script");e.src="https://www.youtube.com/iframe_api";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t),crellyslider_youtube_api_ready=!0}(),!crellyslider_vimeo_api_ready&&S("vimeo")&&(!function(){function e(t){return new e.fn.init(t)}function t(e,t,i){if(!i.contentWindow.postMessage)return!1;e=JSON.stringify({method:e,value:t}),i.contentWindow.postMessage(e,s)}function i(e){var t,i;try{i=(t=JSON.parse(e.data)).event||t.method}catch(e){}if("ready"!=i||o||(o=!0),!/^https?:\/\/player.vimeo.com/.test(e.origin))return!1;"*"===s&&(s=e.origin),e=t.value;var n=t.data,r=""===r?null:t.player_id;return t=r?a[r][i]:a[i],i=[],!!t&&(void 0!==e&&i.push(e),n&&i.push(n),r&&i.push(r),0<i.length?t.apply(null,i):t.call())}function n(e,t,i){i?(a[i]||(a[i]={}),a[i][e]=t):a[e]=t}var a={},o=!1,s="*";e.fn=e.prototype={element:null,init:function(e){return"string"==typeof e&&(e=document.getElementById(e)),this.element=e,this},api:function(e,i){if(!this.element||!e)return!1;var a=this.element,o=""!==a.id?a.id:null,s=i&&i.constructor&&i.call&&i.apply?null:i,r=i&&i.constructor&&i.call&&i.apply?i:null;return r&&n(e,r,o),t(e,s,a),this},addEvent:function(e,i){if(!this.element)return!1;var a=this.element,s=""!==a.id?a.id:null;return n(e,i,s),"ready"!=e?t("addEventListener",e,a):"ready"==e&&o&&i.call(null,s),this},removeEvent:function(e){if(!this.element)return!1;var i=this.element,n=""!==i.id?i.id:null;e:{if(n&&a[n]){if(!a[n][e]){n=!1;break e}a[n][e]=null}else{if(!a[e]){n=!1;break e}a[e]=null}n=!0}"ready"!=e&&n&&t("removeEventListener",e,i)}},e.fn.init.prototype=e.fn,window.addEventListener?window.addEventListener("message",i,!1):window.attachEvent("onmessage",i),window.Froogaloop=window.$f=e}(),crellyslider_vimeo_api_ready=!0),!crellyslider_youtube_api_ready||"undefined"!=typeof YT&&void 0!==YT.Player)T();else var k=setInterval(function(){"undefined"!=typeof YT&&void 0!==YT.Player&&(clearInterval(k),T())},100);function S(e){return"youtube"==e?a.find(".cs-yt-iframe").length>0:"vimeo"==e?a.find(".cs-vimeo-iframe").length>0:-1}function T(){if(a.wrapInner('<div class="crellyslider" />'),a.find(o+" > ul").addClass("cs-slides"),a.find(o+" "+s+" > li").addClass("cs-slide"),0==(n=A().length))return!1;if(1==n){var t=B(0),r=a.find(o).find(s);t.clone().prependTo(r),n++}if(function(){if(!i.randomOrder&&0==i.startFromSlide)return;var e=new Array,t=new Array;if(-1==i.startFromSlide){var r=Math.floor(Math.random()*n);e[0]=r,t[0]=B(r)}else e[0]=i.startFromSlide,t[0]=B(i.startFromSlide);for(var c=1;c<n;c++){if(i.randomOrder)do{r=Math.floor(Math.random()*n)}while(-1!=e.indexOf(r));else r=c+e[0]<n?c+e[0]:c+e[0]-n;e[c]=r,t[c]=B(r)}a.find(o).find(s).empty();for(var c=0;c<n;c++)a.find(o).find(s).append(t[c])}(),i.showControls&&a.find(o).append('<div class="cs-controls"><span class="cs-next"></span><span class="cs-previous"></span></div>'),i.showNavigation){for(var d='<div class="cs-navigation">',f=0;f<n;f++)d+='<span class="cs-slide-link"></span>';d+="</div>",a.find(o).append(d)}i.showProgressBar?a.find(o).append('<div class="cs-progress-bar"></div>'):a.find(o).append('<div class="cs-progress-bar cs-progress-bar-hidden"></div>'),a.css("display","block"),i.responsive&&N(),I(),A().find(".cs-background-link").html(" ").data({left:0,top:0,in:"none",out:"none",easeIn:0,easeOut:0,delay:0,time:"all"}),function(){a.find(o).find(s).css("visibility","hidden"),a.find(o).find(".cs-progress-bar").css("display","none"),a.find(o).find(".cs-navigation").css("display","none"),a.find(o).find(".cs-controls").css("display","none");var t=B(0).css("background-image");(t=t.replace(/^url\(["']?/,"").replace(/["']?\)$/,"")).match(/\.(jpeg|jpg|gif|png|bmp|tiff|tif)$/)?e("<img>").load(function(){i()}).attr("src",t).each(function(){this.complete&&e(this).load()}):i();function i(){a.find(o).append('<div class="cs-preloader"><div class="cs-bg"></div><div class="cs-loader"><div class="cs-spinner"></div></div></div>'),a.find(o).find(".cs-preloader").css({"background-color":B(l).css("background-color"),"background-image":B(l).css("background-image"),"background-position":B(l).css("background-position"),"background-repeat":B(l).css("background-repeat"),"background-size":B(l).css("background-size")}),a.find(o).find(".cs-preloader > .cs-bg").css({"background-color":B(l).css("background-color"),"background-image":B(l).css("background-image"),"background-position":B(l).css("background-position"),"background-repeat":B(l).css("background-repeat"),"background-size":B(l).css("background-size")})}}(),function(){var t=new e.Deferred,i=A().find(".cs-yt-iframe, .cs-vimeo-iframe").length,n=0;if(0==i)return t.resolve().promise();return A().find(".cs-yt-iframe, .cs-vimeo-iframe").each(function(){e(this).one("load",function(){var a,o,s,r,l;++n==i&&(o=new e.Deferred,s=A(),r=s.find(c+".cs-yt-iframe").length,l=0,0==r?o.resolve().promise():(s.each(function(){e(this).find(c+".cs-yt-iframe").each(function(){var t=e(this);t.uniqueId(),t.attr("id","cs-yt-iframe-"+t.attr("id"));var i=new YT.Player(t.attr("id"),{events:{onReady:function(){++l==r&&o.resolve()},onStateChange:function(e){e.data===YT.PlayerState.ENDED&&X(t,"loop")&&i.playVideo(),p&&(e.data===YT.PlayerState.PAUSED&&(m[t.attr("id")].manually_paused=!0),e.data===YT.PlayerState.PLAYING&&(m[t.attr("id")].manually_paused=!1))}}});a={player:i,played_once:!1,manually_paused:!1},m[t.attr("id")]=a})}),o.promise())).done(function(){var i,n,a,o,s;(n=new e.Deferred,a=A(),o=a.find(c+".cs-vimeo-iframe").length,s=0,0==o?n.resolve().promise():(a.each(function(){e(this).find(c+".cs-vimeo-iframe").each(function(){var t=e(this);t.uniqueId(),t.attr("id","cs-vimeo-iframe-"+t.attr("id")),t.attr("src",t.attr("src")+"&player_id="+t.attr("id"));var a=$f(t[0]);a.addEvent("ready",function(){a.addEvent("finish",function(){g[t.attr("id")].ended=!0}),a.addEvent("play",function(){g[t.attr("id")].played_once=!0,g[t.attr("id")].ended=!1,p&&(g[t.attr("id")].manually_paused=!1)}),a.addEvent("pause",function(){p&&(g[t.attr("id")].manually_paused=!0)}),X(t,"loop")&&a.api("setLoop",!0),++s==o&&n.resolve()}),i={player:a,played_once:!1,ended:!1,manually_paused:!1},g[t.attr("id")]=i})}),n.promise())).done(function(){t.resolve()})})})}),t.promise()}().done(function(){var t=setInterval(function(){"complete"==document.readyState&&a.find(o).find(".cs-preloader").length>0&&(clearInterval(t),function(){i.responsive&&N();I(),w=e(window).width(),A().each(function(){var t=e(this);t.find(c).each(function(){var t=e(this);t.find("*").each(function(){var t=e(this);D(t)}),D(t)}),t.css("display","none"),t.data("opacity",parseFloat(t.css("opacity")))}),i.responsive&&e(window).resize(function(){w!=e(window).width()&&("full-width"==i.layout&&x()!=e(a).width()||e(a).width()<x()||e(a).width()>x()&&x()<i.startWidth)&&_()}),a.find(o).find(".cs-controls > .cs-previous").click(function(){V(C())}),a.find(o).find(".cs-controls > .cs-next").click(function(){V(z())}),i.enableSwipe&&(a.find(o).on("swipeleft",function(){M(),V(z())}),a.find(o).on("swiperight",function(){M(),V(C())})),a.find(o).find(".cs-navigation > .cs-slide-link").click(function(){V(e(this).index())}),i.pauseOnHover&&(a.find(o).find(s).hover(function(){O()}),a.find(o).find(s).mouseleave(function(){M()})),a.find(o).find(s).css("visibility","visible"),a.find(o).find(".cs-progress-bar").css("display","block"),a.find(o).find(".cs-navigation").css("display","block"),a.find(o).find(".cs-controls").css("display","block"),ne(B(0)),B(0).finish(),a.find(o).find(".cs-preloader").animate({opacity:0},300,function(){a.find(o).find(".cs-preloader").remove()}),i.beforeStart(),i.responsive?_():F()}())},100)})}function D(e){e.data("width",parseFloat(e.width())),e.data("height",parseFloat(e.height())),e.data("letter-spacing",parseFloat(e.css("letter-spacing"))),e.data("font-size",parseFloat(e.css("font-size"))),"px"==e.css("line-height").slice(-2).toLowerCase()?e.data("line-height",parseFloat(e.css("line-height"))):"normal"==e.css("line-height")?e.data("line-height",1.15*X(e,"font-size")):e.data("line-height",parseFloat(e.css("line-height"))*X(e,"font-size")),e.data("padding-top",parseFloat(e.css("padding-top"))),e.data("padding-right",parseFloat(e.css("padding-right"))),e.data("padding-bottom",parseFloat(e.css("padding-bottom"))),e.data("padding-left",parseFloat(e.css("padding-left"))),e.data("opacity",parseFloat(e.css("opacity")))}function I(){var e,t;switch(i.layout){case"fixed":e=i.startWidth,t=i.startHeight,a.find(o).css({width:L(e),height:L(t)}),A().css({width:L(e),height:L(t)});break;case"full-width":e=a.width(),t=i.startHeight,a.find(o).css({width:e,height:L(t)}),A().css({width:e,height:L(t)});break;default:return!1}}function E(e){var t=(R()-i.startHeight)/2,n=(x()-i.startWidth)/2,a=0,o=0;return t>0&&(a=t),n>0&&(o=n),{top:a,left:o}}function _(){i.beforeSetResponsive();var t=A();Y(!0),t.each(function(){var t=e(this),i=t.find(c);t.finish(),ne(t),t.finish(),i.each(function(){var t=e(this);t.finish(),oe(t),t.finish(),$(t)&&Q(t)})}),N(),I(),t.each(function(){var t=e(this);t.find(c).each(function(){var t=e(this);t.find("*").each(function(){P(e(this))}),P(t),t.finish(),se(t),t.finish(),$(t)&&Q(t)}),t.finish(),ae(t),t.finish()}),w=e(window).width(),F()}function P(e){e.css({top:L(X(e,"top")+E().top),left:L(X(e,"left")+E().left),"padding-top":L(X(e,"padding-top")),"padding-right":L(X(e,"padding-right")),"padding-bottom":L(X(e,"padding-bottom")),"padding-left":L(X(e,"padding-left"))}),e.is("input")||e.is("button")||e.text().trim().length?e.css({"line-height":L(X(e,"line-height"))+"px","letter-spacing":L(X(e,"letter-spacing")),"font-size":L(X(e,"font-size"))}):e.css({width:L(X(e,"width")),height:L(X(e,"height"))})}function N(){var e=a.width(),t=i.startWidth;b=e>=t||!i.responsive?1:e/t}function L(e){return e*b}function F(){i.automaticSlide?function e(){j(l).done(function(){d||(l=z(),e())})}():j(l),u=!1}function Y(t){for(var i=0;i<v.length;i++)v[i].clear();for(i=0;i<y.length;i++)y[i].clear();h.clear(),A().each(function(){var i=e(this);t?i.finish():i.stop(!0,!0),i.find(c).each(function(){var i=e(this);t?i.finish():i.stop(!0,!0)})}),W()}function O(){!d&&p&&(i.beforePause(),a.find(o).find(".cs-progress-bar").stop(!0),h.pause(),d=!0)}function M(){if(d&&p){i.beforeResume();var e=a.find(o).find(".cs-progress-bar"),t=(X(B(l),"time"),h.getRemaining());e.animate({width:"100%"},t),h.resume(),d=!1}}function x(){return a.find(o).width()}function R(){return a.find(o).height()}function z(){return l+1==n?0:l+1}function C(){return l-1<0?n-1:l-1}function X(e,t){var n;switch(n=!!e.parent("ul").hasClass("cs-slides"),t){case"ease-in":return n?isNaN(parseInt(e.data(t)))?i.slidesEaseIn:parseInt(e.data(t)):isNaN(parseInt(e.data(t)))?i.elementsEaseIn:parseInt(e.data(t));case"ease-out":return n?isNaN(parseInt(e.data(t)))?i.slidesEaseOut:parseInt(e.data(t)):isNaN(parseInt(e.data(t)))?i.elementsEaseOut:parseInt(e.data(t));case"delay":return isNaN(parseInt(e.data(t)))?i.elementsDelay:parseInt(e.data(t));case"time":return n?isNaN(parseInt(e.data(t)))?i.slidesTime:parseInt(e.data(t)):"all"==e.data(t)?"all":isNaN(parseInt(e.data(t)))?i.itemsTime:parseInt(e.data(t));case"ignore-ease-out":return 1==parseInt(e.data(t))||0!=parseInt(e.data(t))&&i.ignoreElementsEaseOut;case"autoplay":return 1==parseInt(e.data(t))||0!=parseInt(e.data(t))&&i.videoAutoplay;case"loop":return 1==parseInt(e.data(t))||0!=parseInt(e.data(t))&&i.videoLoop;case"top":case"left":case"width":case"height":case"padding-top":case"padding-right":case"padding-bottom":case"padding-left":case"line-height":case"letter-spacing":case"font-size":return isNaN(parseFloat(e.data(t)))?0:parseFloat(e.data(t));case"in":case"out":case"opacity":return e.data(t);default:return!1}}function A(){return a.find(o).find(s).find(r)}function B(e){return A().eq(e)}function H(e,t){var i,n,a=t;this.pause=function(){clearTimeout(i),a-=new Date-n},this.resume=function(){n=new Date,clearTimeout(i),i=window.setTimeout(function(){e()},a)},this.clear=function(){clearTimeout(i)},this.getRemaining=function(){return a},this.resume()}function U(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function W(){var e=a.find(o).find(".cs-progress-bar");e.stop(),e.css("width",0)}function V(e){e!=l&&(p||f)&&(Y(!1),q(l,!1,!0).done(function(){l=e,F()}))}function j(t){i.beforeSlideStart();var n,s,r,d,u,b=new e.Deferred;f=!1;for(var w=0;w<v.length;w++)v[w].clear();for(w=0;w<y.length;w++)y[w].clear();return h.clear(),B(t).finish(),ae(t),B(t).finish(),B(t).find(c).each(function(){var t=e(this);t.finish(),se(t),t.finish()}),a.find(o).find(".cs-navigation").find("> .cs-slide-link").each(function(){var t=e(this);t.index()==l?t.addClass("cs-active"):t.removeClass("cs-active")}),s=B(n=t).find(c),r=0,d=!1,u=new e.Deferred,p=!1,ne(n).done(function(){var e;e=a.find(o).find(".cs-progress-bar"),W(),e.animate({width:"100%"},X(B(l),"time")),p=!0,(d=!0)&&r==s.length&&u.resolve()}),s.each(function(){var t=e(this),i=X(t,"delay");y.push(new H(function(){oe(t).done(function(){var e,i,n;$(t)&&(G(n=t)?(!X(i=n,"autoplay")||m[i.attr("id")].played_once||U()||K(i).playVideo(),2!=Z(i)||m[i.attr("id")].manually_paused||K(i).playVideo(),m[i.attr("id")].played_once=!0):(!X(e=n,"autoplay")||g[e.attr("id")].played_once||U()||te(e).api("play"),te(e).api("paused")&&!g[e.attr("id")].ended&&g[e.attr("id")].played_once&&!g[e.attr("id")].manually_paused&&te(e).api("play"))),r++,d&&r==s.length&&u.resolve()})},i))}),u.promise(),i.automaticSlide?q(t,!0,!0).done(function(){f=!0,b.resolve()}):q(t,!0,!1).done(function(){f=!0,b.resolve()}),b.promise()}function q(t,i,n){var a=B(t),o=a.find(c),s=i?X(a,"time")+X(a,"ease-in"):0,r=0,l=!1,d=new e.Deferred;return o.each(function(){var a=e(this),s=X(a,"time");if("all"!=s){var c=i?s:0;X(a,"ignore-ease-out")&&(r++,o.length==r&&l&&n&&(J(t),ae(t),d.resolve())),v.push(new H(function(){se(a).done(function(){X(a,"ignore-ease-out")||(r++,o.length==r&&l&&n&&(J(t),ae(t),d.resolve()))})},c))}}),h=new H(function(){p=!1,W(),l=!0,o.length==r&&l&&n&&(J(t),ae(t),d.resolve()),n?o.each(function(){var i=e(this);"all"==X(i,"time")&&(X(i,"ignore-ease-out")&&(r++,o.length==r&&l&&n&&(J(t),ae(t),d.resolve())),se(i).done(function(){X(i,"ignore-ease-out")||(r++,o.length==r&&l&&n&&(J(t),ae(t),d.resolve()))}))}):d.resolve()},s),d.promise()}function $(e){return G(e)||e.hasClass("cs-vimeo-iframe")}function J(t){B(t).each(function(){var t=e(this);t.find(c+".cs-yt-iframe").each(function(){ee(e(this))})}),B(t).each(function(){var t=e(this);t.find(c+".cs-vimeo-iframe").each(function(){ie(e(this))})})}function Q(e){G(e)?ee(e):ie(e)}function G(e){return e.hasClass("cs-yt-iframe")}function K(e){return m[e.attr("id")].player}function Z(e){return K(e).getPlayerState()}function ee(e){1==Z(e)&&K(e).pauseVideo()}function te(e){return g[e.attr("id")].player}function ie(e){te(e).api("pause")}function ne(t){var i=B(t),n=X(i,"in"),a=X(i,"ease-in"),o=new e.Deferred;if("block"==i.css("display"))return o.resolve().promise();if(u)return i.css({display:"block",top:0,left:0,opacity:X(i,"opacity")}),o.resolve().promise();switch(n){case"fade":i.css({display:"block",top:0,left:0,opacity:0}),i.animate({opacity:X(i,"opacity")},a,function(){o.resolve()});break;case"fadeLeft":i.css({display:"block",top:0,left:x(),opacity:0}),i.animate({opacity:X(i,"opacity"),left:0},a,function(){o.resolve()});break;case"fadeRight":i.css({display:"block",top:0,left:-x(),opacity:0}),i.animate({opacity:X(i,"opacity"),left:0},a,function(){o.resolve()});break;case"slideLeft":i.css({display:"block",top:0,left:x(),opacity:X(i,"opacity")}),i.animate({left:0},a,function(){o.resolve()});break;case"slideRight":i.css({display:"block",top:0,left:-x(),opacity:X(i,"opacity")}),i.animate({left:0},a,function(){o.resolve()});break;case"slideUp":i.css({display:"block",top:R(),left:0,opacity:X(i,"opacity")}),i.animate({top:0},a,function(){o.resolve()});break;case"slideDown":i.css({display:"block",top:-R(),left:0,opacity:X(i,"opacity")}),i.animate({top:0},a,function(){o.resolve()});break;default:i.css({display:"block",top:0,left:0,opacity:X(i,"opacity")}),o.resolve()}return o.promise()}function ae(t){var i=B(t),n=X(i,"out"),a=X(i,"ease-out"),o=new e.Deferred;if("none"==i.css("display"))return o.resolve().promise();switch(n){case"fade":i.animate({opacity:0},a,function(){i.css({display:"none",opacity:X(i,"opacity")}),o.resolve()});break;case"fadeLeft":i.animate({opacity:0,left:-x()},a,function(){i.css({display:"none",opacity:X(i,"opacity"),left:0}),o.resolve()});break;case"fadeRight":i.animate({opacity:0,left:x()},a,function(){i.css({display:"none",opacity:X(i,"opacity"),left:0}),o.resolve()});break;case"slideLeft":i.animate({left:-x()},a,function(){i.css({display:"none",left:0}),o.resolve()});break;case"slideRight":i.animate({left:x()},a,function(){i.css({display:"none",left:0}),o.resolve()});break;case"slideUp":i.animate({top:-R()},a,function(){i.css({display:"none",top:0}),o.resolve()});break;case"slideDown":i.animate({top:R()},a,function(){i.css({display:"none",top:0}),o.resolve()});break;default:i.css({display:"none"}),o.resolve()}return o.promise()}function oe(t){var i=t.outerWidth(),n=t.outerHeight(),a=X(t,"in"),o=X(t,"ease-in"),s=X(t,"top"),r=X(t,"left"),c=new e.Deferred;if("block"==t.css("display"))return c.resolve().promise();switch(a){case"slideDown":t.css({display:"block",top:-n,left:L(r+E().left),opacity:X(t,"opacity")}).animate({top:L(s+E().top)},o,function(){c.resolve()});break;case"slideUp":t.css({display:"block",top:R(),left:L(r+E().left),opacity:X(t,"opacity")}).animate({top:L(s+E().top)},o,function(){c.resolve()});break;case"slideLeft":t.css({display:"block",top:L(s+E().top),left:x(),opacity:X(t,"opacity")}).animate({left:L(r+E().left)},o,function(){c.resolve()});break;case"slideRight":t.css({display:"block",top:L(s+E().top),left:-i,opacity:X(t,"opacity")}).animate({left:L(r+E().left)},o,function(){c.resolve()});break;case"fade":t.css({display:"block",top:L(s+E().top),left:L(r+E().left),opacity:0}).animate({opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeDown":t.css({display:"block",top:-n,left:L(r+E().left),opacity:0}).animate({top:L(s+E().top),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeUp":t.css({display:"block",top:R(),left:L(r+E().left),opacity:0}).animate({top:L(s+E().top),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeLeft":t.css({display:"block",top:L(s+E().top),left:x(),opacity:0}).animate({left:L(r+E().left),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeRight":t.css({display:"block",top:L(s+E().top),left:-i,opacity:0}).animate({left:L(r+E().left),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeSmallDown":t.css({display:"block",top:L(s+E().top-30),left:L(r+E().left),opacity:0}).animate({top:L(s+E().top),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeSmallUp":t.css({display:"block",top:L(s+E().top+30),left:L(r+E().left),opacity:0}).animate({top:L(s+E().top),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeSmallLeft":t.css({display:"block",top:L(s+E().top),left:L(r+E().left+30),opacity:0}).animate({left:L(r+E().left),opacity:X(t,"opacity")},o,function(){c.resolve()});break;case"fadeSmallRight":t.css({display:"block",top:L(s+E().top),left:L(r+E().left-30),opacity:0}).animate({left:L(r+E().left),opacity:X(t,"opacity")},o,function(){c.resolve()});break;default:t.css({display:"block",top:L(s+E().top),left:L(r+E().left),opacity:X(t,"opacity")}),c.resolve()}return c.promise()}function se(t){var i=t.outerWidth(),n=t.outerHeight(),a=X(t,"out"),o=X(t,"ease-out"),s=new e.Deferred;if("none"==t.css("display"))return s.resolve().promise();switch(a){case"slideDown":t.animate({top:R()},o,function(){t.css({display:"none"}),s.resolve()});break;case"slideUp":t.animate({top:-n},o,function(){t.css({display:"none"}),s.resolve()});break;case"slideLeft":t.animate({left:-i},o,function(){t.css({display:"none"}),s.resolve()});break;case"slideRight":t.animate({left:x()},o,function(){t.css({display:"none"}),s.resolve()});break;case"fade":t.animate({opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeDown":t.animate({top:R(),opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeUp":t.animate({top:-n,opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeLeft":t.animate({left:-i,opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeRight":t.animate({left:x(),opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeSmallDown":t.animate({top:L(X(t,"top")+E().top+30),opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeSmallUp":t.animate({top:L(X(t,"top")+E().top-30),opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeSmallLeft":t.animate({left:L(X(t,"left")+E().left-30),opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;case"fadeSmallRight":t.animate({left:L(X(t,"left")+E().left+30),opacity:0},o,function(){t.css({display:"none",opacity:X(t,"opacity")}),s.resolve()});break;default:t.css({display:"none"}),s.resolve()}return s.promise()}this.resume=function(){M()},this.pause=function(){O()},this.nextSlide=function(){V(z())},this.previousSlide=function(){V(C())},this.changeSlide=function(e){V(e)},this.getCurrentSlide=function(){return l},this.getTotalSlides=function(){return n}},e.fn.crellySlider=function(t){var i=e.extend({layout:"fixed",responsive:!0,startWidth:1140,startHeight:500,pauseOnHover:!0,automaticSlide:!0,randomOrder:!0,startFromSlide:0,showControls:!0,showNavigation:!0,showProgressBar:!0,enableSwipe:!0,slidesTime:3e3,elementsDelay:0,elementsTime:"all",slidesEaseIn:300,elementsEaseIn:300,slidesEaseOut:300,elementsEaseOut:300,ignoreElementsEaseOut:!1,videoAutoplay:!1,videoLoop:!1,beforeStart:function(){},beforeSetResponsive:function(){},beforeSlideStart:function(){},beforePause:function(){},beforeResume:function(){}},t);return this.each(function(){if(null==e(this).data("crellySlider")){var t=new e.CrellySlider(this,i);e(this).data("crellySlider",t)}})}}(jQuery);
2
  * Plugin Name: Crelly Slider
3
  * Plugin URI: https://wordpress.org/plugins/crelly-slider/
4
  * Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations.
5
+ * Version: 1.4.4
6
  * Author: Fabio Rinaldi
7
  * Author URI: https://github.com/fabiorino
8
  * License: MIT
9
  */
10
 
11
+ var crellyslider_youtube_api_ready=!1,crellyslider_vimeo_api_ready=!1;!function(ce){var e;function le(){var s,o,r;o=!(s={}),r="*",t.fn=t.prototype={element:null,init:function(e){return"string"==typeof e&&(e=document.getElementById(e)),this.element=e,this},api:function(e,t){if(!this.element||!e)return!1;var i=this.element,a=""!==i.id?i.id:null,n=t&&t.constructor&&t.call&&t.apply?null:t,s=t&&t.constructor&&t.call&&t.apply?t:null;return s&&l(e,s,a),c(e,n,i),this},addEvent:function(e,t){if(!this.element)return!1;var i=this.element,a=""!==i.id?i.id:null;return l(e,t,a),"ready"!=e?c("addEventListener",e,i):"ready"==e&&o&&t.call(null,a),this},removeEvent:function(e){if(!this.element)return!1;var t=this.element,i=""!==t.id?t.id:null;e:{if(i&&s[i]){if(!s[i][e]){i=!1;break e}s[i][e]=null}else{if(!s[e]){i=!1;break e}s[e]=null}i=!0}"ready"!=e&&i&&c("removeEventListener",e,t)}},t.fn.init.prototype=t.fn,window.addEventListener?window.addEventListener("message",e,!1):window.attachEvent("onmessage",e),window.Froogaloop=window.$f=t;function t(e){return new t.fn.init(e)}function c(e,t,i){i.contentWindow.postMessage&&(e=JSON.stringify({method:e,value:t}),i.contentWindow.postMessage(e,r))}function e(e){try{n=(a=JSON.parse(e.data)).event||a.method}catch(e){}if("ready"!=n||o||(o=!0),!/^https?:\/\/player.vimeo.com/.test(e.origin))return!1;"*"===r&&(r=e.origin),e=a.value;var t=a.data,i=""===i?null:a.player_id,a=i?s[i][n]:s[n],n=[];return!!a&&(void 0!==e&&n.push(e),t&&n.push(t),i&&n.push(i),0<n.length?a.apply(null,n):a.call())}function l(e,t,i){i?(s[i]||(s[i]={}),s[i][e]=t):s[e]=t}crellyslider_vimeo_api_ready=!0}e=function(n){var e,t,i,a=window.PointerEvent?(e="pointerdown",t="pointermove",i="pointerup","pointercancel"):window.MSPointerEvent?(e="MSPointerDown",t="MSPointerMove",i="MSPointerUp","MSPointerCancel"):(e="touchstart",t="touchmove",i="touchend","touchcancel"),s={},o={},r=500,c=64,l=!1;function d(e){l&&console.info(e.type),void 0!==e.isPrimary&&!1===e.isPrimary||void 0!==e.touches&&1<e.touches.length||(s.t=(new Date).getTime(),void 0!==e.touches?(s.x=e.touches[0].pageX,s.y=e.touches[0].pageY):void 0!==e.pageX&&(s.x=e.pageX,s.y=e.pageY),o.x=s.x,o.y=s.y,this.addEventListener(t,p,!1),this.addEventListener(i,f,!1),this.addEventListener(a,u,!1))}function p(e){l&&console.info(e.type),void 0!==e.touches?(o.x=e.touches[0].pageX,o.y=e.touches[0].pageY):void 0!==e.pageX&&(o.x=e.pageX,o.y=e.pageY);var t=(new Date).getTime()-s.t,i=o.x-s.x,a=o.y-s.y;r<t?h(this):c<i&&Math.abs(a)<c?(l&&console.info("swiperight"),n(this).trigger("swipe","right").trigger("swiperight"),h(this)):c<-i&&Math.abs(a)<c?(l&&console.info("swipeleft"),n(this).trigger("swipe","left").trigger("swipeleft"),h(this)):16<Math.abs(i)&&Math.abs(i)>Math.abs(a)?(l&&console.log("Horizontal swipe started"),e.preventDefault()):8<Math.abs(a)&&Math.abs(a)>Math.abs(i)&&(l&&console.log("Vertical swipe started"),h(this))}function f(e){l&&console.info(e.type),h(this)}function u(e){l&&console.info(e.type),h(this)}function h(e){e.removeEventListener(t,p),e.removeEventListener(i,f),e.removeEventListener(a,f)}n.event.special.swipe={setup:function(){this.addEventListener(e,d,!1)}},n.each(["left","right"],function(){n.event.special["swipe"+this]={setup:function(){n(this).on("swipe",n.noop)}}})},"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery),ce.CrellySlider=function(e,l){var n,t,d=ce(e),p="div.crellyslider",s="ul.cs-slides",i="li.cs-slide",f="> *",u=0,a=!1,h=!1,y=0,c=!1,o=!0,v=new H(function(){},0),m=new Array,g=new Array,b={},w={},r=1,k=0;function S(e){return"youtube"==e?0<d.find(".cs-yt-iframe").length:"vimeo"!=e||0<d.find(".cs-vimeo-iframe").length}function E(){if(d.wrapInner('<div class="crellyslider" />'),d.find(p+" > ul").addClass("cs-slides"),d.find(p+" "+s+" > li").addClass("cs-slide"),0!=(n=A().length)){var e,t,o,r,c;if(1==n&&(e=U(0),t=d.find(p).find(s),e.clone().prependTo(t),n++),function(){if(!l.randomOrder&&0==l.startFromSlide)return;var e=new Array,t=new Array;{-1==l.startFromSlide?(i=Math.floor(Math.random()*n),e[0]=i,t[0]=U(i)):(e[0]=l.startFromSlide,t[0]=U(l.startFromSlide))}for(var i,a=1;a<n;a++){if(l.randomOrder)for(;i=Math.floor(Math.random()*n),-1!=e.indexOf(i););else i=a+e[0]<n?a+e[0]:a+e[0]-n;e[a]=i,t[a]=U(i)}d.find(p).find(s).empty();for(a=0;a<n;a++)d.find(p).find(s).append(t[a])}(),l.showControls&&d.find(p).append('<div class="cs-controls"><span class="cs-next"></span><span class="cs-previous"></span></div>'),l.showNavigation){for(var i='<div class="cs-navigation">',a=0;a<n;a++)i+='<span class="cs-slide-link"></span>';i+="</div>",d.find(p).append(i)}l.showProgressBar?d.find(p).append('<div class="cs-progress-bar"></div>'):d.find(p).append('<div class="cs-progress-bar cs-progress-bar-hidden"></div>'),d.css("display","block"),l.responsive&&N(),_(),A().find(".cs-background-link").html(" ").data({left:0,top:0,in:"none",out:"none",easeIn:0,easeOut:0,delay:0,time:"all"}),function(){d.find(p).find(s).css("visibility","hidden"),d.find(p).find(".cs-progress-bar").css("display","none"),d.find(p).find(".cs-navigation").css("display","none"),d.find(p).find(".cs-controls").css("display","none");var e=U(0).css("background-image");(e=e.replace(/^url\(["']?/,"").replace(/["']?\)$/,"")).match(/\.(jpeg|jpg|gif|png|bmp|tiff|tif)$/)?ce("<img>").on("load",function(){t()}).attr("src",e).each(function(){this.complete&&ce(this).load()}):t();function t(){d.find(p).append('<div class="cs-preloader"><div class="cs-bg"></div><div class="cs-loader"><div class="cs-spinner"></div></div></div>'),d.find(p).find(".cs-preloader").css({"background-color":U(u).css("background-color"),"background-image":U(u).css("background-image"),"background-position":U(u).css("background-position"),"background-repeat":U(u).css("background-repeat"),"background-size":U(u).css("background-size")}),d.find(p).find(".cs-preloader > .cs-bg").css({"background-color":U(u).css("background-color"),"background-image":U(u).css("background-image"),"background-position":U(u).css("background-position"),"background-repeat":U(u).css("background-repeat"),"background-size":U(u).css("background-size")})}}(),o=new ce.Deferred,r=A().find(".cs-yt-iframe, .cs-vimeo-iframe").length,((c=0)!=r?(A().find(".cs-yt-iframe, .cs-vimeo-iframe").each(function(){ce(this).one("load",function(){var i,a,e,n,s;++c==r&&(a=new ce.Deferred,e=A(),n=e.find(f+".cs-yt-iframe").length,((s=0)!=n?(e.each(function(){ce(this).find(f+".cs-yt-iframe").each(function(){var t=ce(this);t.uniqueId(),t.attr("id","cs-yt-iframe-"+t.attr("id"));var e=new YT.Player(t.attr("id"),{events:{onReady:function(){W(t,"start-mute")&&e.mute(),++s==n&&a.resolve()},onStateChange:function(e){h&&(e.data===YT.PlayerState.PAUSED&&(b[t.attr("id")].manually_paused=!0),e.data===YT.PlayerState.PLAYING&&(b[t.attr("id")].manually_paused=!1)),e.data===YT.PlayerState.PLAYING?W(t,"pause-while-watching")&&(y=!0,F()):e.data!==YT.PlayerState.PAUSED&&e.data!==YT.PlayerState.ENDED||ae()||(y=!1,O())}}});i={player:e,played_once:!1,manually_paused:!1},b[t.attr("id")]=i})}),a.promise()):a.resolve().promise()).done(function(){var i,a,e,n,s;a=new ce.Deferred,e=A(),n=e.find(f+".cs-vimeo-iframe").length,((s=0)!=n?(e.each(function(){ce(this).find(f+".cs-vimeo-iframe").each(function(){var e=ce(this);e.uniqueId(),e.attr("id","cs-vimeo-iframe-"+e.attr("id")),e.attr("src",e.attr("src")+"&player_id="+e.attr("id"));var t=$f(e[0]);t.addEvent("ready",function(){W(e,"start-mute")&&t.api("setVolume",0),t.addEvent("finish",function(){w[e.attr("id")].ended=!0,w[e.attr("id")].playing=!1,ae()||(y=!1,O())}),t.addEvent("play",function(){w[e.attr("id")].played_once=!0,w[e.attr("id")].ended=!1,w[e.attr("id")].playing=!0,h&&(w[e.attr("id")].manually_paused=!1),W(e,"pause-while-watching")&&(y=!0,F())}),t.addEvent("pause",function(){h&&(w[e.attr("id")].manually_paused=!0),w[e.attr("id")].playing=!1,ae()||(y=!1,O())}),W(e,"loop")&&t.api("setLoop",!0),++s==n&&a.resolve()}),i={player:t,played_once:!1,ended:!1,manually_paused:!1,playing:!1},w[e.attr("id")]=i})}),a.promise()):a.resolve().promise()).done(function(){o.resolve()})}))})}),o.promise()):o.resolve().promise()).done(function(){var e=setInterval(function(){"complete"==document.readyState&&0<d.find(p).find(".cs-preloader").length&&(clearInterval(e),function(){l.responsive&&N();_(),k=ce(window).width(),A().each(function(){var e=ce(this);e.find(f).each(function(){var e=ce(this);e.find("*").each(function(){I(ce(this))}),I(e)}),e.css("display","none"),e.data("opacity",parseFloat(e.css("opacity")))}),function(){l.responsive&&ce(window).on("resize",function(){k!=ce(window).width()&&("full-width"==l.layout&&R()!=ce(d).width()||ce(d).width()<R()||ce(d).width()>R()&&R()<l.startWidth)&&D()});d.find(p).find(".cs-controls > .cs-previous").on("click",function(){q(z())}),d.find(p).find(".cs-controls > .cs-next").on("click",function(){q(C())}),d.find(p).on("dragstart",function(e){return e.stopPropagation(),!1}),l.enableSwipe&&(d.find(p).on("swipeleft",function(){O(),q(C())}),d.find(p).on("swiperight",function(){O(),q(z())}));d.find(p).find(".cs-navigation > .cs-slide-link").on("click",function(){q(ce(this).index())}),l.pauseOnHover&&(d.find(p).find(s).on("mouseenter",function(){0==y&&F()}),d.find(p).find(s).on("mouseleave",function(){0==y&&O()}))}(),d.find(p).find(s).css("visibility","visible"),d.find(p).find(".cs-progress-bar").css("display","block"),d.find(p).find(".cs-navigation").css("display","block"),d.find(p).find(".cs-controls").css("display","block"),ne(U(0)),U(0).finish(),d.find(p).find(".cs-preloader").animate({opacity:0},300,function(){d.find(p).find(".cs-preloader").remove()}),l.beforeStart(),(l.responsive?D:T)()}())},100)})}}function I(e){e.data("width",parseFloat(e.width())),e.data("height",parseFloat(e.height())),e.data("letter-spacing",parseFloat(e.css("letter-spacing"))),e.data("font-size",parseFloat(e.css("font-size"))),"px"==e.css("line-height").slice(-2).toLowerCase()?e.data("line-height",parseFloat(e.css("line-height"))):"normal"==e.css("line-height")?e.data("line-height",1.15*W(e,"font-size")):e.data("line-height",parseFloat(e.css("line-height"))*W(e,"font-size")),e.data("padding-top",parseFloat(e.css("padding-top"))),e.data("padding-right",parseFloat(e.css("padding-right"))),e.data("padding-bottom",parseFloat(e.css("padding-bottom"))),e.data("padding-left",parseFloat(e.css("padding-left"))),e.data("opacity",parseFloat(e.css("opacity")))}function _(){var e,t;switch(l.layout){case"fixed":e=l.startWidth,t=l.startHeight,d.find(p).css({width:e*r,height:t*r}),A().css({width:e*r,height:t*r});break;case"full-width":e=d.width(),t=l.startHeight,d.find(p).css({width:e,height:t*r}),A().css({width:e,height:t*r});break;default:return}}function P(){var e=(Y()-l.startHeight)/2,t=(R()-l.startWidth)/2,i=0,a=0;return 0<e&&(i=e),0<t&&(a=t),{top:i,left:a}}function D(){l.beforeSetResponsive();var e=A();x(!0),e.each(function(){var e=ce(this),t=e.find(f);e.finish(),ne(e),e.finish(),t.each(function(){var e=ce(this);e.finish(),oe(e),e.finish(),$(e)&&J(e)})}),N(),_(),e.each(function(){var e=ce(this);e.find(f).each(function(){var e=ce(this);e.find("*").each(function(){L(ce(this))}),L(e),e.finish(),re(e),e.finish(),$(e)&&J(e)}),e.finish(),se(e),e.finish()}),k=ce(window).width(),T()}function L(e){e.css({top:M(W(e,"top")+P().top),left:M(W(e,"left")+P().left),"padding-top":M(W(e,"padding-top")),"padding-right":M(W(e,"padding-right")),"padding-bottom":M(W(e,"padding-bottom")),"padding-left":M(W(e,"padding-left"))}),e.is("input")||e.is("button")||e.text().trim().length?e.css({"line-height":M(W(e,"line-height"))+"px","letter-spacing":M(W(e,"letter-spacing")),"font-size":M(W(e,"font-size"))}):e.css({width:M(W(e,"width")),height:M(W(e,"height"))})}function N(){var e=d.width(),t=l.startWidth;r=t<=e||!l.responsive?1:e/t}function M(e){return e*r}function T(){l.automaticSlide?function e(){X(u).done(function(){a||(u=C(),e())})}():X(u),o=!1}function x(t){for(var e=0;e<m.length;e++)m[e].clear();for(e=0;e<g.length;e++)g[e].clear();v.clear(),A().each(function(){var e=ce(this);t?e.finish():e.stop(!0,!0),e.find(f).each(function(){var e=ce(this);t?e.finish():e.stop(!0,!0)})}),B()}function F(){!a&&h&&(l.beforePause(),d.find(p).find(".cs-progress-bar").stop(!0),v.pause(),a=!0)}function O(){var e,t;a&&h&&(l.beforeResume(),e=d.find(p).find(".cs-progress-bar"),W(U(u),"time"),t=v.getRemaining(),e.animate({width:"100%"},t),v.resume(),a=!1)}function R(){return d.find(p).width()}function Y(){return d.find(p).height()}function C(){return u+1==n?0:u+1}function z(){return u-1<0?n-1:u-1}function W(e,t){var i=!!e.parent("ul").hasClass("cs-slides");switch(t){case"ease-in":return i?isNaN(parseInt(e.data(t)))?l.slidesEaseIn:parseInt(e.data(t)):isNaN(parseInt(e.data(t)))?l.elementsEaseIn:parseInt(e.data(t));case"ease-out":return i?isNaN(parseInt(e.data(t)))?l.slidesEaseOut:parseInt(e.data(t)):isNaN(parseInt(e.data(t)))?l.elementsEaseOut:parseInt(e.data(t));case"delay":return isNaN(parseInt(e.data(t)))?l.elementsDelay:parseInt(e.data(t));case"time":return i?isNaN(parseInt(e.data(t)))?l.slidesTime:parseInt(e.data(t)):"all"==e.data(t)?"all":isNaN(parseInt(e.data(t)))?l.itemsTime:parseInt(e.data(t));case"ignore-ease-out":return 1==parseInt(e.data(t))?!0:0!=parseInt(e.data(t))&&l.ignoreElementsEaseOut;case"autoplay":return 1==parseInt(e.data(t))?!0:0!=parseInt(e.data(t))&&l.videoAutoplay;case"loop":return 1==parseInt(e.data(t))?!0:0!=parseInt(e.data(t))&&l.videoLoop;case"start-mute":return 1==parseInt(e.data(t))?!0:0!=parseInt(e.data(t))&&l.videoStartMute;case"pause-while-watching":return 1==parseInt(e.data(t))?!0:0!=parseInt(e.data(t))&&l.videoPauseWhileWatching;case"top":case"left":case"width":case"height":case"padding-top":case"padding-right":case"padding-bottom":case"padding-left":case"line-height":case"letter-spacing":case"font-size":return isNaN(parseFloat(e.data(t)))?0:parseFloat(e.data(t));case"in":case"out":case"opacity":return e.data(t);default:return!1}}function A(){return d.find(p).find(s).find(i)}function U(e){return A().eq(e)}function H(e,t){var i,a,n=t;this.pause=function(){clearTimeout(i),n-=new Date-a},this.resume=function(){a=new Date,clearTimeout(i),i=window.setTimeout(function(){e()},n)},this.clear=function(){clearTimeout(i)},this.getRemaining=function(){return n},this.resume()}function j(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function B(){var e=d.find(p).find(".cs-progress-bar");e.stop(),e.css("width",0)}function q(e){e!=u&&(h||c)&&(x(!1),V(u,!1,!0).done(function(){u=e,T()}))}function X(e){l.beforeSlideStart();var t=new ce.Deferred;c=!1;for(var i=0;i<m.length;i++)m[i].clear();for(var a,n,s,o,r,i=0;i<g.length;i++)g[i].clear();return v.clear(),U(e).finish(),se(e),U(e).finish(),U(e).find(f).each(function(){var e=ce(this);e.finish(),re(e),e.finish()}),d.find(p).find(".cs-navigation").find("> .cs-slide-link").each(function(){var e=ce(this);e.index()==u?e.addClass("cs-active"):e.removeClass("cs-active")}),n=U(a=e).find(f),s=0,o=!1,r=new ce.Deferred,h=!1,ne(a).done(function(){var e;e=d.find(p).find(".cs-progress-bar"),B(),e.animate({width:"100%"},W(U(u),"time")),o=h=!0,s==n.length&&r.resolve()}),n.each(function(){var t=ce(this),e=W(t,"delay");g.push(new H(function(){oe(t).done(function(){var e;$(t)&&(Q(e=t)?function(e){!W(e,"autoplay")||b[e.attr("id")].played_once||j()||K(e).playVideo(),2!=Z(e)||b[e.attr("id")].manually_paused||K(e).playVideo(),b[e.attr("id")].played_once=!0}:function(e){!W(e,"autoplay")||w[e.attr("id")].played_once||j()||te(e).api("play"),te(e).api("paused")&&!w[e.attr("id")].ended&&w[e.attr("id")].played_once&&!w[e.attr("id")].manually_paused&&te(e).api("play")})(e),s++,o&&s==n.length&&r.resolve()})},e))}),r.promise(),l.automaticSlide?V(e,!0,!0).done(function(){c=!0,t.resolve()}):V(e,!0,!1).done(function(){c=!0,t.resolve()}),t.promise()}function V(a,n,s){var e=U(a),o=e.find(f),t=n?W(e,"time")+W(e,"ease-in"):0,r=0,c=!1,l=new ce.Deferred;return o.each(function(){var e,t=ce(this),i=W(t,"time");"all"!=i&&(e=n?i:0,W(t,"ignore-ease-out")&&(r++,o.length==r&&c&&s&&(G(a),se(a),l.resolve())),m.push(new H(function(){re(t).done(function(){W(t,"ignore-ease-out")||(r++,o.length==r&&c&&s&&(G(a),se(a),l.resolve()))})},e)))}),v=new H(function(){h=!1,B(),c=!0,o.length==r&&c&&s&&(G(a),se(a),l.resolve()),s?o.each(function(){var e=ce(this);"all"==W(e,"time")&&(W(e,"ignore-ease-out")&&(r++,o.length==r&&c&&s&&(G(a),se(a),l.resolve())),re(e).done(function(){W(e,"ignore-ease-out")||(r++,o.length==r&&c&&s&&(G(a),se(a),l.resolve()))}))}):l.resolve()},t),l.promise()}function $(e){return Q(e)||e.hasClass("cs-vimeo-iframe")}function G(e){U(e).each(function(){ce(this).find(f+".cs-yt-iframe").each(function(){ee(ce(this))})}),U(e).each(function(){ce(this).find(f+".cs-vimeo-iframe").each(function(){ie(ce(this))})})}function J(e){(Q(e)?ee:ie)(e)}function Q(e){return e.hasClass("cs-yt-iframe")}function K(e){return b[e.attr("id")].player}function Z(e){return K(e).getPlayerState()}function ee(e){1==Z(e)&&K(e).pauseVideo()}function te(e){return w[e.attr("id")].player}function ie(e){te(e).api("pause")}function ae(){var t=!1;return U(u).find(f+".cs-yt-iframe").each(function(){var e;t||W(e=ce(this),"pause-while-watching")&&1==Z(e)&&(t=!0)}),t||(U(u).find(f+".cs-vimeo-iframe").each(function(){var e;t||W(e=ce(this),"pause-while-watching")&&w[e.attr("id")].playing&&(t=!0)}),t)}function ne(e){var t=U(e),i=W(t,"in"),a=W(t,"ease-in"),n=new ce.Deferred;if("block"==t.css("display"))return n.resolve().promise();if(o)return t.css({display:"block",top:0,left:0,opacity:W(t,"opacity")}),n.resolve().promise();switch(i){case"fade":t.css({display:"block",top:0,left:0,opacity:0}),t.animate({opacity:W(t,"opacity")},a,function(){n.resolve()});break;case"fadeLeft":t.css({display:"block",top:0,left:R(),opacity:0}),t.animate({opacity:W(t,"opacity"),left:0},a,function(){n.resolve()});break;case"fadeRight":t.css({display:"block",top:0,left:-R(),opacity:0}),t.animate({opacity:W(t,"opacity"),left:0},a,function(){n.resolve()});break;case"slideLeft":t.css({display:"block",top:0,left:R(),opacity:W(t,"opacity")}),t.animate({left:0},a,function(){n.resolve()});break;case"slideRight":t.css({display:"block",top:0,left:-R(),opacity:W(t,"opacity")}),t.animate({left:0},a,function(){n.resolve()});break;case"slideUp":t.css({display:"block",top:Y(),left:0,opacity:W(t,"opacity")}),t.animate({top:0},a,function(){n.resolve()});break;case"slideDown":t.css({display:"block",top:-Y(),left:0,opacity:W(t,"opacity")}),t.animate({top:0},a,function(){n.resolve()});break;default:t.css({display:"block",top:0,left:0,opacity:W(t,"opacity")}),n.resolve()}return n.promise()}function se(e){var t=U(e),i=W(t,"out"),a=W(t,"ease-out"),n=new ce.Deferred;if("none"==t.css("display"))return n.resolve().promise();switch(i){case"fade":t.animate({opacity:0},a,function(){t.css({display:"none",opacity:W(t,"opacity")}),n.resolve()});break;case"fadeLeft":t.animate({opacity:0,left:-R()},a,function(){t.css({display:"none",opacity:W(t,"opacity"),left:0}),n.resolve()});break;case"fadeRight":t.animate({opacity:0,left:R()},a,function(){t.css({display:"none",opacity:W(t,"opacity"),left:0}),n.resolve()});break;case"slideLeft":t.animate({left:-R()},a,function(){t.css({display:"none",left:0}),n.resolve()});break;case"slideRight":t.animate({left:R()},a,function(){t.css({display:"none",left:0}),n.resolve()});break;case"slideUp":t.animate({top:-Y()},a,function(){t.css({display:"none",top:0}),n.resolve()});break;case"slideDown":t.animate({top:Y()},a,function(){t.css({display:"none",top:0}),n.resolve()});break;default:t.css({display:"none"}),n.resolve()}return n.promise()}function oe(e){var t=e.outerWidth(),i=e.outerHeight(),a=W(e,"in"),n=W(e,"ease-in"),s=W(e,"top"),o=W(e,"left"),r=new ce.Deferred;if("block"==e.css("display"))return r.resolve().promise();switch(a){case"slideDown":e.css({display:"block",top:-i,left:M(o+P().left),opacity:W(e,"opacity")}).animate({top:M(s+P().top)},n,function(){r.resolve()});break;case"slideUp":e.css({display:"block",top:Y(),left:M(o+P().left),opacity:W(e,"opacity")}).animate({top:M(s+P().top)},n,function(){r.resolve()});break;case"slideLeft":e.css({display:"block",top:M(s+P().top),left:R(),opacity:W(e,"opacity")}).animate({left:M(o+P().left)},n,function(){r.resolve()});break;case"slideRight":e.css({display:"block",top:M(s+P().top),left:-t,opacity:W(e,"opacity")}).animate({left:M(o+P().left)},n,function(){r.resolve()});break;case"fade":e.css({display:"block",top:M(s+P().top),left:M(o+P().left),opacity:0}).animate({opacity:W(e,"opacity")},n,function(){r.resolve()});break;case"fadeDown":e.css({display:"block",top:-i,left:M(o+P().left),opacity:0}).animate({top:M(s+P().top),opacity:W(e,"opacity")},n,function(){r.resolve()});break;case"fadeUp":e.css({display:"block",top:Y(),left:M(o+P().left),opacity:0}).animate({top:M(s+P().top),opacity:W(e,"opacity")},n,function(){r.resolve()});break;case"fadeLeft":e.css({display:"block",top:M(s+P().top),left:R(),opacity:0}).animate({left:M(o+P().left),opacity:W(e,"opacity")},n,function(){r.resolve()});break;case"fadeRight":e.css({display:"block",top:M(s+P().top),left:-t,opacity:0}).animate({left:M(o+P().left),opacity:W(e,"opacity")},n,function(){r.resolve()});break;case"fadeSmallDown":e.css({display:"block",top:M(s+P().top-30),left:M(o+P().left),opacity:0}).animate({top:M(s+P().top),opacity:W(e,"opacity")},n,function(){r.resolve()});break;case"fadeSmallUp":e.css({display:"block",top:M(s+P().top+30),left:M(o+P().left),opacity:0}).animate({top:M(s+P().top),opacity:W(e,"opacity")},n,function(){r.resolve()});break;case"fadeSmallLeft":e.css({display:"block",top:M(s+P().top),left:M(o+P().left+30),opacity:0}).animate({left:M(o+P().left),opacity:W(e,"opacity")},n,function(){r.resolve()});break;case"fadeSmallRight":e.css({display:"block",top:M(s+P().top),left:M(o+P().left-30),opacity:0}).animate({left:M(o+P().left),opacity:W(e,"opacity")},n,function(){r.resolve()});break;default:e.css({display:"block",top:M(s+P().top),left:M(o+P().left),opacity:W(e,"opacity")}),r.resolve()}return r.promise()}function re(e){var t=e.outerWidth(),i=e.outerHeight(),a=W(e,"out"),n=W(e,"ease-out"),s=new ce.Deferred;if("none"==e.css("display"))return s.resolve().promise();switch(a){case"slideDown":e.animate({top:Y()},n,function(){e.css({display:"none"}),s.resolve()});break;case"slideUp":e.animate({top:-i},n,function(){e.css({display:"none"}),s.resolve()});break;case"slideLeft":e.animate({left:-t},n,function(){e.css({display:"none"}),s.resolve()});break;case"slideRight":e.animate({left:R()},n,function(){e.css({display:"none"}),s.resolve()});break;case"fade":e.animate({opacity:0},n,function(){e.css({display:"none",opacity:W(e,"opacity")}),s.resolve()});break;case"fadeDown":e.animate({top:Y(),opacity:0},n,function(){e.css({display:"none",opacity:W(e,"opacity")}),s.resolve()});break;case"fadeUp":e.animate({top:-i,opacity:0},n,function(){e.css({display:"none",opacity:W(e,"opacity")}),s.resolve()});break;case"fadeLeft":e.animate({left:-t,opacity:0},n,function(){e.css({display:"none",opacity:W(e,"opacity")}),s.resolve()});break;case"fadeRight":e.animate({left:R(),opacity:0},n,function(){e.css({display:"none",opacity:W(e,"opacity")}),s.resolve()});break;case"fadeSmallDown":e.animate({top:M(W(e,"top")+P().top+30),opacity:0},n,function(){e.css({display:"none",opacity:W(e,"opacity")}),s.resolve()});break;case"fadeSmallUp":e.animate({top:M(W(e,"top")+P().top-30),opacity:0},n,function(){e.css({display:"none",opacity:W(e,"opacity")}),s.resolve()});break;case"fadeSmallLeft":e.animate({left:M(W(e,"left")+P().left-30),opacity:0},n,function(){e.css({display:"none",opacity:W(e,"opacity")}),s.resolve()});break;case"fadeSmallRight":e.animate({left:M(W(e,"left")+P().left+30),opacity:0},n,function(){e.css({display:"none",opacity:W(e,"opacity")}),s.resolve()});break;default:e.css({display:"none"}),s.resolve()}return s.promise()}!crellyslider_youtube_api_ready&&S("youtube")&&function(){var e=document.createElement("script");e.src="https://www.youtube.com/iframe_api";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t),crellyslider_youtube_api_ready=!0}(),!crellyslider_vimeo_api_ready&&S("vimeo")&&le(),!crellyslider_youtube_api_ready||"undefined"!=typeof YT&&void 0!==YT.Player?E():t=setInterval(function(){"undefined"!=typeof YT&&void 0!==YT.Player&&(clearInterval(t),E())},100),this.resume=function(){O()},this.pause=function(){F()},this.nextSlide=function(){q(C())},this.previousSlide=function(){q(z())},this.changeSlide=function(e){q(e)},this.getCurrentSlide=function(){return u},this.getTotalSlides=function(){return n}},ce.fn.crellySlider=function(e){var t=ce.extend({layout:"fixed",responsive:!0,startWidth:1140,startHeight:500,pauseOnHover:!0,automaticSlide:!0,randomOrder:!0,startFromSlide:0,showControls:!0,showNavigation:!0,showProgressBar:!0,enableSwipe:!0,slidesTime:3e3,elementsDelay:0,elementsTime:"all",slidesEaseIn:300,elementsEaseIn:300,slidesEaseOut:300,elementsEaseOut:300,ignoreElementsEaseOut:!1,videoAutoplay:!1,videoLoop:!1,videoStartMute:!1,videoPauseWhileWatching:!0,beforeStart:function(){},beforeSetResponsive:function(){},beforeSlideStart:function(){},beforePause:function(){},beforeResume:function(){}},e);return this.each(function(){var e;null==ce(this).data("crellySlider")&&(e=new ce.CrellySlider(this,t),ce(this).data("crellySlider",e))})}}(jQuery);
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: fabiorino
3
  Donate link: http://crellyslider.altervista.org/contribute-and-support/
4
  Tags: slider, layers, animations, transitions, texts, images, videos
5
  Requires at least: 4.6
6
- Tested up to: 5.5
7
- Stable tag: 1.4.3
8
  License: MIT
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -54,6 +54,10 @@ You can find the documentation <a href="http://crellyslider.altervista.org/docum
54
 
55
  == Changelog ==
56
 
 
 
 
 
57
  = 1.4.3 =
58
  * Fixed compatibility issue with WordPress 5.5 due to the use of a deprecated jQuery function.
59
 
3
  Donate link: http://crellyslider.altervista.org/contribute-and-support/
4
  Tags: slider, layers, animations, transitions, texts, images, videos
5
  Requires at least: 4.6
6
+ Tested up to: 5.6
7
+ Stable tag: 1.4.4
8
  License: MIT
9
  License URI: http://opensource.org/licenses/MIT
10
 
54
 
55
  == Changelog ==
56
 
57
+ = 1.4.4 =
58
+ * Fixed JavaScript fatal error in WordPress 5.6.
59
+ * Removed deprecated JavaScript code.
60
+
61
  = 1.4.3 =
62
  * Fixed compatibility issue with WordPress 5.5 due to the use of a deprecated jQuery function.
63
 
wordpress/js/admin.js CHANGED
@@ -29,7 +29,7 @@
29
  /*************/
30
 
31
  (function($) {
32
- $(window).load(function() {
33
 
34
  // Simulate keyup. Useful when textboxes change value
35
  function crellyslider_keyup(element) {
@@ -37,11 +37,11 @@
37
  }
38
 
39
  // Slider settings and slide tabs
40
- $('#cs-show-slider-settings').click(function() {
41
  $('#cs-slider-settings').fadeIn();
42
  $('#cs-slides').hide();
43
  });
44
- $('#cs-show-slides').click(function() {
45
  $('#cs-slides').fadeIn();
46
  $('#cs-slider-settings').hide();
47
  });
@@ -273,7 +273,7 @@
273
 
274
  // Open the tab just created
275
  var tab_index = add_btn.parent().index() - 1;
276
- $('.cs-admin #cs-slides .cs-slide-tabs > ul > li').eq(tab_index).find('a').click();
277
 
278
  // Active class
279
  $('.cs-admin #cs-slides .cs-slide-tabs > ul > li').removeClass('active');
@@ -289,7 +289,7 @@
289
  }
290
 
291
  // Add new on click
292
- $('.cs-admin #cs-slides .cs-add-new').click(function() {
293
  crellyslider_addSlide();
294
  });
295
  // Also add a new slide if slides_number == 0
@@ -302,7 +302,7 @@
302
  }
303
  }
304
  else {
305
- $('.cs-admin #cs-slides .cs-slide-tabs > ul > li').eq(0).find('a').click();
306
  }
307
 
308
  // Delete
@@ -559,7 +559,7 @@
559
  });
560
 
561
  // Background presets
562
- $('.cs-slide-background-image-fullwidth-preset').click(function() {
563
  var text = $(this);
564
  var area = text.closest('.cs-slide').find('.cs-elements .cs-slide-editing-area');
565
  var settings = text.closest('.cs-slide');
@@ -577,7 +577,7 @@
577
  crellyslider_keyup(settings.find('.cs-slide-background_propriety_size'));
578
  });
579
 
580
- $('.cs-slide-background-image-pattern-preset').click(function() {
581
  var text = $(this);
582
  var area = text.closest('.cs-slide').find('.cs-elements .cs-slide-editing-area');
583
  var settings = text.closest('.cs-slide');
@@ -1325,7 +1325,7 @@
1325
  });
1326
 
1327
  // Warning: click on background links
1328
- $('.cs-slide-live-preview-area a').click(function(event) {
1329
  if($(this).prop('target') != '_blank') {
1330
  var confirm = window.confirm(crellyslider_translations.exit_without_saving);
1331
  if(! confirm) {
@@ -1348,7 +1348,7 @@
1348
  /****************/
1349
 
1350
  // Save or update the new slider in the database
1351
- $('.cs-admin .cs-slider .cs-save-settings').click(function() {
1352
  $('.cs-admin #cs-slides .cs-live-preview').each(function() {
1353
  var btn = $(this);
1354
  var slide_parent = btn.closest('.cs-slide');
29
  /*************/
30
 
31
  (function($) {
32
+ $(window).on('load', function() {
33
 
34
  // Simulate keyup. Useful when textboxes change value
35
  function crellyslider_keyup(element) {
37
  }
38
 
39
  // Slider settings and slide tabs
40
+ $('#cs-show-slider-settings').on('click', function() {
41
  $('#cs-slider-settings').fadeIn();
42
  $('#cs-slides').hide();
43
  });
44
+ $('#cs-show-slides').on('click', function() {
45
  $('#cs-slides').fadeIn();
46
  $('#cs-slider-settings').hide();
47
  });
273
 
274
  // Open the tab just created
275
  var tab_index = add_btn.parent().index() - 1;
276
+ $('.cs-admin #cs-slides .cs-slide-tabs > ul > li').eq(tab_index).find('a').trigger('click');
277
 
278
  // Active class
279
  $('.cs-admin #cs-slides .cs-slide-tabs > ul > li').removeClass('active');
289
  }
290
 
291
  // Add new on click
292
+ $('.cs-admin #cs-slides .cs-add-new').on('click', function() {
293
  crellyslider_addSlide();
294
  });
295
  // Also add a new slide if slides_number == 0
302
  }
303
  }
304
  else {
305
+ $('.cs-admin #cs-slides .cs-slide-tabs > ul > li').eq(0).find('a').trigger('click');
306
  }
307
 
308
  // Delete
559
  });
560
 
561
  // Background presets
562
+ $('.cs-admin').on('click', '.cs-slide-background-image-fullwidth-preset', function() {
563
  var text = $(this);
564
  var area = text.closest('.cs-slide').find('.cs-elements .cs-slide-editing-area');
565
  var settings = text.closest('.cs-slide');
577
  crellyslider_keyup(settings.find('.cs-slide-background_propriety_size'));
578
  });
579
 
580
+ $('.cs-admin').on('click', '.cs-slide-background-image-pattern-preset', function() {
581
  var text = $(this);
582
  var area = text.closest('.cs-slide').find('.cs-elements .cs-slide-editing-area');
583
  var settings = text.closest('.cs-slide');
1325
  });
1326
 
1327
  // Warning: click on background links
1328
+ $('.cs-slide-live-preview-area a').on('click', function(event) {
1329
  if($(this).prop('target') != '_blank') {
1330
  var confirm = window.confirm(crellyslider_translations.exit_without_saving);
1331
  if(! confirm) {
1348
  /****************/
1349
 
1350
  // Save or update the new slider in the database
1351
+ $('.cs-admin .cs-slider .cs-save-settings').on('click', function() {
1352
  $('.cs-admin #cs-slides .cs-live-preview').each(function() {
1353
  var btn = $(this);
1354
  var slide_parent = btn.closest('.cs-slide');