Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

0.6.5 Fix for delayDuringOutInTransitions which has now been renamed …

…to transitionThreshold. Added afterCurrentFrameAnimatesOut callback
  • Loading branch information...
commit 7022f09288dbb77b4c9fe2953f06de2b377e3573 1 parent 4952c50
Ian Lunn authored
8 documentation.html
View
@@ -21,7 +21,7 @@
autoPlayDelay: 5000,
pauseOnHover: true,
pauseIconSrc: "images/pause-icon.png",
- delayDuringOutInTransitions: 1000,
+ transitionThreshold: 1000,
fallbackTheme: {
speed: 500
@@ -525,7 +525,7 @@ <h4 id="options-general">General Options</h4>
</td>
</tr>
<tr>
- <td>delayDuringOutInTransitions</td>
+ <td>transitionThreshold</td>
<td>true/false or a number in milliseconds</td>
<td>1000</td>
<td>Whether or not there should be a delay between a frame animating out and the next animating in.<br /><br />
@@ -1028,6 +1028,10 @@ <h4 id="callbacks-list">Compete List of Callbacks</h4>
<td>beforeCurrentFrameAnimatesOut</td>
<td>Executes before the current frame begins to animate out</td>
</tr>
+ <tr>
+ <td>afterCurrentFrameAnimatesOut</td>
+ <td>Executes after the current frame has animated out</td>
+ </tr>
<tr>
<td>beforeFirstFrameAnimatesIn</td>
3  index.html
View
@@ -55,6 +55,9 @@
<p>Sequence is the jQuery slider plugin with infinite style. It provides the complete functionality for a website slider without forcing you to use a set theme. In fact, Sequence has no in-built theme, leaving you complete creative control to build a unique slider using only CSS3 -- no jQuery knowledge required!</p>
<h3>Latest Update</h3><a href="release-history.html" title="View the complete release history">Release History &gt;</a>
+ <h3>v0.6.4 09/05/2012</h3>
+
+ <p>Minor changes to how the nextButton/prevButton/pauseButton and prependNextButton/prependPrevButton/prependPauseButton options work. Now closer match how they are described in the documentation.</p>
<h3>v0.6.3 08/05/2012</h3>
<p><strong>Check out the updated <a href="http://www.sequencejs.com/themes/apple-style/">Apple Style theme</a> that showcases the new pause options and callbacks.</strong></p>
14 release-history.html
View
@@ -39,9 +39,21 @@
<h1>Release History</h1>
<div class="main">
<div class="intro">
+ <h3>v0.6.5 14/05/2012</h3>
+
+ <p><strong>Note: 0.6.5 may not be backwards compatible with existing themes if those themes use the delayDuringOutInTransitions setting, which has now been renamed to transitionThreshold</strong></p>
+
+ <h4>New callback</h4>
+ <p>You can now use afterCurrentFrameAnimatesOut which is triggered once the current frame reaches the end of its animate out transition</p>
+
+ <h4>Minor changes to delayDuringOutInTransitions Setting</h4>
+ <p>delayDurintOutInTransitions option renamed to transitionThreshold</p>
+ <p>Fix for transitionThreshold which now makes all possible settings work</p>
+
+
<h3>v0.6.4 09/05/2012</h3>
- <p>Minor changes to how the nextButton/prevButton/pauseButton and prependNextButton/prependPrevButton/prependPauseButton options work. Now closer match how they are described in the documentation.</p>
+ <p>Minor changes to how the nextButton/prevButton/pauseButton and prependNextButton/prependPrevButton/prependPauseButton options work. Now closer match how they are described in the documentation.</p>
<h3>v0.6.3 08/05/2012</h3>
4 scripts/sequence.jquery-min.js
View
@@ -1,6 +1,6 @@
/*
Sequence.js (www.sequencejs.com)
-Version: 0.6.4 Beta
+Version: 0.6.5 Beta
Author: Ian Lunn @IanLunn
Author URL: http://www.ianlunn.co.uk/
Github: https://github.com/IanLunn/Sequence
@@ -10,4 +10,4 @@ http://www.opensource.org/licenses/mit-license.php | http://www.gnu.org/licenses
Sequence.js and its dependencies are (c) Ian Lunn Design 2012 unless otherwise stated.
Aside from these comments, you may modify and distribute this file as you please. Have fun!
-*/(function(a){function b(b,c,d,e){function j(){a(f.settings.preloader).remove();f.settings.nextButton=f.init.uiElements(f.settings.prependNextButton,f.settings.nextButton,".next",f.settings.nextButtonSrc,f.settings.nextButtonAlt);f.settings.prevButton=f.init.uiElements(f.settings.prependPrevButton,f.settings.prevButton,".prev",f.settings.prevButtonSrc,f.settings.prevButtonAlt);f.settings.pauseButton=f.init.uiElements(f.settings.prependPauseButton,f.settings.pauseButton,".pause",f.settings.pauseButtonSrc,f.settings.pauseButtonAlt);f.settings.nextButton!=undefined&&f.settings.nextButton!=0&&f.settings.showNextButtonOnInit&&f.settings.nextButton.show();f.settings.prevButton!=undefined&&f.settings.prevButton!=0&&f.settings.showPrevButtonOnInit&&f.settings.prevButton.show();f.settings.pauseButton!=undefined&&f.settings.pauseButton!=0&&f.settings.pauseButton.show();if(f.settings.pauseIcon!=0){f.settings.pauseIcon=f.init.uiElements(f.settings.prependPauseIcon,f.settings.pauseIcon,".pause-icon",f.settings.pauseIconSrc);f.settings.pauseIcon!=undefined&&f.settings.pauseIcon.hide()}f.hasTouch&&(f.settings.calculatedSwipeThreshold=f.container.width()*(f.settings.swipeThreshold/100));f.nextFrame=f.sequence.children("li:nth-child("+f.settings.startingFrameID+")");f.nextFrameChildren=f.nextFrame.children();f.nextFrameID=f.settings.startingFrameID;f.sequence.children("li").children().removeClass("animate-in");f.direction;f.sequence.css({width:"100%",height:"100%"});if(f.transitionsSupported)if(!f.settings.animateStartingFrameIn){f.currentFrame=f.nextFrame;f.currentFrame.addClass("current-frame");f.currentFrameChildren=f.currentFrame.children();f.currentFrameID=f.settings.startingFrameID;f.modifyElements(f.currentFrameChildren,"0s");f.currentFrameChildren.addClass("animate-in");setTimeout(function(){f.modifyElements(f.currentFrameChildren,"")},100);if(f.settings.autoPlay){var b=function(){f.autoPlaySequence()};clearTimeout(f.sequenceTimer);f.sequenceTimer=setTimeout(b,f.settings.autoPlayDelay,f)}}else if(f.settings.reverseAnimationsWhenNavigatingBackwards&&f.settings.autoPlayDirection-1&&f.settings.animateStartingFrameIn){f.modifyElements(f.nextFrameChildren,"0s");f.nextFrameChildren.addClass("animate-out");f.goTo(1,-1)}else f.goTo(1,1);else{f.container.addClass("sequence-fallback");f.currentFrame=f.nextFrame;f.currentFrame.addClass("current-frame");f.settings.beforeNextFrameAnimatesIn();f.settings.afterNextFrameAnimatesIn();f.currentFrameChildren=f.currentFrame.children();f.currentFrameID=f.settings.startingFrameID;f.sequence.children("li").children().css("opacity","0").addClass("animate-in").animate({opacity:"1"},500);f.nextFrame.css("z-index",f.numberOfFrames);f.sequence.children(":not(li:nth-child("+f.settings.startingFrameID+"))").css({display:"none",opacity:0});if(f.settings.autoPlay){var b=function(){f.autoPlaySequence()};clearTimeout(f.sequenceTimer);f.sequenceTimer=setTimeout(b,f.settings.autoPlayDelay,f)}}f.settings.nextButton!=undefined&&f.settings.nextButton.click(function(){f.next()});f.settings.prevButton!=undefined&&f.settings.prevButton.click(function(){f.prev()});f.settings.pauseButton!=undefined&&f.settings.pauseButton.click(function(){f.pause()});if(f.settings.keyNavigation){defaultKeys={left:37,right:39};a(document).keydown(function(a){function b(a,b){for(keyCodes in b){keyCodes=="left"||keyCodes=="right"?keyCode=defaultKeys[keyCodes]:keyCode=keyCodes;a==keyCode&&f.initCustomKeyEvent(b[keyCodes])}}char=parseFloat(String.fromCharCode(a.keyCode));if(char>0&&char<=f.numberOfFrames&&f.settings.numericKeysGoToFrames){f.nextFrameID=char;f.goTo(char)}b(a.keyCode,f.settings.keyEvents);b(a.keyCode,f.settings.customKeyEvents)})}if(f.settings.pauseOnHover&&!f.settings.pauseOnElementsOutsideContainer&&f.settings.autoPlay){function c(b){f.containerLeft=f.container.position().left;f.containerRight=f.container.position().left+f.container.width();f.containerTop=f.container.position().top;f.containerBottom=f.container.position().top+f.container.height();pageX=b.pageX;pageY=b.pageY;if(pageX>=f.containerLeft&&pageX<=f.containerRight&&pageY>=f.containerTop&&pageY<=f.containerBottom){f.settings.autoPlay=!1;clearTimeout(f.sequenceTimer);a(f.settings.pauseIcon).show();f.settings.pauseButton!=undefined&&f.settings.pauseButton.addClass("paused");f.settings.paused();f.sequence.unbind("mousemove")}}f.hoverEvent=f.sequence.mousemove(function(a){c(a)});f.sequence.mouseleave(function(b){f.settings.autoPlay=!0;var d=function(){f.autoPlaySequence()};clearTimeout(f.sequenceTimer);f.sequenceTimer=setTimeout(d,f.settings.autoPlayDelay,f);a(f.settings.pauseIcon).hide();f.settings.pauseButton!=undefined&&f.settings.pauseButton.removeClass("paused");f.settings.unpaused();f.sequence.data("events").mousemove==undefined&&f.sequence.mousemove(function(a){c(a)})})}else f.settings.pauseOnHover&&f.settings.autoPlay&&(f.hoverEvent=f.sequence.hover(function(b){f.settings.autoPlay=!1;clearTimeout(f.sequenceTimer);a(f.settings.pauseIcon).show();f.settings.pauseButton!=undefined&&f.settings.pauseButton.addClass("paused");f.settings.paused()},function(){f.settings.autoPlay=!0;var b=function(){f.autoPlaySequence()};clearTimeout(f.sequenceTimer);f.sequenceTimer=setTimeout(b,f.settings.autoPlayDelay,f);a(f.settings.pauseIcon).hide();f.settings.pauseButton!=undefined&&f.settings.pauseButton.removeClass("paused");f.settings.unpaused()}));if(f.settings.swipeNavigation&&f.hasTouch){var d={touchstartX:-1,touchstartY:-1,touchmoveX:-1,touchmoveY:-1};f.sequence.on("touchstart touchmove touchend",function(a){f.settings.swipePreventsDefault&&a.preventDefault();switch(a.originalEvent.type){case"touchmove":case"touchstart":d[a.originalEvent.type+"X"]=a.originalEvent.touches[0].pageX;d[a.originalEvent.type+"Y"]=a.originalEvent.touches[0].pageY;break;case"touchend":if(d["touchmoveX"]!=-1){xAmount=d.touchmoveX-d.touchstartX;yAmount=d.touchmoveY-d.touchstartY;Math.abs(xAmount)>Math.abs(yAmount)&&xAmount>f.settings.calculatedSwipeThreshold?f.initCustomKeyEvent(f.settings.swipeEvents.right):Math.abs(xAmount)>Math.abs(yAmount)&&Math.abs(xAmount)>f.settings.calculatedSwipeThreshold?f.initCustomKeyEvent(f.settings.swipeEvents.left):Math.abs(yAmount)>Math.abs(xAmount)&&yAmount>f.settings.calculatedSwipeThreshold?f.initCustomKeyEvent(f.settings.swipeEvents.down):Math.abs(yAmount)>Math.abs(xAmount)&&Math.abs(yAmount)>f.settings.calculatedSwipeThreshold&&f.initCustomKeyEvent(f.settings.swipeEvents.up);d={touchstartX:-1,touchstartY:-1,touchmoveX:-1,touchmoveY:-1}}break;default:}})}a(window).resize(function(){f.settings.calculatedSwipeThreshold=f.container.width()*(f.settings.swipeThreshold/100)})}var f=this;f.container=a(b),f.sequence=f.container.children("ul");try{Modernizr.prefixed;if(Modernizr.prefixed==undefined)throw"undefined"}catch(g){e.modernizr()}var h={WebkitTransition:"-webkit-",MozTransition:"-moz-",OTransition:"-o-",msTransition:"-ms-",transition:""},i={WebkitTransition:"webkitTransitionEnd webkitAnimationEnd",MozTransition:"transitionend animationend",OTransition:"oTransitionEnd oAnimationEnd",msTransition:"MSTransitionEnd MSAnimationEnd",transition:"transitionend animationend"};f.prefix=h[Modernizr.prefixed("transition")],f.transitionEnd=i[Modernizr.prefixed("transition")],f.transitionProperties={},f.numberOfFrames=f.sequence.children("li").length,f.transitionsSupported=f.prefix!=undefined?!0:!1,f.hasTouch="ontouchstart"in window?!0:!1,f.sequenceTimer,f.paused=!1,f.hoverEvent,f.defaultPreloader,f.init={preloader:function(b){f.prependTo=f.settings.prependPreloader==1?f.container:f.settings.prependPreloader;switch(b){case!0:case undefined:e.defaultPreloader(f.prependTo,f.transitionsSupported,f.prefix);(!f.transitionsSupported||f.prefix=="-o-")&&f.preloaderFallback();return a("#sequence-preloader");case!1:break;default:this.CSSSelectorToHTML(b);return a(b)}},uiElements:function(b,c,d,e,g){switch(c){case!1:return undefined;case!0:b==1?a(f.container).prepend("<img "+this.CSSSelectorToHTML(d)+'src="'+e+'" alt="'+g+'" />'):b!=0&&a(b).prepend("<img "+this.CSSSelectorToHTML(d)+'src="'+e+'" alt="'+g+'" />');return a(d);default:var h=b==1?f.container:b;a(h).prepend("<img "+this.CSSSelectorToHTML(c)+'src="'+e+'" alt="'+g+'" />');return a(c)}},CSSSelectorToHTML:function(a){switch(a.charAt(0)){case".":return'class="'+a.split(".")[1]+'"';case"#":return'id="'+a.split("#")[1]+'"';default:return a}}},f.settings=a.extend({},d,c),f.settings.preloader=f.init.preloader(f.settings.preloader);if(f.settings.animateStartingFrameIn){f.modifyElements(f.sequence.children("li").children(),"0s");f.sequence.children("li").children().removeClass("animate-in")}f.settings.preloader?a(window).bind("load",function(){f.settings.afterPreload();if(f.settings.hidePreloaderUsingCSS&&f.transitionsSupported&&f.prefix!="-o-"){f.prependPreloadingCompleteTo=f.settings.prependPreloadingComplete==1?f.settings.preloader:a(f.settings.prependPreloadingComplete);f.prependPreloadingCompleteTo.addClass("preloading-complete");setTimeout(j,f.settings.hidePreloaderDelay)}else f.settings.preloader.fadeOut(f.settings.hidePreloaderDelay,function(){clearInterval(f.defaultPreloader);j()});a(window).unbind("load")}):j()}b.prototype={preloaderFallback:function(){function b(){i=i==1?0:1;a("#sequence-preloader img:nth-child(1)").animate({opacity:i},100);a("#sequence-preloader img:nth-child(2)").animate({opacity:i},350);a("#sequence-preloader img:nth-child(3)").animate({opacity:i},600)}i=0;b();self.defaultPreloader=setInterval(function(){b()},600)},initCustomKeyEvent:function(a){var b=this;switch(a){case"next":b.next();break;case"prev":b.prev();break;case"pause":b.pause()}},autoPlaySequence:function(a){var b=this;b.settings.autoPlayDirection==1?b.next():b.prev()},modifyElements:function(a,b){var c=this;a.css(c.prefixCSS(c.prefix,{"transition-duration":b,"transition-delay":b}))},prefixCSS:function(a,b){css={};for(property in b)css[a+property]=b[property];return css},getStyleBySelector:function(a){css={};var b=document.styleSheets,c,d,e;for(d=b.length-1;d>=0;d--){error=!1;try{c=b[d].cssRules}catch(f){error=!0}if(!error)for(e=0;e<c.length;e++)if(c[e].type==CSSRule.STYLE_RULE&&c[e].selectorText==a){css["-o-transition-duration"]=c[e].style.OTransitionDuration;css["-o-transition-delay"]=c[e].style.OTransitionDelay;return css}}return null},setTransitionProperties:function(b){var c=this;c.modifyElements(c.frameChildren,"");c.frameChildren.each(function(){if(c.prefix=="-o-"){selector="."+a(this).attr("class").replace(" ",".");previousFrameTransitionProperties=c.getStyleBySelector(selector);c.transitionProperties["transition-duration"]=previousFrameTransitionProperties["-o-transition-duration"];c.transitionProperties["transition-delay"]=previousFrameTransitionProperties["-o-transition-delay"];c.transitionProperties["transition-delay"]=c.transitionProperties["transition-delay"]==""?"0s":c.transitionProperties["transition-delay"]}else{c.transitionProperties["transition-duration"]=a(this).css(c.prefix+"transition-duration");c.transitionProperties["transition-delay"]=a(this).css(c.prefix+"transition-delay")}a(this).css(c.prefixCSS(c.prefix,c.transitionProperties))})},pause:function(){var a=this;if(a.settings.autoPlay){a.settings.pauseButton!=undefined&&a.settings.pauseButton.addClass("paused");a.settings.paused();a.stopAutoPlay()}else{a.settings.pauseButton!=undefined&&a.settings.pauseButton.removeClass("paused");a.settings.unpaused();a.startAutoPlay(a.settings.unpauseDelay)}},startAutoPlay:function(b,c){var d=this;b=b==undefined?0:b;d.settings.autoPlayDelay=c==undefined?d.settings.autoPlayDelay:c;d.settings.autoPlay=!0;var e=function(){d.autoPlaySequence()};clearTimeout(d.sequenceTimer);d.sequenceTimer=setTimeout(e,b,d);d.settings.pauseOnHover&&(d.hoverEvent=d.sequence.hover(function(){d.settings.autoPlay=!1;clearTimeout(d.sequenceTimer);a(d.settings.pauseIcon).show();d.settings.pauseButton!=undefined&&d.settings.pauseButton.addClass("paused");d.settings.paused()},function(){d.settings.autoPlay=!0;var b=function(){d.autoPlaySequence()};clearTimeout(d.sequenceTimer);d.sequenceTimer=setTimeout(b,d.settings.autoPlayDelay,d);a(d.settings.pauseIcon).hide();d.settings.pauseButton!=undefined&&d.settings.pauseButton.removeClass("paused");d.settings.unpaused()}))},stopAutoPlay:function(){var a=this;a.settings.autoPlay=!1;clearTimeout(a.sequenceTimer);a.hoverEvent!=undefined&&a.hoverEvent.unbind()},next:function(){var a=this;if(!a.active)if(a.settings.cycle||!a.settings.cycle&&a.currentFrame.index()+1!=a.numberOfFrames){if(a.paused){a.paused=!1;a.startAutoPlay()}a.nextFrameID=a.currentFrame.index()+1!=a.numberOfFrames?a.currentFrameID+1:1;a.goTo(a.nextFrameID,1)}else if(a.settings.autoPlayDirection==1){a.paused=!0;a.stopAutoPlay()}},prev:function(){var a=this;if(!a.active)if(a.settings.cycle||!a.settings.cycle&&a.currentFrame.index()+1!=1){if(a.paused){a.paused=!1;a.startAutoPlay()}a.nextFrameID=a.currentFrame.index()+1==1?a.numberOfFrames:a.currentFrameID-1;a.goTo(a.nextFrameID,-1)}else if(a.settings.autoPlayDirection==-1){a.paused=!0;a.stopAutoPlay()}},goTo:function(a,b){var c=this;a==c.numberOfFrames?c.settings.beforeLastFrameAnimatesIn():a==1&&c.settings.beforeFirstFrameAnimatesIn();if(c.currentFrame!=undefined&&a==c.currentFrame.index()+1)return!1;if(!c.active){c.active=!0;c.currentFrame=c.sequence.children(".current-frame");c.nextFrame=c.sequence.children("li:nth-child("+a+")");b==undefined?c.direction=a>c.currentFrameID?1:-1:c.direction=b;c.frameChildren=c.currentFrame.children();c.nextFrameChildren=c.nextFrame.children();if(c.transitionsSupported){if(c.currentFrame.length!=0){c.settings.beforeCurrentFrameAnimatesOut();c.animateOut(c.direction)}var d=function(){c.animateIn(c.direction);c.currentFrameID=a};switch(c.settings.delayDuringOutInTransitions){case!0:c.waitForAnimationsToComplete(c.currentFrame,c.frameChildren);break;case!1:d();break;default:setTimeout(d,c.settings.delayDuringOutInTransitions)}}else{c.sequence.children("li").css({position:"relative"});c.settings.beforeCurrentFrameAnimatesOut();c.currentFrame.animate({opacity:0},c.settings.fallbackTheme.speed,function(){c.currentFrame.css({display:"none","z-index":"1"});c.currentFrame.removeClass("current-frame");c.settings.beforeNextFrameAnimatesIn();c.nextFrame.addClass("current-frame").css({display:"block","z-index":c.numberOfFrames}).animate({opacity:1},500,function(){c.settings.afterNextFrameAnimatesIn()});c.currentFrame=c.nextFrame;c.currentFrameID=c.currentFrame.index()+1;c.active=!1;if(c.settings.autoPlay){var a=function(){c.autoPlaySequence()};clearTimeout(c.sequenceTimer);c.sequenceTimer=setTimeout(a,c.settings.autoPlayDelay,c)}})}}},animateOut:function(a){var b=this;b.currentFrame.removeClass("current-frame");b.nextFrame.addClass("next-frame");if(!b.settings.reverseAnimationsWhenNavigatingBackwards||a==1){b.modifyElements(b.nextFrameChildren,"0s");b.nextFrameChildren.removeClass("animate-out");b.modifyElements(b.frameChildren,"");b.settings.disableAnimateOut||b.frameChildren.addClass("animate-out").removeClass("animate-in")}if(b.settings.reverseAnimationsWhenNavigatingBackwards&&a==-1){b.modifyElements(b.nextFrameChildren,"0s");b.settings.disableAnimateOut?b.active=!1:b.nextFrameChildren.addClass("animate-out");b.setTransitionProperties(b.frameChildren);b.frameChildren.removeClass("animate-in")}},animateIn:function(a){var b=this;b.currentFrame.unbind(b.transitionEnd);b.currentFrame=b.nextFrame;a==1?b.currentFrameID=b.currentFrameID!=b.numberOfFrames?b.currentFrameID+1:1:b.currentFrameID=b.currentFrameID!=1?b.currentFrameID-1:b.numberOfFrames;b.nextFrameChildren=b.nextFrame.children();b.frameChildren=b.currentFrame.children();b.settings.beforeNextFrameAnimatesIn();if(!b.settings.reverseAnimationsWhenNavigatingBackwards||a==1){b.modifyElements(b.nextFrameChildren,"0s");b.nextFrameChildren.removeClass("animate-out");setTimeout(function(){b.frameChildren.removeClass("animate-out");b.modifyElements(b.frameChildren,"");b.frameChildren.addClass("animate-in");b.waitForAnimationsToComplete(b.nextFrame,b.nextFrameChildren)},50)}b.settings.reverseAnimationsWhenNavigatingBackwards&&a==-1&&setTimeout(function(){b.setTransitionProperties(b.frameChildren);b.frameChildren.addClass("animate-in").removeClass("animate-out");b.waitForAnimationsToComplete(b.nextFrame,b.nextFrameChildren)},50)},waitForAnimationsToComplete:function(b,c){var d=this;onceComplete=function(){b.unbind(d.transitionEnd);d.settings.afterNextFrameAnimatesIn();d.currentFrameID==d.numberOfFrames?d.settings.afterLastFrameAnimatesIn():d.currentFrameID==1&&d.settings.afterFirstFrameAnimatesIn();d.nextFrame.removeClass("next-frame").addClass("current-frame");d.active=!1;if(d.settings.autoPlay){var a=function(){d.autoPlaySequence()};clearTimeout(d.sequenceTimer);d.sequenceTimer=setTimeout(a,d.settings.autoPlayDelay,d)}};c.each(function(){a(this).data("animationEnded",!1)});d.currentFrame.bind(d.transitionEnd,function(b){a(b.target).data("animationEnded",!0);var d=!0;c.each(function(){a(this).data("animationEnded")==0&&(d=!1)});d&&onceComplete()})}};a.fn.sequence=function(e){return this.each(function(){var f=new b(a(this),e,d,c);a(this).data("sequence",f)})};var c={modernizr:function(){window.Modernizr=function(a,b,c){function d(a){p.cssText=a}function e(a,b){return d(prefixes.join(a+";")+(b||""))}function f(a,b){return typeof a===b}function g(a,b){return!!~(""+a).indexOf(b)}function h(a,b){for(var d in a)if(p[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function i(a,b,d){for(var e in a){var g=b[a[e]];if(g!==c)return d===!1?a[e]:f(g,"function")?g.bind(d||b):g}return!1}function j(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+t.join(d+" ")+d).split(" ");return f(b,"string")||f(b,"undefined")?h(e,b):(e=(a+" "+u.join(d+" ")+d).split(" "),i(e,b,c))}var k="2.5.3",l={},m=b.documentElement,n="modernizr",o=b.createElement(n),p=o.style,q,r={}.toString,s="Webkit Moz O ms",t=s.split(" "),u=s.toLowerCase().split(" "),v={},w={},x={},y=[],z=y.slice,A,B={}.hasOwnProperty,C;!f(B,"undefined")&&!f(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&f(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(a){var b=self;if(typeof b!="function")throw new TypeError;var c=z.call(arguments,1),d=function(){if(self instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(z.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(z.call(arguments)))};return d});for(var D in v)C(v,D)&&(A=D.toLowerCase(),l[A]=v[D](),y.push((l[A]?"":"no-")+A));return d(""),o=q=null,l._version=k,l._domPrefixes=u,l._cssomPrefixes=t,l.testProp=function(a){return h([a])},l.testAllProps=j,l.prefixed=function(a,b,c){return b?j(a,b,c):j(a,"pfx")},l}(self,self.document)},defaultPreloader:function(b,c,d){var e=c?0:1;a("head").append("<style>#sequence-preloader{height: 100%;position: absolute;width: 100%;z-index: 999999;}@"+d+"keyframes preload{0%{opacity: 0;}50%{opacity: 1;}100%{opacity: 0;}}#sequence-preloader img{background: #ff9933;border-radius: 6px;display: inline-block;height: 12px;opacity: "+e+";position: relative;top: -50%;width: 12px;"+d+"animation: preload 1s infinite; animation: preload 1s infinite;}.preloading{height: 12px;margin: 0 auto;top: 50%;position: relative;width: 48px;}#sequence-preloader img:nth-child(2){"+d+"animation-delay: .15s; animation-delay: .15s;}#sequence-preloader img:nth-child(3){"+d+"animation-delay: .3s; animation-delay: .3s;}.preloading-complete{opacity: 0;visibility: hidden;"+d+"transition-duration: 1s; transition-duration: 1s;}</style>");a(b).prepend('<div id="sequence-preloader"><div class="preloading"><img src="images/sequence-preloader.png" alt="Sequence is loading, please wait..." /> <img src="images/sequence-preloader.png" alt="Sequence is loading, please wait..." /> <img src="images/sequence-preloader.png" alt="Sequence is loading, please wait..." /></div></div>')}},d={startingFrameID:1,cycle:!0,animatestartingFrameIn:!1,delayDuringOutInTransitions:1e3,disableAnimateOut:!1,reverseAnimationsWhenNavigatingBackwards:!0,autoPlay:!0,autoPlayDirection:1,autoPlayDelay:5e3,nextButton:!1,prependNextButton:!1,nextButtonSrc:"images/bt-next.png",nextButtonAlt:"&#gt;",showNextButtonOnInit:!0,prevButton:!1,prependPrevButton:!1,prevButtonSrc:"images/bt-prev.png",prevButtonAlt:"&#lt;",showPrevButtonOnInit:!0,pauseButton:!1,prependPauseButton:!1,pauseButtonSrc:"images/bt-pause.png",pauseButtonAlt:"&#166;&#166;",unpauseDelay:0,pauseOnHover:!0,pauseIcon:!1,prependPauseIcon:!1,pauseIconSrc:"images/pause-icon.png",pauseAlt:"Pause",pauseOnElementsOutsideContainer:!1,preloader:!0,prependPreloader:!0,prependPreloadingComplete:!0,hidePreloaderUsingCSS:!0,hidePreloaderDelay:0,keyNavigation:!0,numericKeysGoToFrames:!0,keyPreventsDefault:!1,keyEvents:{left:"prev",right:"next"},customKeyEvents:{},swipeNavigation:!0,swipeThreshold:15,swipePreventsDefault:!1,swipeEvents:{left:"prev",right:"next",up:!1,down:!1},fallbackTheme:{speed:500},paused:function(){},unpaused:function(){},beforeNextFrameAnimatesIn:function(){},afterNextFrameAnimatesIn:function(){},beforeCurrentFrameAnimatesOut:function(){},beforeFirstFrameAnimatesIn:function(){},afterFirstFrameAnimatesIn:function(){},beforeLastFrameAnimatesIn:function(){},afterLastFrameAnimatesIn:function(){},afterPreload:function(){}}})(jQuery);
+*/(function(a){function b(b,c,d,e){function j(){function d(b){f.containerLeft=f.container.position().left;f.containerRight=f.container.position().left+f.container.width();f.containerTop=f.container.position().top;f.containerBottom=f.container.position().top+f.container.height();var c=b.pageX,d=b.pageY;if(c>=f.containerLeft&&c<=f.containerRight&&d>=f.containerTop&&d<=f.containerBottom){f.settings.autoPlay=!1;clearTimeout(f.sequenceTimer);a(f.settings.pauseIcon).show();f.settings.pauseButton!==undefined&&f.settings.pauseButton.addClass("paused");f.settings.paused();f.sequence.unbind("mousemove")}}a(f.settings.preloader).remove();f.settings.nextButton=f.init.uiElements(f.settings.prependNextButton,f.settings.nextButton,".next",f.settings.nextButtonSrc,f.settings.nextButtonAlt);f.settings.prevButton=f.init.uiElements(f.settings.prependPrevButton,f.settings.prevButton,".prev",f.settings.prevButtonSrc,f.settings.prevButtonAlt);f.settings.pauseButton=f.init.uiElements(f.settings.prependPauseButton,f.settings.pauseButton,".pause",f.settings.pauseButtonSrc,f.settings.pauseButtonAlt);f.settings.nextButton!==undefined&&f.settings.nextButton!==!1&&f.settings.showNextButtonOnInit&&f.settings.nextButton.show();f.settings.prevButton!==undefined&&f.settings.prevButton!==!1&&f.settings.showPrevButtonOnInit&&f.settings.prevButton.show();f.settings.pauseButton!==undefined&&f.settings.pauseButton!==!1&&f.settings.pauseButton.show();if(f.settings.pauseIcon!==!1){f.settings.pauseIcon=f.init.uiElements(f.settings.prependPauseIcon,f.settings.pauseIcon,".pause-icon",f.settings.pauseIconSrc);f.settings.pauseIcon!==undefined&&f.settings.pauseIcon.hide()}f.hasTouch&&(f.settings.calculatedSwipeThreshold=f.container.width()*(f.settings.swipeThreshold/100));f.nextFrame=f.sequence.children("li:nth-child("+f.settings.startingFrameID+")");f.nextFrameChildren=f.nextFrame.children();f.nextFrameID=f.settings.startingFrameID;f.sequence.children("li").children().removeClass("animate-in");f.direction;f.sequence.css({width:"100%",height:"100%"});if(f.transitionsSupported)if(!f.settings.animateStartingFrameIn){f.currentFrame=f.nextFrame;f.currentFrame.addClass("current-frame");f.currentFrameChildren=f.currentFrame.children();f.currentFrameID=f.settings.startingFrameID;f.modifyElements(f.currentFrameChildren,"0s");f.currentFrameChildren.addClass("animate-in");setTimeout(function(){f.modifyElements(f.currentFrameChildren,"")},100);if(f.settings.autoPlay){var b=function(){f.autoPlaySequence()};clearTimeout(f.sequenceTimer);f.sequenceTimer=setTimeout(b,f.settings.autoPlayDelay,f)}}else if(f.settings.reverseAnimationsWhenNavigatingBackwards&&f.settings.autoPlayDirection-1&&f.settings.animateStartingFrameIn){f.modifyElements(f.nextFrameChildren,"0s");f.nextFrameChildren.addClass("animate-out");f.goTo(1,-1)}else f.goTo(1,1);else{f.container.addClass("sequence-fallback");f.currentFrame=f.nextFrame;f.currentFrame.addClass("current-frame");f.settings.beforeNextFrameAnimatesIn();f.settings.afterNextFrameAnimatesIn();f.currentFrameChildren=f.currentFrame.children();f.currentFrameID=f.settings.startingFrameID;f.sequence.children("li").children().css("opacity","0").addClass("animate-in").animate({opacity:"1"},500);f.nextFrame.css("z-index",f.numberOfFrames);f.sequence.children(":not(li:nth-child("+f.settings.startingFrameID+"))").css({display:"none",opacity:0});if(f.settings.autoPlay){var b=function(){f.autoPlaySequence()};clearTimeout(f.sequenceTimer);f.sequenceTimer=setTimeout(b,f.settings.autoPlayDelay,f)}}f.settings.nextButton!==undefined&&f.settings.nextButton.click(function(){f.next()});f.settings.prevButton!==undefined&&f.settings.prevButton.click(function(){f.prev()});f.settings.pauseButton!==undefined&&f.settings.pauseButton.click(function(){f.pause()});if(f.settings.keyNavigation){var c={left:37,right:39};a(document).keydown(function(a){function b(a,b){var d;for(keyCodes in b){keyCodes==="left"||keyCodes==="right"?d=c[keyCodes]:d=keyCodes;a===d&&f.initCustomKeyEvent(b[keyCodes])}}var d=parseFloat(String.fromCharCode(a.keyCode));if(d>0&&d<=f.numberOfFrames&&f.settings.numericKeysGoToFrames){f.nextFrameID=d;f.goTo(d)}b(a.keyCode,f.settings.keyEvents);b(a.keyCode,f.settings.customKeyEvents)})}if(f.settings.pauseOnHover&&!f.settings.pauseOnElementsOutsideContainer&&f.settings.autoPlay){f.hoverEvent=f.sequence.mousemove(function(a){d(a)});f.sequence.mouseleave(function(b){f.settings.autoPlay=!0;var c=function(){f.autoPlaySequence()};clearTimeout(f.sequenceTimer);f.sequenceTimer=setTimeout(c,f.settings.autoPlayDelay,f);a(f.settings.pauseIcon).hide();f.settings.pauseButton!==undefined&&f.settings.pauseButton.removeClass("paused");f.settings.unpaused();f.sequence.data("events").mousemove===undefined&&f.sequence.mousemove(function(a){d(a)})})}else f.settings.pauseOnHover&&f.settings.autoPlay&&(f.hoverEvent=f.sequence.hover(function(b){f.settings.autoPlay=!1;clearTimeout(f.sequenceTimer);a(f.settings.pauseIcon).show();f.settings.pauseButton!==undefined&&f.settings.pauseButton.addClass("paused");f.settings.paused()},function(){f.settings.autoPlay=!0;var b=function(){f.autoPlaySequence()};clearTimeout(f.sequenceTimer);f.sequenceTimer=setTimeout(b,f.settings.autoPlayDelay,f);a(f.settings.pauseIcon).hide();f.settings.pauseButton!==undefined&&f.settings.pauseButton.removeClass("paused");f.settings.unpaused()}));if(f.settings.swipeNavigation&&f.hasTouch){var e={touchstartX:-1,touchstartY:-1,touchmoveX:-1,touchmoveY:-1};f.sequence.on("touchstart touchmove touchend",function(a){f.settings.swipePreventsDefault&&a.preventDefault();switch(a.originalEvent.type){case"touchmove":case"touchstart":e[a.originalEvent.type+"X"]=a.originalEvent.touches[0].pageX;e[a.originalEvent.type+"Y"]=a.originalEvent.touches[0].pageY;break;case"touchend":if(e.touchmoveX!==-1){var b=e.touchmoveX-e.touchstartX,c=e.touchmoveY-e.touchstartY;Math.abs(b)>Math.abs(c)&&b>f.settings.calculatedSwipeThreshold?f.initCustomKeyEvent(f.settings.swipeEvents.right):Math.abs(b)>Math.abs(c)&&Math.abs(b)>f.settings.calculatedSwipeThreshold?f.initCustomKeyEvent(f.settings.swipeEvents.left):Math.abs(c)>Math.abs(b)&&c>f.settings.calculatedSwipeThreshold?f.initCustomKeyEvent(f.settings.swipeEvents.down):Math.abs(c)>Math.abs(b)&&Math.abs(c)>f.settings.calculatedSwipeThreshold&&f.initCustomKeyEvent(f.settings.swipeEvents.up);e={touchstartX:-1,touchstartY:-1,touchmoveX:-1,touchmoveY:-1}}break;default:}})}a(window).resize(function(){f.settings.calculatedSwipeThreshold=f.container.width()*(f.settings.swipeThreshold/100)})}var f=this;f.container=a(b),f.sequence=f.container.children("ul");try{Modernizr.prefixed;if(Modernizr.prefixed===undefined)throw"undefined"}catch(g){e.modernizr()}var h={WebkitTransition:"-webkit-",MozTransition:"-moz-",OTransition:"-o-",msTransition:"-ms-",transition:""},i={WebkitTransition:"webkitTransitionEnd webkitAnimationEnd",MozTransition:"transitionend animationend",OTransition:"oTransitionEnd oAnimationEnd",msTransition:"MSTransitionEnd MSAnimationEnd",transition:"transitionend animationend"};f.prefix=h[Modernizr.prefixed("transition")],f.transitionEnd=i[Modernizr.prefixed("transition")],f.transitionProperties={},f.numberOfFrames=f.sequence.children("li").length,f.transitionsSupported=f.prefix!==undefined?!0:!1,f.hasTouch="ontouchstart"in window?!0:!1,f.sequenceTimer,f.paused=!1,f.hoverEvent,f.defaultPreloader,f.init={preloader:function(b){f.prependTo=f.settings.prependPreloader==1?f.container:f.settings.prependPreloader;switch(b){case!0:case undefined:e.defaultPreloader(f.prependTo,f.transitionsSupported,f.prefix);(!f.transitionsSupported||f.prefix==="-o-")&&f.preloaderFallback();return a("#sequence-preloader");case!1:break;default:this.CSSSelectorToHTML(b);return a(b)}},uiElements:function(b,c,d,e,g){switch(c){case!1:return undefined;case!0:b===!0?a(f.container).prepend("<img "+this.CSSSelectorToHTML(d)+'src="'+e+'" alt="'+g+'" />'):b!==!1&&a(b).prepend("<img "+this.CSSSelectorToHTML(d)+'src="'+e+'" alt="'+g+'" />');return a(d);default:var h=b==1?f.container:b;a(h).prepend("<img "+this.CSSSelectorToHTML(c)+'src="'+e+'" alt="'+g+'" />');return a(c)}},CSSSelectorToHTML:function(a){switch(a.charAt(0)){case".":return'class="'+a.split(".")[1]+'"';case"#":return'id="'+a.split("#")[1]+'"';default:return a}}},f.settings=a.extend({},d,c),f.settings.preloader=f.init.preloader(f.settings.preloader);f.firstFrame=f.settings.animateStartingFrameIn?!0:!1;if(f.settings.animateStartingFrameIn){f.modifyElements(f.sequence.children("li").children(),"0s");f.sequence.children("li").children().removeClass("animate-in")}f.settings.preloader?a(window).bind("load",function(){f.settings.afterPreload();if(f.settings.hidePreloaderUsingCSS&&f.transitionsSupported&&f.prefix!=="-o-"){f.prependPreloadingCompleteTo=f.settings.prependPreloadingComplete==1?f.settings.preloader:a(f.settings.prependPreloadingComplete);f.prependPreloadingCompleteTo.addClass("preloading-complete");setTimeout(j,f.settings.hidePreloaderDelay)}else f.settings.preloader.fadeOut(f.settings.hidePreloaderDelay,function(){clearInterval(f.defaultPreloader);j()});a(window).unbind("load")}):j()}b.prototype={preloaderFallback:function(){function d(){c=c===1?0:1;a("#sequence-preloader img:nth-child(1)").animate({opacity:c},100);a("#sequence-preloader img:nth-child(2)").animate({opacity:c},350);a("#sequence-preloader img:nth-child(3)").animate({opacity:c},600)}var b=this,c=0;d();b.defaultPreloader=setInterval(function(){d()},600)},initCustomKeyEvent:function(a){var b=this;switch(a){case"next":b.next();break;case"prev":b.prev();break;case"pause":b.pause()}},autoPlaySequence:function(a){var b=this;b.settings.autoPlayDirection===1?b.next():b.prev()},modifyElements:function(a,b){var c=this;a.css(c.prefixCSS(c.prefix,{"transition-duration":b,"transition-delay":b}))},prefixCSS:function(a,b){var c={};for(property in b)c[a+property]=b[property];return c},getStyleBySelector:function(a){var b={},c=document.styleSheets,d,e,f;for(e=c.length-1;e>=0;e--){var g=!1;try{d=c[e].cssRules}catch(h){g=!0}if(!g)for(f=0;f<d.length;f++)if(d[f].type===CSSRule.STYLE_RULE&&d[f].selectorText===a){b["-o-transition-duration"]=d[f].style.OTransitionDuration;b["-o-transition-delay"]=d[f].style.OTransitionDelay;return b}}return null},setTransitionProperties:function(b){var c=this;c.modifyElements(c.frameChildren,"");c.frameChildren.each(function(){if(c.prefix==="-o-"){var b="."+a(this).attr("class").replace(" ","."),d=c.getStyleBySelector(b);c.transitionProperties["transition-duration"]=d["-o-transition-duration"];c.transitionProperties["transition-delay"]=d["-o-transition-delay"];c.transitionProperties["transition-delay"]=c.transitionProperties["transition-delay"]===""?"0s":c.transitionProperties["transition-delay"]}else{c.transitionProperties["transition-duration"]=a(this).css(c.prefix+"transition-duration");c.transitionProperties["transition-delay"]=a(this).css(c.prefix+"transition-delay")}a(this).css(c.prefixCSS(c.prefix,c.transitionProperties))})},pause:function(){var a=this;if(a.settings.autoPlay){a.settings.pauseButton!==undefined&&a.settings.pauseButton.addClass("paused");a.settings.paused();a.stopAutoPlay()}else{a.settings.pauseButton!==undefined&&a.settings.pauseButton.removeClass("paused");a.settings.unpaused();a.startAutoPlay(a.settings.unpauseDelay)}},startAutoPlay:function(b,c){var d=this;b=b===undefined?0:b;d.settings.autoPlayDelay=c===undefined?d.settings.autoPlayDelay:c;d.settings.autoPlay=!0;var e=function(){d.autoPlaySequence()};clearTimeout(d.sequenceTimer);d.sequenceTimer=setTimeout(e,b,d);d.settings.pauseOnHover&&(d.hoverEvent=d.sequence.hover(function(){d.settings.autoPlay=!1;clearTimeout(d.sequenceTimer);a(d.settings.pauseIcon).show();d.settings.pauseButton!==undefined&&d.settings.pauseButton.addClass("paused");d.settings.paused()},function(){d.settings.autoPlay=!0;var b=function(){d.autoPlaySequence()};clearTimeout(d.sequenceTimer);d.sequenceTimer=setTimeout(b,d.settings.autoPlayDelay,d);a(d.settings.pauseIcon).hide();d.settings.pauseButton!==undefined&&d.settings.pauseButton.removeClass("paused");d.settings.unpaused()}))},stopAutoPlay:function(){var a=this;a.settings.autoPlay=!1;clearTimeout(a.sequenceTimer);a.hoverEvent!==undefined&&a.hoverEvent.unbind()},next:function(){var a=this;if(!a.active)if(a.settings.cycle||!a.settings.cycle&&a.currentFrameID!==a.numberOfFrames){if(a.paused){a.paused=!1;a.startAutoPlay()}a.nextFrameID=a.currentFrameID!==a.numberOfFrames?a.currentFrameID+1:1;a.goTo(a.nextFrameID,1)}else if(a.settings.autoPlayDirection===1){a.paused=!0;a.stopAutoPlay()}},prev:function(){var a=this;if(!a.active)if(a.settings.cycle||!a.settings.cycle&&a.currentFrameID!==1){if(a.paused){a.paused=!1;a.startAutoPlay()}a.nextFrameID=a.currentFrameID===1?a.numberOfFrames:a.currentFrameID-1;a.goTo(a.nextFrameID,-1)}else if(a.settings.autoPlayDirection===-1){a.paused=!0;a.stopAutoPlay()}},goTo:function(a,b){var c=this;a===c.numberOfFrames?c.settings.beforeLastFrameAnimatesIn():a===1&&c.settings.beforeFirstFrameAnimatesIn();if(c.currentFrame!==undefined&&a===c.currentFrame.index()+1)return!1;if(!c.active){c.active=!0;c.currentFrame=c.sequence.children(".current-frame");c.nextFrame=c.sequence.children("li:nth-child("+a+")");b===undefined?c.direction=a>c.currentFrameID?1:-1:c.direction=b;c.frameChildren=c.currentFrame.children();c.nextFrameChildren=c.nextFrame.children();if(c.transitionsSupported){if(c.currentFrame.length!==0){c.settings.beforeCurrentFrameAnimatesOut();c.animateOut(c.direction)}var d=function(){c.animateIn(c.direction);c.currentFrameID=a};if(!c.firstFrame)switch(c.settings.transitionThreshold){case!0:c.waitForAnimationsToComplete(c.currentFrame,c.frameChildren,"out");break;case!1:d();break;default:setTimeout(d,c.settings.transitionThreshold)}else{d();c.firstFrame=!1}}else{c.sequence.children("li").css({position:"relative"});c.settings.beforeCurrentFrameAnimatesOut();c.currentFrame.animate({opacity:0},c.settings.fallbackTheme.speed,function(){c.currentFrame.css({display:"none","z-index":"1"});c.currentFrame.removeClass("current-frame");c.settings.beforeNextFrameAnimatesIn();c.nextFrame.addClass("current-frame").css({display:"block","z-index":c.numberOfFrames}).animate({opacity:1},500,function(){c.settings.afterNextFrameAnimatesIn()});c.currentFrame=c.nextFrame;c.currentFrameID=c.currentFrame.index()+1;c.active=!1;if(c.settings.autoPlay){var a=function(){c.autoPlaySequence()};clearTimeout(c.sequenceTimer);c.sequenceTimer=setTimeout(a,c.settings.autoPlayDelay,c)}})}}},animateOut:function(a){var b=this;b.currentFrame.removeClass("current-frame");b.nextFrame.addClass("next-frame");if(!b.settings.reverseAnimationsWhenNavigatingBackwards||a===1){b.modifyElements(b.nextFrameChildren,"0s");b.nextFrameChildren.removeClass("animate-out");b.modifyElements(b.frameChildren,"");b.frameChildren.addClass("animate-out").removeClass("animate-in")}if(b.settings.reverseAnimationsWhenNavigatingBackwards&&a===-1){b.modifyElements(b.nextFrameChildren,"0s");b.nextFrameChildren.addClass("animate-out");b.setTransitionProperties(b.frameChildren);b.frameChildren.removeClass("animate-in")}b.settings.transitionThreshold&&b.waitForAnimationsToComplete(b.currentFrame,b.currentFrame.children(),"out",!0)},animateIn:function(a){var b=this;b.currentFrame.unbind(b.transitionEnd);b.currentFrame=b.nextFrame;a===1?b.currentFrameID=b.currentFrameID!==b.numberOfFrames?b.currentFrameID+1:1:b.currentFrameID=b.currentFrameID!==1?b.currentFrameID-1:b.numberOfFrames;b.nextFrameChildren=b.nextFrame.children();b.frameChildren=b.currentFrame.children();b.settings.beforeNextFrameAnimatesIn();if(!b.settings.reverseAnimationsWhenNavigatingBackwards||a===1){b.modifyElements(b.nextFrameChildren,"0s");b.nextFrameChildren.removeClass("animate-out");setTimeout(function(){b.frameChildren.removeClass("animate-out");b.modifyElements(b.frameChildren,"");b.frameChildren.addClass("animate-in");b.waitForAnimationsToComplete(b.nextFrame,b.nextFrameChildren,"in");b.settings.transitionThreshold!==!0&&b.settings.afterCurrentFrameAnimatesOut!="function () {}"&&b.waitForAnimationsToComplete(b.currentFrame,b.currentFrame.children(),"out")},50)}else b.settings.reverseAnimationsWhenNavigatingBackwards&&a===-1&&setTimeout(function(){b.setTransitionProperties(b.frameChildren);b.frameChildren.addClass("animate-in").removeClass("animate-out");b.waitForAnimationsToComplete(b.nextFrame,b.nextFrameChildren,"in");b.settings.transitionThreshold!==!0&&b.settings.afterCurrentFrameAnimatesOut!="function () {}"&&b.waitForAnimationsToComplete(b.currentFrame,b.currentFrame.children(),"out")},50)},waitForAnimationsToComplete:function(b,c,d,e){var f=this;if(d==="out")var g=function(){f.active=!1;b.unbind(f.transitionEnd);f.settings.afterCurrentFrameAnimatesOut();e&&f.animateIn(f.direction)};else if(d==="in")var g=function(){b.unbind(f.transitionEnd);f.settings.afterNextFrameAnimatesIn();f.currentFrameID===f.numberOfFrames?f.settings.afterLastFrameAnimatesIn():f.currentFrameID===1&&f.settings.afterFirstFrameAnimatesIn();f.nextFrame.removeClass("next-frame").addClass("current-frame");f.active=!1;if(f.settings.autoPlay){var a=function(){f.autoPlaySequence()};clearTimeout(f.sequenceTimer);f.sequenceTimer=setTimeout(a,f.settings.autoPlayDelay,f)}};c.each(function(){a(this).data("animationEnded",!1)});f.currentFrame.bind(f.transitionEnd,function(b){a(b.target).data("animationEnded",!0);var d=!0;c.each(function(){a(this).data("animationEnded")===!1&&(d=!1)});d&&g()})}};a.fn.sequence=function(e){return this.each(function(){var f=new b(a(this),e,d,c);a(this).data("sequence",f)})};var c={modernizr:function(){window.Modernizr=function(a,b,c){function d(a){p.cssText=a}function e(a,b){return d(prefixes.join(a+";")+(b||""))}function f(a,b){return typeof a===b}function g(a,b){return!!~(""+a).indexOf(b)}function h(a,b){for(var d in a)if(p[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function i(a,b,d){for(var e in a){var g=b[a[e]];if(g!==c)return d===!1?a[e]:f(g,"function")?g.bind(d||b):g}return!1}function j(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+t.join(d+" ")+d).split(" ");return f(b,"string")||f(b,"undefined")?h(e,b):(e=(a+" "+u.join(d+" ")+d).split(" "),i(e,b,c))}var k="2.5.3",l={},m=b.documentElement,n="modernizr",o=b.createElement(n),p=o.style,q,r={}.toString,s="Webkit Moz O ms",t=s.split(" "),u=s.toLowerCase().split(" "),v={},w={},x={},y=[],z=y.slice,A,B={}.hasOwnProperty,C;!f(B,"undefined")&&!f(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&f(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(a){var b=self;if(typeof b!="function")throw new TypeError;var c=z.call(arguments,1),d=function(){if(self instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(z.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(z.call(arguments)))};return d});for(var D in v)C(v,D)&&(A=D.toLowerCase(),l[A]=v[D](),y.push((l[A]?"":"no-")+A));return d(""),o=q=null,l._version=k,l._domPrefixes=u,l._cssomPrefixes=t,l.testProp=function(a){return h([a])},l.testAllProps=j,l.prefixed=function(a,b,c){return b?j(a,b,c):j(a,"pfx")},l}(self,self.document)},defaultPreloader:function(b,c,d){var e=c?0:1;a("head").append("<style>#sequence-preloader{height: 100%;position: absolute;width: 100%;z-index: 999999;}@"+d+"keyframes preload{0%{opacity: 0;}50%{opacity: 1;}100%{opacity: 0;}}#sequence-preloader img{background: #ff9933;border-radius: 6px;display: inline-block;height: 12px;opacity: "+e+";position: relative;top: -50%;width: 12px;"+d+"animation: preload 1s infinite; animation: preload 1s infinite;}.preloading{height: 12px;margin: 0 auto;top: 50%;position: relative;width: 48px;}#sequence-preloader img:nth-child(2){"+d+"animation-delay: .15s; animation-delay: .15s;}#sequence-preloader img:nth-child(3){"+d+"animation-delay: .3s; animation-delay: .3s;}.preloading-complete{opacity: 0;visibility: hidden;"+d+"transition-duration: 1s; transition-duration: 1s;}</style>");a(b).prepend('<div id="sequence-preloader"><div class="preloading"><img src="images/sequence-preloader.png" alt="Sequence is loading, please wait..." /> <img src="images/sequence-preloader.png" alt="Sequence is loading, please wait..." /> <img src="images/sequence-preloader.png" alt="Sequence is loading, please wait..." /></div></div>')}},d={startingFrameID:1,cycle:!0,animateStartingFrameIn:!1,transitionThreshold:1e3,reverseAnimationsWhenNavigatingBackwards:!0,autoPlay:!0,autoPlayDirection:1,autoPlayDelay:5e3,nextButton:!1,prependNextButton:!1,nextButtonSrc:"images/bt-next.png",nextButtonAlt:"&#gt;",showNextButtonOnInit:!0,prevButton:!1,prependPrevButton:!1,prevButtonSrc:"images/bt-prev.png",prevButtonAlt:"&#lt;",showPrevButtonOnInit:!0,pauseButton:!1,prependPauseButton:!1,pauseButtonSrc:"images/bt-pause.png",pauseButtonAlt:"&#166;&#166;",unpauseDelay:0,pauseOnHover:!0,pauseIcon:!1,prependPauseIcon:!1,pauseIconSrc:"images/pause-icon.png",pauseAlt:"Pause",pauseOnElementsOutsideContainer:!1,preloader:!0,prependPreloader:!0,prependPreloadingComplete:!0,hidePreloaderUsingCSS:!0,hidePreloaderDelay:0,keyNavigation:!0,numericKeysGoToFrames:!0,keyPreventsDefault:!1,keyEvents:{left:"prev",right:"next"},customKeyEvents:{},swipeNavigation:!0,swipeThreshold:15,swipePreventsDefault:!1,swipeEvents:{left:"prev",right:"next",up:!1,down:!1},fallbackTheme:{speed:500},paused:function(){},unpaused:function(){},beforeNextFrameAnimatesIn:function(){},afterNextFrameAnimatesIn:function(){},beforeCurrentFrameAnimatesOut:function(){},afterCurrentFrameAnimatesOut:function(){},beforeFirstFrameAnimatesIn:function(){},afterFirstFrameAnimatesIn:function(){},beforeLastFrameAnimatesIn:function(){},afterLastFrameAnimatesIn:function(){},afterPreload:function(){}}})(jQuery);
545 scripts/sequence.jquery.js
View
@@ -1,6 +1,6 @@
/*
Sequence.js (www.sequencejs.com)
-Version: 0.6.4 Beta
+Version: 0.6.5 Beta
Author: Ian Lunn @IanLunn
Author URL: http://www.ianlunn.co.uk/
Github: https://github.com/IanLunn/Sequence
@@ -11,15 +11,15 @@ http://www.opensource.org/licenses/mit-license.php | http://www.gnu.org/licenses
Sequence.js and its dependencies are (c) Ian Lunn Design 2012 unless otherwise stated.
Aside from these comments, you may modify and distribute this file as you please. Have fun!
*/
-(function($){
- function Sequence(element, options, defaults, get){
+(function($){
+ function Sequence(element, options, defaults, get){
var self = this;
self.container = $(element),
self.sequence = self.container.children("ul");
try{ //is Modernizr.prefixed installed?
Modernizr.prefixed;
- if(Modernizr.prefixed == undefined){
+ if(Modernizr.prefixed === undefined){
throw "undefined";
}
}
@@ -28,25 +28,25 @@ Aside from these comments, you may modify and distribute this file as you please
}
var prefixes = {
- 'WebkitTransition' : '-webkit-',
- 'MozTransition' : '-moz-',
- 'OTransition' : '-o-',
- 'msTransition' : '-ms-',
- 'transition' : ''
+ 'WebkitTransition' : '-webkit-',
+ 'MozTransition' : '-moz-',
+ 'OTransition' : '-o-',
+ 'msTransition' : '-ms-',
+ 'transition' : ''
},
transitions = {
- 'WebkitTransition' : 'webkitTransitionEnd webkitAnimationEnd',
- 'MozTransition' : 'transitionend animationend',
- 'OTransition' : 'oTransitionEnd oAnimationEnd',
- 'msTransition' : 'MSTransitionEnd MSAnimationEnd',
- 'transition' : 'transitionend animationend'
+ 'WebkitTransition' : 'webkitTransitionEnd webkitAnimationEnd',
+ 'MozTransition' : 'transitionend animationend',
+ 'OTransition' : 'oTransitionEnd oAnimationEnd',
+ 'msTransition' : 'MSTransitionEnd MSAnimationEnd',
+ 'transition' : 'transitionend animationend'
};
self.prefix = prefixes[Modernizr.prefixed('transition')],
self.transitionEnd = transitions[Modernizr.prefixed('transition')],
self.transitionProperties = {},
self.numberOfFrames = self.sequence.children("li").length,
- self.transitionsSupported = (self.prefix != undefined) ? true : false, //determine if transitions are supported
+ self.transitionsSupported = (self.prefix !== undefined) ? true : false, //determine if transitions are supported
self.hasTouch = ("ontouchstart" in window) ? true : false, //determine if this is a touch enabled device
self.sequenceTimer,
self.paused = false,
@@ -60,19 +60,17 @@ Aside from these comments, you may modify and distribute this file as you please
case true:
case undefined:
get.defaultPreloader(self.prependTo, self.transitionsSupported, self.prefix);
- if(!self.transitionsSupported || self.prefix == "-o-"){
+ if(!self.transitionsSupported || self.prefix === "-o-"){
self.preloaderFallback();
}
return $("#sequence-preloader");
- break;
case false:
- break;
+ break;
default:
this.CSSSelectorToHTML(optionPreloader);
return $(optionPreloader);
- break;
}
},
@@ -80,22 +78,19 @@ Aside from these comments, you may modify and distribute this file as you please
switch(devOption){
case false:
return undefined;
- break;
- case true:
- if(prependTo == true){
+ case true:
+ if(prependTo === true){
$(self.container).prepend('<img '+this.CSSSelectorToHTML(defaultOption)+ 'src="'+elementSrc+'" alt="'+elementAlt+'" />');
- }else if(prependTo != false){
+ }else if(prependTo !== false){
$(prependTo).prepend('<img '+this.CSSSelectorToHTML(defaultOption)+ 'src="'+elementSrc+'" alt="'+elementAlt+'" />');
}
return $(defaultOption);
- break;
default:
var prependElement = (prependTo == true) ? self.container : prependTo;
$(prependElement).prepend('<img '+this.CSSSelectorToHTML(devOption)+ 'src="'+elementSrc+'" alt="'+elementAlt+'" />');
return $(devOption);
- break;
}
},
@@ -103,22 +98,20 @@ Aside from these comments, you may modify and distribute this file as you please
switch(selector.charAt(0)){
case ".":
return 'class="'+selector.split(".")[1]+'"';
- break;
case "#":
return 'id="'+selector.split("#")[1]+'"';
- break;
default:
return selector;
- break;
}
}
- },
+ },
//INIT
self.settings = $.extend({}, defaults, options),
self.settings.preloader = self.init.preloader(self.settings.preloader);
+ self.firstFrame = (self.settings.animateStartingFrameIn) ? true : false;
if(self.settings.animateStartingFrameIn){
self.modifyElements(self.sequence.children("li").children(), "0s");
@@ -128,7 +121,7 @@ Aside from these comments, you may modify and distribute this file as you please
if(self.settings.preloader){
$(window).bind("load", function(){
self.settings.afterPreload();
- if(self.settings.hidePreloaderUsingCSS && self.transitionsSupported && self.prefix != "-o-"){
+ if(self.settings.hidePreloaderUsingCSS && self.transitionsSupported && self.prefix !== "-o-"){
self.prependPreloadingCompleteTo = (self.settings.prependPreloadingComplete == true) ? self.settings.preloader : $(self.settings.prependPreloadingComplete);
self.prependPreloadingCompleteTo.addClass("preloading-complete");
setTimeout(init, self.settings.hidePreloaderDelay);
@@ -147,21 +140,21 @@ Aside from these comments, you may modify and distribute this file as you please
function init(){
$(self.settings.preloader).remove();
- self.settings.nextButton = self.init.uiElements(self.settings.prependNextButton, self.settings.nextButton, ".next", self.settings.nextButtonSrc, self.settings.nextButtonAlt);
+ self.settings.nextButton = self.init.uiElements(self.settings.prependNextButton, self.settings.nextButton, ".next", self.settings.nextButtonSrc, self.settings.nextButtonAlt);
self.settings.prevButton = self.init.uiElements(self.settings.prependPrevButton, self.settings.prevButton, ".prev", self.settings.prevButtonSrc, self.settings.prevButtonAlt);
self.settings.pauseButton = self.init.uiElements(self.settings.prependPauseButton, self.settings.pauseButton, ".pause", self.settings.pauseButtonSrc, self.settings.pauseButtonAlt);
- if((self.settings.nextButton != undefined && self.settings.nextButton != false) && self.settings.showNextButtonOnInit){self.settings.nextButton.show()};
+ if((self.settings.nextButton !== undefined && self.settings.nextButton !== false) && self.settings.showNextButtonOnInit){self.settings.nextButton.show();}
- if((self.settings.prevButton != undefined && self.settings.prevButton != false) && self.settings.showPrevButtonOnInit){self.settings.prevButton.show()};
+ if((self.settings.prevButton !== undefined && self.settings.prevButton !== false) && self.settings.showPrevButtonOnInit){self.settings.prevButton.show();}
- if((self.settings.pauseButton != undefined && self.settings.pauseButton != false)){self.settings.pauseButton.show()};
+ if((self.settings.pauseButton !== undefined && self.settings.pauseButton !== false)){self.settings.pauseButton.show();}
- if(self.settings.pauseIcon != false){
+ if(self.settings.pauseIcon !== false){
self.settings.pauseIcon = self.init.uiElements(self.settings.prependPauseIcon, self.settings.pauseIcon, ".pause-icon", self.settings.pauseIconSrc);
- if(self.settings.pauseIcon != undefined){
+ if(self.settings.pauseIcon !== undefined){
self.settings.pauseIcon.hide();
}
}
@@ -178,7 +171,7 @@ Aside from these comments, you may modify and distribute this file as you please
self.sequence.css({"width": "100%", "height": "100%"}); //set the sequence list to 100% width/height just incase it hasn't been specified in the CSS
- if(self.transitionsSupported){ //initiate the full featured Sequence if transitions are supported...
+ if(self.transitionsSupported){ //initiate the full featured Sequence if transitions are supported...
if(!self.settings.animateStartingFrameIn){ //start first frame in animated in position
self.currentFrame = self.nextFrame;
self.currentFrame.addClass("current-frame");
@@ -187,21 +180,21 @@ Aside from these comments, you may modify and distribute this file as you please
self.modifyElements(self.currentFrameChildren, "0s");
self.currentFrameChildren.addClass("animate-in");
- setTimeout(function(){
+ setTimeout(function(){
self.modifyElements(self.currentFrameChildren, "");
}, 100);
if(self.settings.autoPlay){
- var autoPlaySequence = function(){self.autoPlaySequence()};
+ var autoPlaySequence = function(){self.autoPlaySequence();};
clearTimeout(self.sequenceTimer);
self.sequenceTimer = setTimeout(autoPlaySequence, self.settings.autoPlayDelay, self);
}
}else if(self.settings.reverseAnimationsWhenNavigatingBackwards && self.settings.autoPlayDirection -1 && self.settings.animateStartingFrameIn){ //animate in backwards
self.modifyElements(self.nextFrameChildren, "0s");
- self.nextFrameChildren.addClass("animate-out");
+ self.nextFrameChildren.addClass("animate-out");
self.goTo(1, -1);
}else{ //animate in forwards
- self.goTo(1, 1);
+ self.goTo(1, 1);
}
}else{ //initiate a basic slider for browsers that don't support CSS3 transitions
self.container.addClass("sequence-fallback");
@@ -215,101 +208,103 @@ Aside from these comments, you may modify and distribute this file as you please
self.nextFrame.css("z-index", self.numberOfFrames);
self.sequence.children(":not(li:nth-child("+self.settings.startingFrameID+"))").css({"display": "none", "opacity": 0});
if(self.settings.autoPlay){
- var autoPlaySequence = function(){self.autoPlaySequence()};
+ var autoPlaySequence = function(){self.autoPlaySequence();};
clearTimeout(self.sequenceTimer);
self.sequenceTimer = setTimeout(autoPlaySequence, self.settings.autoPlayDelay, self);
}
}
- //END INIT
+ //END INIT
//EVENTS
- if(self.settings.nextButton != undefined){
+ if(self.settings.nextButton !== undefined){
self.settings.nextButton.click(function(){
self.next();
});
}
- if(self.settings.prevButton != undefined){
+ if(self.settings.prevButton !== undefined){
self.settings.prevButton.click(function(){
self.prev();
});
}
- if(self.settings.pauseButton != undefined){
+ if(self.settings.pauseButton !== undefined){
self.settings.pauseButton.click(function(){
self.pause();
});
}
if(self.settings.keyNavigation){
- defaultKeys = {
+ var defaultKeys = {
'left' : 37,
'right' : 39
- }
+ };
$(document).keydown(function(e){
function keyEvents(keyPressed, keyDirections){
+ var keyCode;
for(keyCodes in keyDirections){
- if(keyCodes == "left" || keyCodes == "right"){
+ if(keyCodes === "left" || keyCodes === "right"){
keyCode = defaultKeys[keyCodes];
}else{
keyCode = keyCodes;
}
- if(keyPressed == keyCode){
+ if(keyPressed === keyCode){
self.initCustomKeyEvent(keyDirections[keyCodes]);
}
}
}
//if numeric keys should go to a specific frame...
- char = parseFloat(String.fromCharCode(e.keyCode));
+ var char = parseFloat(String.fromCharCode(e.keyCode));
if((char > 0 && char <= self.numberOfFrames) && (self.settings.numericKeysGoToFrames)){
self.nextFrameID = char;
self.goTo(char); //go to specified frame
- }
+ }
keyEvents(e.keyCode, self.settings.keyEvents); //run default keyevents
keyEvents(e.keyCode, self.settings.customKeyEvents); //run custom keyevents
});
}
+
+ function hoverDetect(e){
+ self.containerLeft = self.container.position().left;
+ self.containerRight = (self.container.position().left + self.container.width());
+ self.containerTop = self.container.position().top;
+ self.containerBottom = (self.container.position().top + self.container.height());
+ var pageX = e.pageX;
+ var pageY = e.pageY;
+ if(pageX >= self.containerLeft && pageX <= self.containerRight && pageY >= self.containerTop && pageY <= self.containerBottom){
+ self.settings.autoPlay = false;
+ clearTimeout(self.sequenceTimer);
+ $(self.settings.pauseIcon).show();
+ if(self.settings.pauseButton !== undefined){
+ self.settings.pauseButton.addClass("paused");
+ }
+ self.settings.paused();
+ self.sequence.unbind("mousemove");
+ }
+ }
if(self.settings.pauseOnHover && !self.settings.pauseOnElementsOutsideContainer && self.settings.autoPlay){
- function hoverDetect(e){
- self.containerLeft = self.container.position().left;
- self.containerRight = (self.container.position().left + self.container.width());
- self.containerTop = self.container.position().top;
- self.containerBottom = (self.container.position().top + self.container.height());
- pageX = e.pageX;
- pageY = e.pageY;
- if(pageX >= self.containerLeft && pageX <= self.containerRight && pageY >= self.containerTop && pageY <= self.containerBottom){
- self.settings.autoPlay = false;
- clearTimeout(self.sequenceTimer);
- $(self.settings.pauseIcon).show();
- if(self.settings.pauseButton != undefined){
- self.settings.pauseButton.addClass("paused");
- }
- self.settings.paused();
- self.sequence.unbind("mousemove");
- };
- }
self.hoverEvent = self.sequence.mousemove(function(e){
- hoverDetect(e);
+ hoverDetect(e);
});
self.sequence.mouseleave(function(e){
self.settings.autoPlay = true;
- var autoPlaySequence = function(){self.autoPlaySequence()};
+ var autoPlaySequence = function(){self.autoPlaySequence();};
clearTimeout(self.sequenceTimer);
self.sequenceTimer = setTimeout(autoPlaySequence, self.settings.autoPlayDelay, self);
$(self.settings.pauseIcon).hide();
- if(self.settings.pauseButton != undefined){
+ if(self.settings.pauseButton !== undefined){
self.settings.pauseButton.removeClass("paused");
}
self.settings.unpaused();
- if(self.sequence.data("events").mousemove == undefined){
+ if(self.sequence.data("events").mousemove === undefined){
self.sequence.mousemove(function(e){
- hoverDetect(e);
+ hoverDetect(e);
});
}
});
@@ -318,17 +313,17 @@ Aside from these comments, you may modify and distribute this file as you please
self.settings.autoPlay = false;
clearTimeout(self.sequenceTimer);
$(self.settings.pauseIcon).show();
- if(self.settings.pauseButton != undefined){
+ if(self.settings.pauseButton !== undefined){
self.settings.pauseButton.addClass("paused");
}
self.settings.paused();
}, function(){
self.settings.autoPlay = true;
- var autoPlaySequence = function(){self.autoPlaySequence()};
+ var autoPlaySequence = function(){self.autoPlaySequence();};
clearTimeout(self.sequenceTimer);
self.sequenceTimer = setTimeout(autoPlaySequence, self.settings.autoPlayDelay, self);
$(self.settings.pauseIcon).hide();
- if(self.settings.pauseButton != undefined){
+ if(self.settings.pauseButton !== undefined){
self.settings.pauseButton.removeClass("paused");
}
self.settings.unpaused();
@@ -336,68 +331,68 @@ Aside from these comments, you may modify and distribute this file as you please
}
if(self.settings.swipeNavigation && self.hasTouch){
- var touches = {
- "touchstartX": -1,
- "touchstartY": -1,
- "touchmoveX": -1,
- "touchmoveY": -1
- };
- self.sequence.on("touchstart touchmove touchend", function(e){
- if(self.settings.swipePreventsDefault){
- e.preventDefault();
- }
- switch(e.originalEvent.type){
- case "touchmove":
- case "touchstart":
- touches[e.originalEvent.type + "X"] = e.originalEvent.touches[0].pageX;
- touches[e.originalEvent.type + "Y"] = e.originalEvent.touches[0].pageY;
- break;
- case 'touchend':
- if(touches["touchmoveX"] != -1){
- //find out which way the user moved their finger the most
- xAmount = touches["touchmoveX"] - touches["touchstartX"];
- yAmount = touches["touchmoveY"] - touches["touchstartY"];
-
- if(Math.abs(xAmount) > Math.abs(yAmount) && (xAmount > self.settings.calculatedSwipeThreshold)){
- //user swiped right
- self.initCustomKeyEvent(self.settings.swipeEvents.right);
- }else if(Math.abs(xAmount) > Math.abs(yAmount) && (Math.abs(xAmount) > self.settings.calculatedSwipeThreshold)){
- //user swiped left
- self.initCustomKeyEvent(self.settings.swipeEvents.left);
- }else if(Math.abs(yAmount) > Math.abs(xAmount) && (yAmount > self.settings.calculatedSwipeThreshold)){
- //user swiped down
- self.initCustomKeyEvent(self.settings.swipeEvents.down);
- }else if(Math.abs(yAmount) > Math.abs(xAmount) && (Math.abs(yAmount) > self.settings.calculatedSwipeThreshold)){
- //user swiped up
- self.initCustomKeyEvent(self.settings.swipeEvents.up);
- }
-
- touches = {
- "touchstartX": -1,
- "touchstartY": -1,
- "touchmoveX": -1,
- "touchmoveY": -1
- };
- }
- break;
- default:
- break;
- }
- });
+ var touches = {
+ "touchstartX": -1,
+ "touchstartY": -1,
+ "touchmoveX": -1,
+ "touchmoveY": -1
+ };
+ self.sequence.on("touchstart touchmove touchend", function(e){
+ if(self.settings.swipePreventsDefault){
+ e.preventDefault();
+ }
+ switch(e.originalEvent.type){
+ case "touchmove":
+ case "touchstart":
+ touches[e.originalEvent.type + "X"] = e.originalEvent.touches[0].pageX;
+ touches[e.originalEvent.type + "Y"] = e.originalEvent.touches[0].pageY;
+ break;
+ case 'touchend':
+ if(touches.touchmoveX !== -1){
+ //find out which way the user moved their finger the most
+ var xAmount = touches.touchmoveX - touches.touchstartX;
+ var yAmount = touches.touchmoveY - touches.touchstartY;
+
+ if(Math.abs(xAmount) > Math.abs(yAmount) && (xAmount > self.settings.calculatedSwipeThreshold)){
+ //user swiped right
+ self.initCustomKeyEvent(self.settings.swipeEvents.right);
+ }else if(Math.abs(xAmount) > Math.abs(yAmount) && (Math.abs(xAmount) > self.settings.calculatedSwipeThreshold)){
+ //user swiped left
+ self.initCustomKeyEvent(self.settings.swipeEvents.left);
+ }else if(Math.abs(yAmount) > Math.abs(xAmount) && (yAmount > self.settings.calculatedSwipeThreshold)){
+ //user swiped down
+ self.initCustomKeyEvent(self.settings.swipeEvents.down);
+ }else if(Math.abs(yAmount) > Math.abs(xAmount) && (Math.abs(yAmount) > self.settings.calculatedSwipeThreshold)){
+ //user swiped up
+ self.initCustomKeyEvent(self.settings.swipeEvents.up);
+ }
+
+ touches = {
+ "touchstartX": -1,
+ "touchstartY": -1,
+ "touchmoveX": -1,
+ "touchmoveY": -1
+ };
+ }
+ break;
+ default:
+ break;
+ }
+ });
}
$(window).resize(function(){ //if the window is resized...
self.settings.calculatedSwipeThreshold = self.container.width() * (self.settings.swipeThreshold / 100); //recalculate the swipe threshold
});
//END EVENTS
- }
+ }
} //END CONSTRUCTOR
Sequence.prototype = {
preloaderFallback: function(){ //if transitions aren't supported, call this fallback to show the default preloading animations
- i = 0;
+ var self = this, i = 0;
function preload(){
- i = (i == 1) ? 0 : 1;
+ i = (i === 1) ? 0 : 1;
$("#sequence-preloader img:nth-child(1)").animate({"opacity": i}, 100);
$("#sequence-preloader img:nth-child(2)").animate({"opacity": i}, 350);
$("#sequence-preloader img:nth-child(3)").animate({"opacity": i}, 600);
@@ -425,7 +420,7 @@ Aside from these comments, you may modify and distribute this file as you please
autoPlaySequence: function(direction){
var self = this;
- if(self.settings.autoPlayDirection == 1){
+ if(self.settings.autoPlayDirection === 1){
self.next();
}else{
self.prev();
@@ -439,12 +434,12 @@ Aside from these comments, you may modify and distribute this file as you please
"transition-duration": cssValue,
"transition-delay": cssValue
})
- )
+ );
},
//adds the browser vendors prefix onto multiple CSS properties
prefixCSS: function(prefix, properties){
- css = {};
+ var css = {};
for(property in properties){
css[prefix + property] = properties[property];
}
@@ -453,10 +448,10 @@ Aside from these comments, you may modify and distribute this file as you please
//Opera workaround: currently Opera has a bug that prevents retrieving a prefixed CSS property from the DOM, meaning we have to search through the CSS file instead. It's not ideal in terms of performance but hopefully it'll be fixed in the future
getStyleBySelector: function(selector){
- css = {};
+ var css = {};
var sheetList = document.styleSheets, ruleList, i, j;
for(i = sheetList.length - 1; i >= 0; i--){
- error = false;
+ var error = false;
try{
ruleList = sheetList[i].cssRules;
}
@@ -465,7 +460,7 @@ Aside from these comments, you may modify and distribute this file as you please
}
if(!error){
for(j = 0; j < ruleList.length; j++){
- if(ruleList[j].type == CSSRule.STYLE_RULE && ruleList[j].selectorText == selector){
+ if(ruleList[j].type === CSSRule.STYLE_RULE && ruleList[j].selectorText === selector){
css["-o-transition-duration"] = ruleList[j].style.OTransitionDuration;
css["-o-transition-delay"] = ruleList[j].style.OTransitionDelay;
return css;
@@ -481,12 +476,12 @@ Aside from these comments, you may modify and distribute this file as you please
var self = this;
self.modifyElements(self.frameChildren, "");
self.frameChildren.each(function(){
- if(self.prefix == "-o-"){
- selector = "." + $(this).attr("class").replace(" ", ".");
- previousFrameTransitionProperties = self.getStyleBySelector(selector);
+ if(self.prefix === "-o-"){
+ var selector = "." + $(this).attr("class").replace(" ", ".");
+ var previousFrameTransitionProperties = self.getStyleBySelector(selector);
self.transitionProperties["transition-duration"] = previousFrameTransitionProperties["-o-transition-duration"];
self.transitionProperties["transition-delay"] = previousFrameTransitionProperties["-o-transition-delay"];
- self.transitionProperties["transition-delay"] = (self.transitionProperties["transition-delay"] == "") ? "0s" : self.transitionProperties["transition-delay"];
+ self.transitionProperties["transition-delay"] = (self.transitionProperties["transition-delay"] === "") ? "0s" : self.transitionProperties["transition-delay"];
}else{
self.transitionProperties["transition-duration"] = $(this).css(self.prefix + "transition-duration");
self.transitionProperties["transition-delay"] = $(this).css(self.prefix + "transition-delay");
@@ -502,13 +497,13 @@ Aside from these comments, you may modify and distribute this file as you please
pause: function(){
var self = this;
if(self.settings.autoPlay){ //pause Sequence
- if(self.settings.pauseButton != undefined){
+ if(self.settings.pauseButton !== undefined){
self.settings.pauseButton.addClass("paused");
}
self.settings.paused();
self.stopAutoPlay();
}else{ //start autoPlay
- if(self.settings.pauseButton != undefined){
+ if(self.settings.pauseButton !== undefined){
self.settings.pauseButton.removeClass("paused");
}
self.settings.unpaused();
@@ -519,10 +514,10 @@ Aside from these comments, you may modify and distribute this file as you please
//start Sequence causing frames to change every x amount of seconds
startAutoPlay: function(wait, newAutoPlayDelay){
var self = this;
- wait = (wait == undefined) ? 0 : wait;
- self.settings.autoPlayDelay = (newAutoPlayDelay == undefined) ? self.settings.autoPlayDelay : newAutoPlayDelay;
+ wait = (wait === undefined) ? 0 : wait;
+ self.settings.autoPlayDelay = (newAutoPlayDelay === undefined) ? self.settings.autoPlayDelay : newAutoPlayDelay;
self.settings.autoPlay = true;
- var autoPlaySequence = function(){self.autoPlaySequence()};
+ var autoPlaySequence = function(){self.autoPlaySequence();};
clearTimeout(self.sequenceTimer);
self.sequenceTimer = setTimeout(autoPlaySequence, wait, self);
if(self.settings.pauseOnHover){
@@ -530,17 +525,17 @@ Aside from these comments, you may modify and distribute this file as you please
self.settings.autoPlay = false;
clearTimeout(self.sequenceTimer);
$(self.settings.pauseIcon).show();
- if(self.settings.pauseButton != undefined){
+ if(self.settings.pauseButton !== undefined){
self.settings.pauseButton.addClass("paused");
}
self.settings.paused();
}, function(){
self.settings.autoPlay = true;
- var autoPlaySequence = function(){self.autoPlaySequence()};
+ var autoPlaySequence = function(){self.autoPlaySequence();};
clearTimeout(self.sequenceTimer);
self.sequenceTimer = setTimeout(autoPlaySequence, self.settings.autoPlayDelay, self);
$(self.settings.pauseIcon).hide();
- if(self.settings.pauseButton != undefined){
+ if(self.settings.pauseButton !== undefined){
self.settings.pauseButton.removeClass("paused");
}
self.settings.unpaused();
@@ -555,7 +550,7 @@ Aside from these comments, you may modify and distribute this file as you please
var self = this;
self.settings.autoPlay = false;
clearTimeout(self.sequenceTimer);
- if(self.hoverEvent != undefined){
+ if(self.hoverEvent !== undefined){
self.hoverEvent.unbind();
}
},
@@ -563,16 +558,17 @@ Aside from these comments, you may modify and distribute this file as you please
//go to the frame ahead of the current one
next: function(){
var self = this;
+
if(!self.active){
- if(self.settings.cycle || (!self.settings.cycle && self.currentFrame.index() + 1 != self.numberOfFrames)){
+ if(self.settings.cycle || (!self.settings.cycle && self.currentFrameID !== self.numberOfFrames)){
if(self.paused){
self.paused = false;
self.startAutoPlay();
}
- self.nextFrameID = (self.currentFrame.index() + 1 != self.numberOfFrames) ? self.currentFrameID + 1 : 1;
+ self.nextFrameID = (self.currentFrameID !== self.numberOfFrames) ? self.currentFrameID + 1 : 1;
self.goTo(self.nextFrameID, 1); //go to the next frame
- }else if(self.settings.autoPlayDirection == 1){
+ }else if(self.settings.autoPlayDirection === 1){
self.paused = true;
self.stopAutoPlay();
}
@@ -583,69 +579,76 @@ Aside from these comments, you may modify and distribute this file as you please
prev: function(){
var self = this;
if(!self.active){
- if(self.settings.cycle || (!self.settings.cycle && self.currentFrame.index() + 1 != 1)){
+ if(self.settings.cycle || (!self.settings.cycle && self.currentFrameID !== 1)){
if(self.paused){
self.paused = false;
self.startAutoPlay();
}
- self.nextFrameID = (self.currentFrame.index() + 1 == 1) ? self.numberOfFrames : self.currentFrameID - 1;
+ self.nextFrameID = (self.currentFrameID === 1) ? self.numberOfFrames : self.currentFrameID - 1;
+
self.goTo(self.nextFrameID, -1); //go to the prev frame
- }else if(self.settings.autoPlayDirection == -1){
+ }else if(self.settings.autoPlayDirection === -1){
self.paused = true;
self.stopAutoPlay();
}
+
}
},
//go to a specific frame
goTo: function(id, direction){
var self = this;
- if(id == self.numberOfFrames){
+ if(id === self.numberOfFrames){
self.settings.beforeLastFrameAnimatesIn();
- }else if(id == 1){
+ }else if(id === 1){
self.settings.beforeFirstFrameAnimatesIn();
}
- if(self.currentFrame != undefined && id == self.currentFrame.index() + 1){ //if the user is trying to go to the frame that is already active...
+ if(self.currentFrame !== undefined && id === self.currentFrame.index() + 1){ //if the user is trying to go to the frame that is already active...
return false; //...don't go to that frame
}else if(!self.active){ //if there are no animations running...
self.active = true; //set the sequence as active
self.currentFrame = self.sequence.children(".current-frame"); //find which frame is active
self.nextFrame = self.sequence.children("li:nth-child("+id+")"); //grab the next frame
- if(direction == undefined){ //if no direction is specified...
+ if(direction === undefined){ //if no direction is specified...
self.direction = (id > self.currentFrameID) ? 1 : -1; //work out which way to go based on what frame is currently active
}else{
self.direction = direction;
}
-
+
self.frameChildren = self.currentFrame.children(); //save the child elements
- self.nextFrameChildren = self.nextFrame.children(); //save the child elements
+ self.nextFrameChildren = self.nextFrame.children(); //save the child elements
if(self.transitionsSupported){ //if the browser supports CSS3 transitions...
- if(self.currentFrame.length != 0){
+ if(self.currentFrame.length !== 0){
self.settings.beforeCurrentFrameAnimatesOut();
self.animateOut(self.direction);
}
-
+
var animateIn = function(){
self.animateIn(self.direction);
self.currentFrameID = id;
- }
-
- switch(self.settings.delayDuringOutInTransitions){
- case true:
- self.waitForAnimationsToComplete(self.currentFrame, self.frameChildren);
- break;
-
- case false:
- animateIn();
- break;
-
- default:
- setTimeout(animateIn, self.settings.delayDuringOutInTransitions);
- break;
+ };
+
+ if(!self.firstFrame){
+ switch(self.settings.transitionThreshold){
+ case true:
+ self.waitForAnimationsToComplete(self.currentFrame, self.frameChildren, "out");
+ break;
+
+ case false:
+ animateIn();
+ break;
+
+ default:
+ setTimeout(animateIn, self.settings.transitionThreshold);
+ break;
+ }
+ }else{
+ animateIn();
+ self.firstFrame = false;
}
}else{ //if the browser doesn't support CSS3 transitions...
self.sequence.children("li").css({"position": "relative"}); //this allows for fadein/out in IE
@@ -661,52 +664,51 @@ Aside from these comments, you may modify and distribute this file as you please
self.currentFrameID = self.currentFrame.index() + 1;
self.active = false;
if(self.settings.autoPlay){
- var autoPlaySequence = function(){self.autoPlaySequence()};
+ var autoPlaySequence = function(){self.autoPlaySequence();};
clearTimeout(self.sequenceTimer);
self.sequenceTimer = setTimeout(autoPlaySequence, self.settings.autoPlayDelay, self);
}
- });
- }
+ });
+ }
}
},
animateOut: function(direction){
var self = this;
self.currentFrame.removeClass("current-frame");
- self.nextFrame.addClass("next-frame");
- if(!self.settings.reverseAnimationsWhenNavigatingBackwards || direction == 1){ //if user hit next button...
- //reset the position of the next frames elements ready for animating in again
- self.modifyElements(self.nextFrameChildren, "0s");
- self.nextFrameChildren.removeClass("animate-out");
- //make the current frames elements animate out
- self.modifyElements(self.frameChildren, "");
- if(!self.settings.disableAnimateOut){
+ self.nextFrame.addClass("next-frame")
+ if(!self.settings.reverseAnimationsWhenNavigatingBackwards || direction === 1){ //if user hit next button...
+ //reset the position of the next frames elements ready for animating in again
+ self.modifyElements(self.nextFrameChildren, "0s");
+ self.nextFrameChildren.removeClass("animate-out");
+
+ //make the current frames elements animate out
+ self.modifyElements(self.frameChildren, "");
self.frameChildren.addClass("animate-out").removeClass("animate-in");
}
- }
-
- if(self.settings.reverseAnimationsWhenNavigatingBackwards && direction == -1){ //if the user hit prev button
- self.modifyElements(self.nextFrameChildren, "0s");
- if(!self.settings.disableAnimateOut){
- self.nextFrameChildren.addClass("animate-out");
- }else{
- self.active = false;
- }
- self.setTransitionProperties(self.frameChildren);
- self.frameChildren.removeClass("animate-in");
- }
+ if(self.settings.reverseAnimationsWhenNavigatingBackwards && direction === -1){ //if the user hit prev button
+ self.modifyElements(self.nextFrameChildren, "0s");
+ self.nextFrameChildren.addClass("animate-out");
+ self.setTransitionProperties(self.frameChildren);
+ self.frameChildren.removeClass("animate-in");
+ }
+
+ if(self.settings.transitionThreshold){
+ self.waitForAnimationsToComplete(self.currentFrame, self.currentFrame.children(), "out", true);
+ }
},
animateIn: function(direction){
var self = this;
self.currentFrame.unbind(self.transitionEnd); //remove the animation end event
self.currentFrame = self.nextFrame; //the next frame is now the current one
- if(direction == 1){
- self.currentFrameID = (self.currentFrameID != self.numberOfFrames) ? self.currentFrameID + 1 : 1;
+
+ if(direction === 1){
+ self.currentFrameID = (self.currentFrameID !== self.numberOfFrames) ? self.currentFrameID + 1 : 1;
}else{
- self.currentFrameID = (self.currentFrameID != 1) ? self.currentFrameID - 1 : self.numberOfFrames;
+ self.currentFrameID = (self.currentFrameID !== 1) ? self.currentFrameID - 1 : self.numberOfFrames;
}
self.nextFrameChildren = self.nextFrame.children(); //save the child elements
@@ -714,7 +716,7 @@ Aside from these comments, you may modify and distribute this file as you please
self.settings.beforeNextFrameAnimatesIn();
- if(!self.settings.reverseAnimationsWhenNavigatingBackwards || direction == 1){ //if user hit next button...
+ if(!self.settings.reverseAnimationsWhenNavigatingBackwards || direction === 1){ //if user hit next button...
//reset the position of the next frames elements ready for animating in again
self.modifyElements(self.nextFrameChildren, "0s");
@@ -723,63 +725,82 @@ Aside from these comments, you may modify and distribute this file as you please
setTimeout(function(){
self.frameChildren.removeClass("animate-out");
self.modifyElements(self.frameChildren, "");
+ //self.active = true;
self.frameChildren.addClass("animate-in");
- self.waitForAnimationsToComplete(self.nextFrame, self.nextFrameChildren);
+ self.waitForAnimationsToComplete(self.nextFrame, self.nextFrameChildren, "in");
+ if(self.settings.transitionThreshold !== true && self.settings.afterCurrentFrameAnimatesOut != "function () {}"){
+ self.waitForAnimationsToComplete(self.currentFrame, self.currentFrame.children(), "out");
+ }
}, 50);
- }
-
- if(self.settings.reverseAnimationsWhenNavigatingBackwards && direction == -1){ //if the user hit prev button
-
+ }else if(self.settings.reverseAnimationsWhenNavigatingBackwards && direction === -1){ //if the user hit prev button
setTimeout(function(){
self.setTransitionProperties(self.frameChildren);
self.frameChildren.addClass("animate-in").removeClass("animate-out");
- self.waitForAnimationsToComplete(self.nextFrame, self.nextFrameChildren);
- }, 50);
+ self.waitForAnimationsToComplete(self.nextFrame, self.nextFrameChildren, "in");
+ if(self.settings.transitionThreshold !== true && self.settings.afterCurrentFrameAnimatesOut != "function () {}"){
+ self.waitForAnimationsToComplete(self.currentFrame, self.currentFrame.children(), "out");
+ }
+ }, 50);
}
},
- waitForAnimationsToComplete: function(frame, elements){
+ waitForAnimationsToComplete: function(frame, elements, direction, inAfterwards){
var self = this;
-
- onceComplete = function(){
- frame.unbind(self.transitionEnd);
- self.settings.afterNextFrameAnimatesIn();
-
- if(self.currentFrameID == self.numberOfFrames){
- self.settings.afterLastFrameAnimatesIn();
- }else if(self.currentFrameID == 1){
- self.settings.afterFirstFrameAnimatesIn();
- }
+ if(direction === "out"){
- self.nextFrame.removeClass("next-frame").addClass("current-frame");
- self.active = false;
-
- if(self.settings.autoPlay){
- var autoPlaySequence = function(){self.autoPlaySequence()};
- clearTimeout(self.sequenceTimer);
- self.sequenceTimer = setTimeout(autoPlaySequence, self.settings.autoPlayDelay, self);
- }
+ //animate out complete
+ var onceComplete = function(){
+ self.active = false;
+ frame.unbind(self.transitionEnd);
+ self.settings.afterCurrentFrameAnimatesOut();
+
+ if(inAfterwards){
+ self.animateIn(self.direction);
+ }
+ };
+ }else if(direction === "in"){
+ //animate in complete
+ var onceComplete = function(){
+ frame.unbind(self.transitionEnd);
+ self.settings.afterNextFrameAnimatesIn();
+
+ if(self.currentFrameID === self.numberOfFrames){
+ self.settings.afterLastFrameAnimatesIn();
+ }else if(self.currentFrameID === 1){
+ self.settings.afterFirstFrameAnimatesIn();
+ }
+
+ self.nextFrame.removeClass("next-frame").addClass("current-frame");
+ self.active = false;
+
+ if(self.settings.autoPlay){
+ var autoPlaySequence = function(){self.autoPlaySequence();};
+ clearTimeout(self.sequenceTimer);
+ self.sequenceTimer = setTimeout(autoPlaySequence, self.settings.autoPlayDelay, self);
+ }
+ };
+
}
elements.each(function(){
- $(this).data('animationEnded', false); // set the data attribute to indicate that the elements animation has not yet ended
- });
-
- self.currentFrame.bind(self.transitionEnd, function(e){
- $(e.target).data('animationEnded', true); // this element has finished it's animation
-
- // now we'll check if all elements are finished animating
- var allAnimationsEnded = true;
- elements.each(function(){
- if($(this).data('animationEnded') == false){
- allAnimationsEnded = false;
- }
- });
+ $(this).data('animationEnded', false); // set the data attribute to indicate that the elements animation has not yet ended
+ });
- if(allAnimationsEnded){
- onceComplete();
- }
- });
+ self.currentFrame.bind(self.transitionEnd, function(e){
+ $(e.target).data('animationEnded', true); // this element has finished it's animation
+
+ // now we'll check if all elements are finished animating
+ var allAnimationsEnded = true;
+ elements.each(function(){
+ if($(this).data('animationEnded') === false){
+ allAnimationsEnded = false;
+ }
+ });
+
+ if(allAnimationsEnded){
+ onceComplete();
+ }
+ });
}
}; //END PROTOTYPE
@@ -793,8 +814,8 @@ Aside from these comments, you may modify and distribute this file as you please
//some external functions
var get = {
/* Modernizr 2.5.3 (Custom Build) | MIT & BSD
- * Build: http://www.modernizr.com/download/#-prefixed-testprop-testallprops-domprefixes*/
- modernizr: function(){
+ * Build: http://www.modernizr.com/download/#-prefixed-testprop-testallprops-domprefixes*/
+ modernizr: function(){
;window.Modernizr = function(a,b,c){function w(a){i.cssText=a}function x(a,b){return w(prefixes.join(a+";")+(b||""))}function y(a,b){return typeof a===b}function z(a,b){return!!~(""+a).indexOf(b)}function A(a,b){for(var d in a)if(i[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function B(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:y(f,"function")?f.bind(d||b):f}return!1}function C(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+m.join(d+" ")+d).split(" ");return y(b,"string")||y(b,"undefined")?A(e,b):(e=(a+" "+n.join(d+" ")+d).split(" "),B(e,b,c))}var d="2.5.3",e={},f=b.documentElement,g="modernizr",h=b.createElement(g),i=h.style,j,k={}.toString,l="Webkit Moz O ms",m=l.split(" "),n=l.toLowerCase().split(" "),o={},p={},q={},r=[],s=r.slice,t,u={}.hasOwnProperty,v;!y(u,"undefined")&&!y(u.call,"undefined")?v=function(a,b){return u.call(a,b)}:v=function(a,b){return b in a&&y(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=self;if(typeof c!="function")throw new TypeError;var d=s.call(arguments,1),e=function(){if(self instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(s.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(s.call(arguments)))};return e});for(var D in o)v(o,D)&&(t=D.toLowerCase(),e[t]=o[D](),r.push((e[t]?"":"no-")+t));return w(""),h=j=null,e._version=d,e._domPrefixes=n,e._cssomPrefixes=m,e.testProp=function(a){return A([a])},e.testAllProps=C,e.prefixed=function(a,b,c){return b?C(a,b,c):C(a,"pfx")},e}(self,self.document)
},
@@ -809,9 +830,8 @@ Aside from these comments, you may modify and distribute this file as you please
//General Settings
startingFrameID: 1,
cycle: true,
- animatestartingFrameIn: false,
- delayDuringOutInTransitions: 1000,
- disableAnimateOut: false,
+ animateStartingFrameIn: false,
+ transitionThreshold: 1000,
reverseAnimationsWhenNavigatingBackwards: true,
//Autoplay Settings
@@ -849,7 +869,7 @@ Aside from these comments, you may modify and distribute this file as you please
prependPreloader: true,
prependPreloadingComplete: true,
hidePreloaderUsingCSS: true,
- hidePreloaderDelay: 0,
+ hidePreloaderDelay: 0,
//Keyboard settings
keyNavigation: true, //false prevents the following keyboard settings
@@ -885,18 +905,19 @@ Aside from these comments, you may modify and distribute this file as you please
},
//Callbacks
- paused: function(){}, //triggers when Sequence is paused
- unpaused: function(){}, //triggers when Sequence is unpaused
+ paused: function() {}, //triggers when Sequence is paused
+ unpaused: function() {}, //triggers when Sequence is unpaused
- beforeNextFrameAnimatesIn: function(){}, //triggers before the next frame animates in
- afterNextFrameAnimatesIn: function(){}, //triggers after the next frame animates in
- beforeCurrentFrameAnimatesOut: function(){}, //triggers before the current frame animates out
+ beforeNextFrameAnimatesIn: function() {}, //triggers before the next frame animates in
+ afterNextFrameAnimatesIn: function() {}, //triggers after the next frame animates in
+ beforeCurrentFrameAnimatesOut: function() {}, //triggers before the current frame animates out
+ afterCurrentFrameAnimatesOut: function() {}, //triggers after the current frame animates out
- beforeFirstFrameAnimatesIn: function(){}, //triggers before the first frame animates in
- afterFirstFrameAnimatesIn: function(){}, //triggers after the first frame animates in
- beforeLastFrameAnimatesIn: function(){}, //triggers before the last frame animates in
- afterLastFrameAnimatesIn: function(){}, //triggers after the last frame animates in
+ beforeFirstFrameAnimatesIn: function() {}, //triggers before the first frame animates in
+ afterFirstFrameAnimatesIn: function() {}, //triggers after the first frame animates in
+ beforeLastFrameAnimatesIn: function() {}, //triggers before the last frame animates in
+ afterLastFrameAnimatesIn: function() {}, //triggers after the last frame animates in
- afterPreload: function(){} //triggers after preloading is complete
+ afterPreload: function() {} //triggers after preloading is complete
};
})(jQuery);
2  themes/apple-style/index.html
View
@@ -27,7 +27,7 @@
pauseButton: ".pause",
hidePreloaderusingCSS: false,
animateStartingFrameIn: true,
- delayDuringOutInTransitions: 750,
+ transitionThreshold: 500,
pauseOnHover: false,
fallbackTheme: {
speed: 500
2  themes/documentation-demo/index.html
View
@@ -19,7 +19,7 @@
$(document).ready(function(){
var options = {
preloader: false,
- delayDuringOutInTransitions: 1000,
+ transitionThreshold: 1000,
beforeCurrentFrameAnimatesIn: function(){
if(sequence.direction == 1){
changeText(sequence.nextFrameID, "");
6 themes/modern-slide-in/index.html
View
@@ -26,10 +26,10 @@
$(document).ready(function(){
var options = {
- nextButton: ".next",
- prevButton: ".prev",
+ nextButton: true,
+ prevButton: true,
animateStartingFrameIn: true,
- delayDuringOutInTransitions: 500,
+ transitionThreshold: 250,
afterPreload: function(){
$("#nav").fadeIn(100);
$("#nav li:nth-child("+(sequence.settings.startingFrameID)+") img").addClass("active");
2  themes/sliding-horizontal-parallax/index.html
View
@@ -26,7 +26,7 @@
prependPreloader: false,
prependPreloadingComplete: "#sequence-preloader, #slideshow",
animateStartingFrameIn: false,
- delayDuringOutInTransitions: false,
+ transitionThreshold: 500,
afterPreload: function(){
$(".prev, .next").fadeIn(500);
if(!slideShow.transitionsSupported){
Please sign in to comment.
Something went wrong with that request. Please try again.