wordpress/php-fpm/wordpress_files/themes/simple-catch/js/jquery.cycle.all.min.js

1 line
26 KiB
JavaScript
Raw Normal View History

2020-05-22 03:40:23 +02:00
(function(e,t){"use strict";function r(t){if(e.fn.cycle.debug)i(t)}function i(){if(window.console&&console.log)console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function s(t,n,r){var i=e(t).data("cycle.opts");if(!i)return;var s=!!t.cyclePause;if(s&&i.paused)i.paused(t,i,n,r);else if(!s&&i.resumed)i.resumed(t,i,n,r)}function o(n,r,o){function l(t,n,r){if(!t&&n===true){var s=e(r).data("cycle.opts");if(!s){i("options not found, can not resume");return false}if(r.cycleTimeout){clearTimeout(r.cycleTimeout);r.cycleTimeout=0}p(s.elements,s,1,!s.backwards)}}if(n.cycleStop===t)n.cycleStop=0;if(r===t||r===null)r={};if(r.constructor==String){switch(r){case"destroy":case"stop":var u=e(n).data("cycle.opts");if(!u)return false;n.cycleStop++;if(n.cycleTimeout)clearTimeout(n.cycleTimeout);n.cycleTimeout=0;if(u.elements)e(u.elements).stop();e(n).removeData("cycle.opts");if(r=="destroy")a(n,u);return false;case"toggle":n.cyclePause=n.cyclePause===1?0:1;l(n.cyclePause,o,n);s(n);return false;case"pause":n.cyclePause=1;s(n);return false;case"resume":n.cyclePause=0;l(false,o,n);s(n);return false;case"prev":case"next":u=e(n).data("cycle.opts");if(!u){i('options not found, "prev/next" ignored');return false}if(typeof o=="string")u.oneTimeFx=o;e.fn.cycle[r](u);return false;default:r={fx:r}}return r}else if(r.constructor==Number){var f=r;r=e(n).data("cycle.opts");if(!r){i("options not found, can not advance slide");return false}if(f<0||f>=r.elements.length){i("invalid slide index: "+f);return false}r.nextSlide=f;if(n.cycleTimeout){clearTimeout(n.cycleTimeout);n.cycleTimeout=0}if(typeof o=="string")r.oneTimeFx=o;p(r.elements,r,1,f>=r.currSlide);return false}return r}function u(t,n){if(!e.support.opacity&&n.cleartype&&t.style.filter){try{t.style.removeAttribute("filter")}catch(r){}}}function a(t,n){if(n.next)e(n.next).unbind(n.prevNextEvent);if(n.prev)e(n.prev).unbind(n.prevNextEvent);if(n.pager||n.pagerAnchorBuilder)e.each(n.pagerAnchors||[],function(){this.unbind().remove()});n.pagerAnchors=null;e(t).unbind("mouseenter.cycle mouseleave.cycle");if(n.destroy)n.destroy(n)}function f(n,r,o,a,f){var d;var y=e.extend({},e.fn.cycle.defaults,a||{},e.metadata?n.metadata():e.meta?n.data():{});var b=e.isFunction(n.data)?n.data(y.metaAttr):null;if(b)y=e.extend(y,b);if(y.autostop)y.countdown=y.autostopCount||o.length;var w=n[0];n.data("cycle.opts",y);y.$cont=n;y.stopCount=w.cycleStop;y.elements=o;y.before=y.before?[y.before]:[];y.after=y.after?[y.after]:[];if(!e.support.opacity&&y.cleartype)y.after.push(function(){u(this,y)});if(y.continuous)y.after.push(function(){p(o,y,0,!y.backwards)});l(y);if(!e.support.opacity&&y.cleartype&&!y.cleartypeNoBg)g(r);if(n.css("position")=="static")n.css("position","relative");if(y.width)n.width(y.width);if(y.height&&y.height!="auto")n.height(y.height);if(y.startingSlide!==t){y.startingSlide=parseInt(y.startingSlide,10);if(y.startingSlide>=o.length||y.startSlide<0)y.startingSlide=0;else d=true}else if(y.backwards)y.startingSlide=o.length-1;else y.startingSlide=0;if(y.random){y.randomMap=[];for(var E=0;E<o.length;E++)y.randomMap.push(E);y.randomMap.sort(function(e,t){return Math.random()-.5});if(d){for(var S=0;S<o.length;S++){if(y.startingSlide==y.randomMap[S]){y.randomIndex=S}}}else{y.randomIndex=1;y.startingSlide=y.randomMap[1]}}else if(y.startingSlide>=o.length)y.startingSlide=0;y.currSlide=y.startingSlide||0;var x=y.startingSlide;r.css({position:"absolute",top:0,left:0}).hide().each(function(t){var n;if(y.backwards)n=x?t<=x?o.length+(t-x):x-t:o.length-t;else n=x?t>=x?o.length-(t-x):x-t:o.length-t;e(this).css("z-index",n)});e(o[x]).css("opacity",1).show();u(o[x],y);if(y.fit){if(!y.aspect){if(y.width)r.width(y.width);if(y.height&&y.height!="auto")r.height(y.height)}else{r.each(function(){var t=e(this);var n=y.aspect===true?t.width()/t.height():y.aspect;if(y.width&&t.width()!=y.width){t.width(y.width);t.height(y.width/n)}if(y.height&&t.height()<y.height){t.height(y.height);t.width(y.height*n)}})}}if(y.center&&(!y.fit||y.aspect)){r.each(function(){var t=e(this);t.css({"margin-left":y.width?(y.width-t.width())/2+