Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

added setOption public method to support dynamic min/max demo #648

Closed
wants to merge 9 commits into from

3 participants

@RwwL

Although this repo doesn't currently contain a dynamic min/max demo page, the http://flexslider.woothemes.com/ site still does include that example, and it's broken (watch the console for JS errors when resizing the window, the page tries to modify flexslider.vars, which doesn't exist — vars is not a public property on the plugin instance).

This pull request:

  • adds a simple public setOption method to flexsider
  • uses that method to to reintroduce the dynamic min/max demo and get the demo working
  • updates the nav on all the demo pages to include the dynamic min/max demo
  • fixes minor spelling/formatting bugs
@mattyza
Owner
@RwwL

D'oh, sorry I wasted the time (both of ours). When do you typically merge develop into master and do official releases?

@RwwL

Also, just FYI, the page at http://flexslider.woothemes.com/dynamic-carousel-min-max.html is still broken, presumably because it's not referencing 2.2.0.

@mattyza
Owner
@jeffikus jeffikus closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
1  demo/basic-carousel.html
@@ -39,6 +39,7 @@
<li><a href="thumbnail-slider.html">Slider w/thumbnail slider</a></li>
<li><a class="active" href="basic-carousel.html">Basic Carousel</a></li>
<li><a href="carousel-min-max.html">Carousel with min and max ranges</a></li>
+ <li><a href="dynamic-carousel-min-max.html">Carousel with dynamic min/max ranges</a></li>
<li><a href="video.html">Video & the api (vimeo)</a></li>
</ul>
</nav>
View
1  demo/carousel-min-max.html
@@ -39,6 +39,7 @@
<li><a href="thumbnail-slider.html">Slider w/thumbnail slider</a></li>
<li><a href="basic-carousel.html">Basic Carousel</a></li>
<li><a class="active" href="carousel-min-max.html">Carousel with min and max ranges</a></li>
+ <li><a href="dynamic-carousel-min-max.html">Carousel with dynamic min/max ranges</a></li>
<li><a href="video.html">Video & the api (vimeo)</a></li>
</ul>
</nav>
View
233 demo/dynamic-carousel-min-max.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html>
+<html class="no-js" lang="en">
+<head>
+ <meta content="charset=utf-8">
+ <title>FlexSlider 2</title>
+ <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
+
+ <!-- Syntax Highlighter -->
+ <link href="css/shCore.css" rel="stylesheet" type="text/css" />
+ <link href="css/shThemeDefault.css" rel="stylesheet" type="text/css" />
+ <!-- Demo CSS -->
+ <link rel="stylesheet" href="css/demo.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="../flexslider.css" type="text/css" media="screen" />
+
+ <!-- Modernizr -->
+ <script src="js/modernizr.js"></script>
+
+</head>
+<body class="loading">
+
+ <div id="top">
+
+ <a href="http://www.woothemes.com" title="WooThemes">
+ <img src="images/logo.png" alt="WooThemes" />
+ </a>
+
+ </div>
+
+ <div id="container" class="cf">
+ <header role="navigation">
+ <h1>FlexSlider 2</h1>
+ <h2>The best responsive slider. Period.</h2>
+ <a class="button green" href="https://github.com/woothemes/FlexSlider/zipball/master">Download Flexslider</a>
+ <nav>
+ <h3>Other Examples</h3>
+ <ul>
+ <li><a href="index.html">Basic Slider</a></li>
+ <li><a href="thumbnail-controlnav.html">Slider w/thumbnail controlNav pattern</a></li>
+ <li><a href="thumbnail-slider.html">Slider w/thumbnail slider</a></li>
+ <li><a href="basic-carousel.html">Basic Carousel</a></li>
+ <li><a href="carousel-min-max.html">Carousel with min and max ranges</a></li>
+ <li><a class="active" href="dynamic-carousel-min-max.html">Carousel with dynamic min/max ranges</a></li>
+ <li><a href="video.html">Video & the api (vimeo)</a></li>
+ </ul>
+ </nav>
+ </header>
+
+ <div id="main" role="main">
+ <section class="slider">
+ <div class="flexslider carousel">
+ <ul class="slides">
+ <li>
+ <img src="images/kitchen_adventurer_cheesecake_brownie.jpg" />
+ </li>
+ <li>
+ <img src="images/kitchen_adventurer_lemon.jpg" />
+ </li>
+ <li>
+ <img src="images/kitchen_adventurer_donut.jpg" />
+ </li>
+ <li>
+ <img src="images/kitchen_adventurer_caramel.jpg" />
+ </li>
+ <li>
+ <img src="images/kitchen_adventurer_cheesecake_brownie.jpg" />
+ </li>
+ <li>
+ <img src="images/kitchen_adventurer_lemon.jpg" />
+ </li>
+ <li>
+ <img src="images/kitchen_adventurer_donut.jpg" />
+ </li>
+ <li>
+ <img src="images/kitchen_adventurer_caramel.jpg" />
+ </li>
+ <li>
+ <img src="images/kitchen_adventurer_cheesecake_brownie.jpg" />
+ </li>
+ <li>
+ <img src="images/kitchen_adventurer_lemon.jpg" />
+ </li>
+ <li>
+ <img src="images/kitchen_adventurer_donut.jpg" />
+ </li>
+ <li>
+ <img src="images/kitchen_adventurer_caramel.jpg" />
+ </li>
+ </ul>
+ </div>
+ </section>
+ <aside>
+ <div class="cf">
+ <h3>Carousel With Min &amp; Max Ranges</h3>
+ <ul class="toggle cf">
+ <li class="js"><a href="#view-js">JS</a></li>
+ <li class="html"><a href="#view-html">HTML</a></li>
+ </ul>
+ </div>
+ <div id="view-js" class="code">
+ <pre class="brush: js; toolbar: false; gutter: false;">
+ (function() {
+
+ // store the slider in a local variable
+ var $window = $(window),
+ flexslider;
+
+ // tiny helper function to add breakpoints
+ function getGridSize() {
+ return (window.innerWidth < 600) ? 2 :
+ (window.innerWidth < 900) ? 3 : 4;
+ }
+
+ $(function() {
+ SyntaxHighlighter.all();
+ });
+
+ $window.load(function() {
+ $('.flexslider').flexslider({
+ animation: "slide",
+ animationSpeed: 400,
+ animationLoop: false,
+ itemWidth: 210,
+ itemMargin: 5,
+ minItems: getGridSize(), // use function to pull in initial value
+ maxItems: getGridSize(), // use function to pull in initial value
+ start: function(slider){
+ $('body').removeClass('loading');
+ flexslider = slider;
+ }
+ });
+ });
+
+ // check grid size on resize event
+ $window.resize(function() {
+ var gridSize = getGridSize();
+
+ flexslider.changeOption('minItems', gridSize);
+ flexslider.changeOption('maxItems', gridSize);
+ });
+ }());
+ </pre>
+ </div>
+ <div id="view-html" class="code">
+ <pre class="brush: xml; toolbar: false; gutter: false;">
+ &lt;!-- Place somewhere in the &lt;body&gt; of your page -->
+ &lt;div class="flexslider">
+ &lt;ul class="slides">
+ &lt;li>
+ &lt;img src="slide1.jpg" />
+ &lt;/li>
+ &lt;li>
+ &lt;img src="slide2.jpg" />
+ &lt;/li>
+ &lt;li>
+ &lt;img src="slide3.jpg" />
+ &lt;/li>
+ &lt;li>
+ &lt;img src="slide4.jpg" />
+ &lt;/li>
+ &lt;!-- items mirrored twice, total of 12 -->
+ &lt;/ul>
+ &lt;/div>
+ </pre>
+ </div>
+ </aside>
+ </div>
+
+ </div>
+
+ <!-- jQuery -->
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
+ <script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.min.js">\x3C/script>')</script>
+
+ <!-- FlexSlider -->
+ <script defer src="../jquery.flexslider.js"></script>
+
+ <script type="text/javascript">
+
+ (function() {
+
+ // store the slider in a local variable
+ var $window = $(window),
+ flexslider;
+
+ // tiny helper function to add breakpoints
+ function getGridSize() {
+ return (window.innerWidth < 600) ? 2 :
+ (window.innerWidth < 900) ? 3 : 4;
+ }
+
+ $(function() {
+ SyntaxHighlighter.all();
+ });
+
+ $window.load(function() {
+ $('.flexslider').flexslider({
+ animation: "slide",
+ animationSpeed: 400,
+ animationLoop: false,
+ itemWidth: 210,
+ itemMargin: 5,
+ minItems: getGridSize(), // use function to pull in initial value
+ maxItems: getGridSize(), // use function to pull in initial value
+ start: function(slider){
+ $('body').removeClass('loading');
+ flexslider = slider;
+ }
+ });
+ });
+
+ // check grid size on resize event
+ $window.resize(function() {
+ var gridSize = getGridSize();
+ flexslider.setOption('minItems', gridSize);
+ flexslider.setOption('maxItems', gridSize);
+ });
+ }());
+
+ </script>
+
+
+ <!-- Syntax Highlighter -->
+ <script type="text/javascript" src="js/shCore.js"></script>
+ <script type="text/javascript" src="js/shBrushXml.js"></script>
+ <script type="text/javascript" src="js/shBrushJScript.js"></script>
+
+ <!-- Optional FlexSlider Additions -->
+ <script src="js/jquery.easing.js"></script>
+ <script src="js/jquery.mousewheel.js"></script>
+ <script defer src="js/demo.js"></script>
+
+</body>
+</html>
View
3  demo/index.html
@@ -38,7 +38,8 @@
<li><a href="thumbnail-controlnav.html">Slider w/thumbnail controlNav pattern</a></li>
<li><a href="thumbnail-slider.html">Slider w/thumbnail slider</a></li>
<li><a href="basic-carousel.html">Basic Carousel</a></li>
- <li><a href="carousel-min-max.html">Carousel with min and max ranges</a></li>
+ <li><a href="carousel-min-max.html">Carousel with min and max ranges</a></li>
+ <li><a href="dynamic-carousel-min-max.html">Carousel with dynamic min/max ranges</a></li>
<li><a href="video.html">Video & the api (vimeo)</a></li>
</ul>
</nav>
View
1  demo/thumbnail-controlnav.html
@@ -39,6 +39,7 @@
<li><a href="thumbnail-slider.html">Slider w/thumbnail slider</a></li>
<li><a href="basic-carousel.html">Basic Carousel</a></li>
<li><a href="carousel-min-max.html">Carousel with min and max ranges</a></li>
+ <li><a href="dynamic-carousel-min-max.html">Carousel with dynamic min/max ranges</a></li>
<li><a href="video.html">Video & the api (vimeo)</a></li>
</ul>
</nav>
View
1  demo/thumbnail-slider.html
@@ -39,6 +39,7 @@
<li><a class="active" href="thumbnail-slider.html">Slider w/thumbnail slider</a></li>
<li><a href="basic-carousel.html">Basic Carousel</a></li>
<li><a href="carousel-min-max.html">Carousel with min and max ranges</a></li>
+ <li><a href="dynamic-carousel-min-max.html">Carousel with dynamic min/max ranges</a></li>
<li><a href="video.html">Video & the api (vimeo)</a></li>
</ul>
</nav>
View
1  demo/video.html
@@ -39,6 +39,7 @@
<li><a href="thumbnail-slider.html">Slider w/thumbnail slider</a></li>
<li><a href="basic-carousel.html">Basic Carousel</a></li>
<li><a href="carousel-min-max.html">Carousel with min and max ranges</a></li>
+ <li><a href="dynamic-carousel-min-max.html">Carousel with dynamic min/max ranges</a></li>
<li><a class="active" href="video.html">Video & the api (vimeo)</a></li>
</ul>
</nav>
View
35 jquery.flexslider-min.js 100644 → 100755
@@ -7,37 +7,4 @@
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Contributing author: Tyler Smith (@mbmufffin)
- */
-(function(d){d.flexslider=function(j,l){var a=d(j),c=d.extend({},d.flexslider.defaults,l),e=c.namespace,q="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,u=q?"touchend":"click",m="vertical"===c.direction,n=c.reverse,h=0<c.itemWidth,s="fade"===c.animation,t=""!==c.asNavFor,f={};d.data(j,"flexslider",a);f={init:function(){a.animating=!1;a.currentSlide=c.startAt;a.animatingTo=a.currentSlide;a.atEnd=0===a.currentSlide||a.currentSlide===a.last;a.containerSelector=c.selector.substr(0,
-c.selector.search(" "));a.slides=d(c.selector,a);a.container=d(a.containerSelector,a);a.count=a.slides.length;a.syncExists=0<d(c.sync).length;"slide"===c.animation&&(c.animation="swing");a.prop=m?"top":"marginLeft";a.args={};a.manualPause=!1;var b=a,g;if(g=!c.video)if(g=!s)if(g=c.useCSS)a:{g=document.createElement("div");var p=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"],e;for(e in p)if(void 0!==g.style[p[e]]){a.pfx=p[e].replace("Perspective","").toLowerCase();
-a.prop="-"+a.pfx+"-transform";g=!0;break a}g=!1}b.transitions=g;""!==c.controlsContainer&&(a.controlsContainer=0<d(c.controlsContainer).length&&d(c.controlsContainer));""!==c.manualControls&&(a.manualControls=0<d(c.manualControls).length&&d(c.manualControls));c.randomize&&(a.slides.sort(function(){return Math.round(Math.random())-0.5}),a.container.empty().append(a.slides));a.doMath();t&&f.asNav.setup();a.setup("init");c.controlNav&&f.controlNav.setup();c.directionNav&&f.directionNav.setup();c.keyboard&&
-(1===d(a.containerSelector).length||c.multipleKeyboard)&&d(document).bind("keyup",function(b){b=b.keyCode;if(!a.animating&&(39===b||37===b))b=39===b?a.getTarget("next"):37===b?a.getTarget("prev"):!1,a.flexAnimate(b,c.pauseOnAction)});c.mousewheel&&a.bind("mousewheel",function(b,g){b.preventDefault();var d=0>g?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(d,c.pauseOnAction)});c.pausePlay&&f.pausePlay.setup();c.slideshow&&(c.pauseOnHover&&a.hover(function(){!a.manualPlay&&!a.manualPause&&a.pause()},
-function(){!a.manualPause&&!a.manualPlay&&a.play()}),0<c.initDelay?setTimeout(a.play,c.initDelay):a.play());q&&c.touch&&f.touch();(!s||s&&c.smoothHeight)&&d(window).bind("resize focus",f.resize);setTimeout(function(){c.start(a)},200)},asNav:{setup:function(){a.asNav=!0;a.animatingTo=Math.floor(a.currentSlide/a.move);a.currentItem=a.currentSlide;a.slides.removeClass(e+"active-slide").eq(a.currentItem).addClass(e+"active-slide");a.slides.click(function(b){b.preventDefault();b=d(this);var g=b.index();
-!d(c.asNavFor).data("flexslider").animating&&!b.hasClass("active")&&(a.direction=a.currentItem<g?"next":"prev",a.flexAnimate(g,c.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){a.manualControls?f.controlNav.setupManual():f.controlNav.setupPaging()},setupPaging:function(){var b=1,g;a.controlNavScaffold=d('<ol class="'+e+"control-nav "+e+("thumbnails"===c.controlNav?"control-thumbs":"control-paging")+'"></ol>');if(1<a.pagingCount)for(var p=0;p<a.pagingCount;p++)g="thumbnails"===c.controlNav?
-'<img src="'+a.slides.eq(p).attr("data-thumb")+'"/>':"<a>"+b+"</a>",a.controlNavScaffold.append("<li>"+g+"</li>"),b++;a.controlsContainer?d(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold);f.controlNav.set();f.controlNav.active();a.controlNavScaffold.delegate("a, img",u,function(b){b.preventDefault();b=d(this);var g=a.controlNav.index(b);b.hasClass(e+"active")||(a.direction=g>a.currentSlide?"next":"prev",a.flexAnimate(g,c.pauseOnAction))});q&&a.controlNavScaffold.delegate("a",
-"click touchstart",function(a){a.preventDefault()})},setupManual:function(){a.controlNav=a.manualControls;f.controlNav.active();a.controlNav.live(u,function(b){b.preventDefault();b=d(this);var g=a.controlNav.index(b);b.hasClass(e+"active")||(g>a.currentSlide?a.direction="next":a.direction="prev",a.flexAnimate(g,c.pauseOnAction))});q&&a.controlNav.live("click touchstart",function(a){a.preventDefault()})},set:function(){a.controlNav=d("."+e+"control-nav li "+("thumbnails"===c.controlNav?"img":"a"),
-a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(e+"active").eq(a.animatingTo).addClass(e+"active")},update:function(b,c){1<a.pagingCount&&"add"===b?a.controlNavScaffold.append(d("<li><a>"+a.count+"</a></li>")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(c).closest("li").remove();f.controlNav.set();1<a.pagingCount&&a.pagingCount!==a.controlNav.length?a.update(c,b):f.controlNav.active()}},directionNav:{setup:function(){var b=d('<ul class="'+
-e+'direction-nav"><li><a class="'+e+'prev" href="#">'+c.prevText+'</a></li><li><a class="'+e+'next" href="#">'+c.nextText+"</a></li></ul>");a.controlsContainer?(d(a.controlsContainer).append(b),a.directionNav=d("."+e+"direction-nav li a",a.controlsContainer)):(a.append(b),a.directionNav=d("."+e+"direction-nav li a",a));f.directionNav.update();a.directionNav.bind(u,function(b){b.preventDefault();b=d(this).hasClass(e+"next")?a.getTarget("next"):a.getTarget("prev");a.flexAnimate(b,c.pauseOnAction)});
-q&&a.directionNav.bind("click touchstart",function(a){a.preventDefault()})},update:function(){var b=e+"disabled";1===a.pagingCount?a.directionNav.addClass(b):c.animationLoop?a.directionNav.removeClass(b):0===a.animatingTo?a.directionNav.removeClass(b).filter("."+e+"prev").addClass(b):a.animatingTo===a.last?a.directionNav.removeClass(b).filter("."+e+"next").addClass(b):a.directionNav.removeClass(b)}},pausePlay:{setup:function(){var b=d('<div class="'+e+'pauseplay"><a></a></div>');a.controlsContainer?
-(a.controlsContainer.append(b),a.pausePlay=d("."+e+"pauseplay a",a.controlsContainer)):(a.append(b),a.pausePlay=d("."+e+"pauseplay a",a));f.pausePlay.update(c.slideshow?e+"pause":e+"play");a.pausePlay.bind(u,function(b){b.preventDefault();d(this).hasClass(e+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())});q&&a.pausePlay.bind("click touchstart",function(a){a.preventDefault()})},update:function(b){"play"===b?a.pausePlay.removeClass(e+"pause").addClass(e+
-"play").text(c.playText):a.pausePlay.removeClass(e+"play").addClass(e+"pause").text(c.pauseText)}},touch:function(){function b(b){k=m?d-b.touches[0].pageY:d-b.touches[0].pageX;q=m?Math.abs(k)<Math.abs(b.touches[0].pageX-e):Math.abs(k)<Math.abs(b.touches[0].pageY-e);if(!q||500<Number(new Date)-l)b.preventDefault(),!s&&a.transitions&&(c.animationLoop||(k/=0===a.currentSlide&&0>k||a.currentSlide===a.last&&0<k?Math.abs(k)/r+2:1),a.setProps(f+k,"setTouch"))}function g(){j.removeEventListener("touchmove",
-b,!1);if(a.animatingTo===a.currentSlide&&!q&&null!==k){var h=n?-k:k,m=0<h?a.getTarget("next"):a.getTarget("prev");a.canAdvance(m)&&(550>Number(new Date)-l&&50<Math.abs(h)||Math.abs(h)>r/2)?a.flexAnimate(m,c.pauseOnAction):s||a.flexAnimate(a.currentSlide,c.pauseOnAction,!0)}j.removeEventListener("touchend",g,!1);f=k=e=d=null}var d,e,f,r,k,l,q=!1;j.addEventListener("touchstart",function(k){a.animating?k.preventDefault():1===k.touches.length&&(a.pause(),r=m?a.h:a.w,l=Number(new Date),f=h&&n&&a.animatingTo===
-a.last?0:h&&n?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:h&&a.currentSlide===a.last?a.limit:h?(a.itemW+c.itemMargin)*a.move*a.currentSlide:n?(a.last-a.currentSlide+a.cloneOffset)*r:(a.currentSlide+a.cloneOffset)*r,d=m?k.touches[0].pageY:k.touches[0].pageX,e=m?k.touches[0].pageX:k.touches[0].pageY,j.addEventListener("touchmove",b,!1),j.addEventListener("touchend",g,!1))},!1)},resize:function(){!a.animating&&a.is(":visible")&&(h||a.doMath(),s?f.smoothHeight():h?(a.slides.width(a.computedW),
-a.update(a.pagingCount),a.setProps()):m?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(c.smoothHeight&&f.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(b){if(!m||s){var c=s?a:a.viewport;b?c.animate({height:a.slides.eq(a.animatingTo).height()},b):c.height(a.slides.eq(a.animatingTo).height())}},sync:function(b){var g=d(c.sync).data("flexslider"),e=a.animatingTo;switch(b){case "animate":g.flexAnimate(e,c.pauseOnAction,!1,!0);break;case "play":!g.playing&&
-!g.asNav&&g.play();break;case "pause":g.pause()}}};a.flexAnimate=function(b,g,p,j,l){t&&1===a.pagingCount&&(a.direction=a.currentItem<b?"next":"prev");if(!a.animating&&(a.canAdvance(b,l)||p)&&a.is(":visible")){if(t&&j)if(p=d(c.asNavFor).data("flexslider"),a.atEnd=0===b||b===a.count-1,p.flexAnimate(b,!0,!1,!0,l),a.direction=a.currentItem<b?"next":"prev",p.direction=a.direction,Math.ceil((b+1)/a.visible)-1!==a.currentSlide&&0!==b)a.currentItem=b,a.slides.removeClass(e+"active-slide").eq(b).addClass(e+
-"active-slide"),b=Math.floor(b/a.visible);else return a.currentItem=b,a.slides.removeClass(e+"active-slide").eq(b).addClass(e+"active-slide"),!1;a.animating=!0;a.animatingTo=b;c.before(a);g&&a.pause();a.syncExists&&!l&&f.sync("animate");c.controlNav&&f.controlNav.active();h||a.slides.removeClass(e+"active-slide").eq(b).addClass(e+"active-slide");a.atEnd=0===b||b===a.last;c.directionNav&&f.directionNav.update();b===a.last&&(c.end(a),c.animationLoop||a.pause());if(s)q?(a.slides.eq(a.currentSlide).css({opacity:0,
-zIndex:1}),a.slides.eq(b).css({opacity:1,zIndex:2}),a.slides.unbind("webkitTransitionEnd transitionend"),a.slides.eq(a.currentSlide).bind("webkitTransitionEnd transitionend",function(){c.after(a)}),a.animating=!1,a.currentSlide=a.animatingTo):(a.slides.eq(a.currentSlide).fadeOut(c.animationSpeed,c.easing),a.slides.eq(b).fadeIn(c.animationSpeed,c.easing,a.wrapup));else{var r=m?a.slides.filter(":first").height():a.computedW;h?(b=c.itemWidth>a.w?2*c.itemMargin:c.itemMargin,b=(a.itemW+b)*a.move*a.animatingTo,
-b=b>a.limit&&1!==a.visible?a.limit:b):b=0===a.currentSlide&&b===a.count-1&&c.animationLoop&&"next"!==a.direction?n?(a.count+a.cloneOffset)*r:0:a.currentSlide===a.last&&0===b&&c.animationLoop&&"prev"!==a.direction?n?0:(a.count+1)*r:n?(a.count-1-b+a.cloneOffset)*r:(b+a.cloneOffset)*r;a.setProps(b,"",c.animationSpeed);if(a.transitions){if(!c.animationLoop||!a.atEnd)a.animating=!1,a.currentSlide=a.animatingTo;a.container.unbind("webkitTransitionEnd transitionend");a.container.bind("webkitTransitionEnd transitionend",
-function(){a.wrapup(r)})}else a.container.animate(a.args,c.animationSpeed,c.easing,function(){a.wrapup(r)})}c.smoothHeight&&f.smoothHeight(c.animationSpeed)}};a.wrapup=function(b){!s&&!h&&(0===a.currentSlide&&a.animatingTo===a.last&&c.animationLoop?a.setProps(b,"jumpEnd"):a.currentSlide===a.last&&(0===a.animatingTo&&c.animationLoop)&&a.setProps(b,"jumpStart"));a.animating=!1;a.currentSlide=a.animatingTo;c.after(a)};a.animateSlides=function(){a.animating||a.flexAnimate(a.getTarget("next"))};a.pause=
-function(){clearInterval(a.animatedSlides);a.playing=!1;c.pausePlay&&f.pausePlay.update("play");a.syncExists&&f.sync("pause")};a.play=function(){a.animatedSlides=setInterval(a.animateSlides,c.slideshowSpeed);a.playing=!0;c.pausePlay&&f.pausePlay.update("pause");a.syncExists&&f.sync("play")};a.canAdvance=function(b,g){var d=t?a.pagingCount-1:a.last;return g?!0:t&&a.currentItem===a.count-1&&0===b&&"prev"===a.direction?!0:t&&0===a.currentItem&&b===a.pagingCount-1&&"next"!==a.direction?!1:b===a.currentSlide&&
-!t?!1:c.animationLoop?!0:a.atEnd&&0===a.currentSlide&&b===d&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===d&&0===b&&"next"===a.direction?!1:!0};a.getTarget=function(b){a.direction=b;return"next"===b?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1};a.setProps=function(b,g,d){var e,f=b?b:(a.itemW+c.itemMargin)*a.move*a.animatingTo;e=-1*function(){if(h)return"setTouch"===g?b:n&&a.animatingTo===a.last?0:n?a.limit-(a.itemW+c.itemMargin)*a.move*a.animatingTo:a.animatingTo===
-a.last?a.limit:f;switch(g){case "setTotal":return n?(a.count-1-a.currentSlide+a.cloneOffset)*b:(a.currentSlide+a.cloneOffset)*b;case "setTouch":return b;case "jumpEnd":return n?b:a.count*b;case "jumpStart":return n?a.count*b:b;default:return b}}()+"px";a.transitions&&(e=m?"translate3d(0,"+e+",0)":"translate3d("+e+",0,0)",d=void 0!==d?d/1E3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",d));a.args[a.prop]=e;(a.transitions||void 0===d)&&a.container.css(a.args)};a.setup=function(b){if(s)a.slides.css({width:"100%",
-"float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&(q?a.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+c.animationSpeed/1E3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):a.slides.eq(a.currentSlide).fadeIn(c.animationSpeed,c.easing)),c.smoothHeight&&f.smoothHeight();else{var g,p;"init"===b&&(a.viewport=d('<div class="'+e+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=
-0,n&&(p=d.makeArray(a.slides).reverse(),a.slides=d(p),a.container.empty().append(a.slides)));c.animationLoop&&!h&&(a.cloneCount=2,a.cloneOffset=1,"init"!==b&&a.container.find(".clone").remove(),a.container.append(a.slides.first().clone().addClass("clone")).prepend(a.slides.last().clone().addClass("clone")));a.newSlides=d(c.selector,a);g=n?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset;m&&!h?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),
-setTimeout(function(){a.newSlides.css({display:"block"});a.doMath();a.viewport.height(a.h);a.setProps(g*a.h,"init")},"init"===b?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(g*a.computedW,"init"),setTimeout(function(){a.doMath();a.newSlides.css({width:a.computedW,"float":"left",display:"block"});c.smoothHeight&&f.smoothHeight()},"init"===b?100:0))}h||a.slides.removeClass(e+"active-slide").eq(a.currentSlide).addClass(e+"active-slide")};a.doMath=function(){var b=a.slides.first(),
-d=c.itemMargin,e=c.minItems,f=c.maxItems;a.w=a.width();a.h=b.height();a.boxPadding=b.outerWidth()-b.width();h?(a.itemT=c.itemWidth+d,a.minW=e?e*a.itemT:a.w,a.maxW=f?f*a.itemT:a.w,a.itemW=a.minW>a.w?(a.w-d*e)/e:a.maxW<a.w?(a.w-d*f)/f:c.itemWidth>a.w?a.w:c.itemWidth,a.visible=Math.floor(a.w/(a.itemW+d)),a.move=0<c.move&&c.move<a.visible?c.move:a.visible,a.pagingCount=Math.ceil((a.count-a.visible)/a.move+1),a.last=a.pagingCount-1,a.limit=1===a.pagingCount?0:c.itemWidth>a.w?(a.itemW+2*d)*a.count-a.w-
-d:(a.itemW+d)*a.count-a.w-d):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1);a.computedW=a.itemW-a.boxPadding};a.update=function(b,d){a.doMath();h||(b<a.currentSlide?a.currentSlide+=1:b<=a.currentSlide&&0!==b&&(a.currentSlide-=1),a.animatingTo=a.currentSlide);if(c.controlNav&&!a.manualControls)if("add"===d&&!h||a.pagingCount>a.controlNav.length)f.controlNav.update("add");else if("remove"===d&&!h||a.pagingCount<a.controlNav.length)h&&a.currentSlide>a.last&&(a.currentSlide-=1,a.animatingTo-=1),
-f.controlNav.update("remove",a.last);c.directionNav&&f.directionNav.update()};a.addSlide=function(b,e){var f=d(b);a.count+=1;a.last=a.count-1;m&&n?void 0!==e?a.slides.eq(a.count-e).after(f):a.container.prepend(f):void 0!==e?a.slides.eq(e).before(f):a.container.append(f);a.update(e,"add");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.added(a)};a.removeSlide=function(b){var e=isNaN(b)?a.slides.index(d(b)):b;a.count-=1;a.last=a.count-1;isNaN(b)?d(b,a.slides).remove():m&&n?a.slides.eq(a.last).remove():
-a.slides.eq(b).remove();a.doMath();a.update(e,"remove");a.slides=d(c.selector+":not(.clone)",a);a.setup();c.removed(a)};f.init()};d.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7E3,animationSpeed:600,initDelay:0,randomize:!1,pauseOnAction:!0,pauseOnHover:!1,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",
-keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:0,maxItems:0,move:0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}};d.fn.flexslider=function(j){void 0===j&&(j={});if("object"===typeof j)return this.each(function(){var a=d(this),c=a.find(j.selector?j.selector:".slides > li");1===c.length?(c.fadeIn(400),
-j.start&&j.start(a)):void 0==a.data("flexslider")&&new d.flexslider(this,j)});var l=d(this).data("flexslider");switch(j){case "play":l.play();break;case "pause":l.pause();break;case "next":l.flexAnimate(l.getTarget("next"),!0);break;case "prev":case "previous":l.flexAnimate(l.getTarget("prev"),!0);break;default:"number"===typeof j&&l.flexAnimate(j,!0)}}})(jQuery);
+ */(function(a){a.flexslider=function(b,c){var d=a(b),e=a.extend({},a.flexslider.defaults,c),f=e.namespace,g="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,h=g?"touchend":"click",i=e.direction==="vertical",j=e.reverse,k=e.itemWidth>0,l=e.animation==="fade",m=e.asNavFor!=="",n={};a.data(b,"flexslider",d),n={init:function(){d.animating=!1,d.currentSlide=e.startAt,d.animatingTo=d.currentSlide,d.atEnd=d.currentSlide===0||d.currentSlide===d.last,d.containerSelector=e.selector.substr(0,e.selector.search(" ")),d.slides=a(e.selector,d),d.container=a(d.containerSelector,d),d.count=d.slides.length,d.syncExists=a(e.sync).length>0,e.animation==="slide"&&(e.animation="swing"),d.prop=i?"top":"marginLeft",d.args={},d.manualPause=!1,d.transitions=!e.video&&!l&&e.useCSS&&function(){var a=document.createElement("div"),b=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var c in b)if(a.style[b[c]]!==undefined)return d.pfx=b[c].replace("Perspective","").toLowerCase(),d.prop="-"+d.pfx+"-transform",!0;return!1}(),e.controlsContainer!==""&&(d.controlsContainer=a(e.controlsContainer).length>0&&a(e.controlsContainer)),e.manualControls!==""&&(d.manualControls=a(e.manualControls).length>0&&a(e.manualControls)),e.randomize&&(d.slides.sort(function(){return Math.round(Math.random())-.5}),d.container.empty().append(d.slides)),d.doMath(),m&&n.asNav.setup(),d.setup("init"),e.controlNav&&n.controlNav.setup(),e.directionNav&&n.directionNav.setup(),e.keyboard&&(a(d.containerSelector).length===1||e.multipleKeyboard)&&a(document).bind("keyup",function(a){var b=a.keyCode;if(!d.animating&&(b===39||b===37)){var c=b===39?d.getTarget("next"):b===37?d.getTarget("prev"):!1;d.flexAnimate(c,e.pauseOnAction)}}),e.mousewheel&&d.bind("mousewheel",function(a,b,c,f){a.preventDefault();var g=b<0?d.getTarget("next"):d.getTarget("prev");d.flexAnimate(g,e.pauseOnAction)}),e.pausePlay&&n.pausePlay.setup(),e.slideshow&&(e.pauseOnHover&&d.hover(function(){!d.manualPlay&&!d.manualPause&&d.pause()},function(){!d.manualPause&&!d.manualPlay&&d.play()}),e.initDelay>0?setTimeout(d.play,e.initDelay):d.play()),g&&e.touch&&n.touch(),(!l||l&&e.smoothHeight)&&a(window).bind("resize focus",n.resize),setTimeout(function(){e.start(d)},200)},asNav:{setup:function(){d.asNav=!0,d.animatingTo=Math.floor(d.currentSlide/d.move),d.currentItem=d.currentSlide,d.slides.removeClass(f+"active-slide").eq(d.currentItem).addClass(f+"active-slide"),d.slides.click(function(b){b.preventDefault();var c=a(this),f=c.index();!a(e.asNavFor).data("flexslider").animating&&!c.hasClass("active")&&(d.direction=d.currentItem<f?"next":"prev",d.flexAnimate(f,e.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){d.manualControls?n.controlNav.setupManual():n.controlNav.setupPaging()},setupPaging:function(){var b=e.controlNav==="thumbnails"?"control-thumbs":"control-paging",c=1,i;d.controlNavScaffold=a('<ol class="'+f+"control-nav "+f+b+'"></ol>');if(d.pagingCount>1)for(var j=0;j<d.pagingCount;j++)i=e.controlNav==="thumbnails"?'<img src="'+d.slides.eq(j).attr("data-thumb")+'"/>':"<a>"+c+"</a>",d.controlNavScaffold.append("<li>"+i+"</li>"),c++;d.controlsContainer?a(d.controlsContainer).append(d.controlNavScaffold):d.append(d.controlNavScaffold),n.controlNav.set(),n.controlNav.active(),d.controlNavScaffold.delegate("a, img",h,function(b){b.preventDefault();var c=a(this),g=d.controlNav.index(c);c.hasClass(f+"active")||(d.direction=g>d.currentSlide?"next":"prev",d.flexAnimate(g,e.pauseOnAction))}),g&&d.controlNavScaffold.delegate("a","click touchstart",function(a){a.preventDefault()})},setupManual:function(){d.controlNav=d.manualControls,n.controlNav.active(),d.controlNav.live(h,function(b){b.preventDefault();var c=a(this),g=d.controlNav.index(c);c.hasClass(f+"active")||(g>d.currentSlide?d.direction="next":d.direction="prev",d.flexAnimate(g,e.pauseOnAction))}),g&&d.controlNav.live("click touchstart",function(a){a.preventDefault()})},set:function(){var b=e.controlNav==="thumbnails"?"img":"a";d.controlNav=a("."+f+"control-nav li "+b,d.controlsContainer?d.controlsContainer:d)},active:function(){d.controlNav.removeClass(f+"active").eq(d.animatingTo).addClass(f+"active")},update:function(b,c){d.pagingCount>1&&b==="add"?d.controlNavScaffold.append(a("<li><a>"+d.count+"</a></li>")):d.pagingCount===1?d.controlNavScaffold.find("li").remove():d.controlNav.eq(c).closest("li").remove(),n.controlNav.set(),d.pagingCount>1&&d.pagingCount!==d.controlNav.length?d.update(c,b):n.controlNav.active()}},directionNav:{setup:function(){var b=a('<ul class="'+f+'direction-nav"><li><a class="'+f+'prev" href="#">'+e.prevText+'</a></li><li><a class="'+f+'next" href="#">'+e.nextText+"</a></li></ul>");d.controlsContainer?(a(d.controlsContainer).append(b),d.directionNav=a("."+f+"direction-nav li a",d.controlsContainer)):(d.append(b),d.directionNav=a("."+f+"direction-nav li a",d)),n.directionNav.update(),d.directionNav.bind(h,function(b){b.preventDefault();var c=a(this).hasClass(f+"next")?d.getTarget("next"):d.getTarget("prev");d.flexAnimate(c,e.pauseOnAction)}),g&&d.directionNav.bind("click touchstart",function(a){a.preventDefault()})},update:function(){var a=f+"disabled";d.pagingCount===1?d.directionNav.addClass(a):e.animationLoop?d.directionNav.removeClass(a):d.animatingTo===0?d.directionNav.removeClass(a).filter("."+f+"prev").addClass(a):d.animatingTo===d.last?d.directionNav.removeClass(a).filter("."+f+"next").addClass(a):d.directionNav.removeClass(a)}},pausePlay:{setup:function(){var b=a('<div class="'+f+'pauseplay"><a></a></div>');d.controlsContainer?(d.controlsContainer.append(b),d.pausePlay=a("."+f+"pauseplay a",d.controlsContainer)):(d.append(b),d.pausePlay=a("."+f+"pauseplay a",d)),n.pausePlay.update(e.slideshow?f+"pause":f+"play"),d.pausePlay.bind(h,function(b){b.preventDefault(),a(this).hasClass(f+"pause")?(d.manualPause=!0,d.manualPlay=!1,d.pause()):(d.manualPause=!1,d.manualPlay=!0,d.play())}),g&&d.pausePlay.bind("click touchstart",function(a){a.preventDefault()})},update:function(a){a==="play"?d.pausePlay.removeClass(f+"pause").addClass(f+"play").text(e.playText):d.pausePlay.removeClass(f+"play").addClass(f+"pause").text(e.pauseText)}},touch:function(){function o(h){d.animating?h.preventDefault():h.touches.length===1&&(d.pause(),g=i?d.h:d.w,m=Number(new Date),f=k&&j&&d.animatingTo===d.last?0:k&&j?d.limit-(d.itemW+e.itemMargin)*d.move*d.animatingTo:k&&d.currentSlide===d.last?d.limit:k?(d.itemW+e.itemMargin)*d.move*d.currentSlide:j?(d.last-d.currentSlide+d.cloneOffset)*g:(d.currentSlide+d.cloneOffset)*g,a=i?h.touches[0].pageY:h.touches[0].pageX,c=i?h.touches[0].pageX:h.touches[0].pageY,b.addEventListener("touchmove",p,!1),b.addEventListener("touchend",q,!1))}function p(b){h=i?a-b.touches[0].pageY:a-b.touches[0].pageX,n=i?Math.abs(h)<Math.abs(b.touches[0].pageX-c):Math.abs(h)<Math.abs(b.touches[0].pageY-c);if(!n||Number(new Date)-m>500)b.preventDefault(),!l&&d.transitions&&(e.animationLoop||(h/=d.currentSlide===0&&h<0||d.currentSlide===d.last&&h>0?Math.abs(h)/g+2:1),d.setProps(f+h,"setTouch"))}function q(i){b.removeEventListener("touchmove",p,!1);if(d.animatingTo===d.currentSlide&&!n&&h!==null){var k=j?-h:h,o=k>0?d.getTarget("next"):d.getTarget("prev");d.canAdvance(o)&&(Number(new Date)-m<550&&Math.abs(k)>50||Math.abs(k)>g/2)?d.flexAnimate(o,e.pauseOnAction):l||d.flexAnimate(d.currentSlide,e.pauseOnAction,!0)}b.removeEventListener("touchend",q,!1),a=null,c=null,h=null,f=null}var a,c,f,g,h,m,n=!1;b.addEventListener("touchstart",o,!1)},resize:function(){!d.animating&&d.is(":visible")&&(k||d.doMath(),l?n.smoothHeight():k?(d.slides.width(d.computedW),d.update(d.pagingCount),d.setProps()):i?(d.viewport.height(d.h),d.setProps(d.h,"setTotal")):(e.smoothHeight&&n.smoothHeight(),d.newSlides.width(d.computedW),d.setProps(d.computedW,"setTotal")))},smoothHeight:function(a){if(!i||l){var b=l?d:d.viewport;a?b.animate({height:d.slides.eq(d.animatingTo).height()},a):b.height(d.slides.eq(d.animatingTo).height())}},sync:function(b){var c=a(e.sync).data("flexslider"),f=d.animatingTo;switch(b){case"animate":c.flexAnimate(f,e.pauseOnAction,!1,!0);break;case"play":!c.playing&&!c.asNav&&c.play();break;case"pause":c.pause()}}},d.flexAnimate=function(b,c,h,o,p){m&&d.pagingCount===1&&(d.direction=d.currentItem<b?"next":"prev");if(!d.animating&&(d.canAdvance(b,p)||h)&&d.is(":visible")){if(m&&o){var q=a(e.asNavFor).data("flexslider");d.atEnd=b===0||b===d.count-1,q.flexAnimate(b,!0,!1,!0,p),d.direction=d.currentItem<b?"next":"prev",q.direction=d.direction;if(Math.ceil((b+1)/d.visible)-1!==d.currentSlide&&b!==0)d.currentItem=b,d.slides.removeClass(f+"active-slide").eq(b).addClass(f+"active-slide"),b=Math.floor(b/d.visible);else return d.currentItem=b,d.slides.removeClass(f+"active-slide").eq(b).addClass(f+"active-slide"),!1}d.animating=!0,d.animatingTo=b,e.before(d),c&&d.pause(),d.syncExists&&!p&&n.sync("animate"),e.controlNav&&n.controlNav.active(),k||d.slides.removeClass(f+"active-slide").eq(b).addClass(f+"active-slide"),d.atEnd=b===0||b===d.last,e.directionNav&&n.directionNav.update(),b===d.last&&(e.end(d),e.animationLoop||d.pause());if(!l){var r=i?d.slides.filter(":first").height():d.computedW,s,t,u;k?(s=e.itemWidth>d.w?e.itemMargin*2:e.itemMargin,u=(d.itemW+s)*d.move*d.animatingTo,t=u>d.limit&&d.visible!==1?d.limit:u):d.currentSlide===0&&b===d.count-1&&e.animationLoop&&d.direction!=="next"?t=j?(d.count+d.cloneOffset)*r:0:d.currentSlide===d.last&&b===0&&e.animationLoop&&d.direction!=="prev"?t=j?0:(d.count+1)*r:t=j?(d.count-1-b+d.cloneOffset)*r:(b+d.cloneOffset)*r,d.setProps(t,"",e.animationSpeed);if(d.transitions){if(!e.animationLoop||!d.atEnd)d.animating=!1,d.currentSlide=d.animatingTo;d.container.unbind("webkitTransitionEnd transitionend"),d.container.bind("webkitTransitionEnd transitionend",function(){d.wrapup(r)})}else d.container.animate(d.args,e.animationSpeed,e.easing,function(){d.wrapup(r)})}else g?(d.slides.eq(d.currentSlide).css({opacity:0,zIndex:1}),d.slides.eq(b).css({opacity:1,zIndex:2}),d.slides.unbind("webkitTransitionEnd transitionend"),d.slides.eq(d.currentSlide).bind("webkitTransitionEnd transitionend",function(){e.after(d)}),d.animating=!1,d.currentSlide=d.animatingTo):(d.slides.eq(d.currentSlide).fadeOut(e.animationSpeed,e.easing),d.slides.eq(b).fadeIn(e.animationSpeed,e.easing,d.wrapup));e.smoothHeight&&n.smoothHeight(e.animationSpeed)}},d.wrapup=function(a){!l&&!k&&(d.currentSlide===0&&d.animatingTo===d.last&&e.animationLoop?d.setProps(a,"jumpEnd"):d.currentSlide===d.last&&d.animatingTo===0&&e.animationLoop&&d.setProps(a,"jumpStart")),d.animating=!1,d.currentSlide=d.animatingTo,e.after(d)},d.animateSlides=function(){d.animating||d.flexAnimate(d.getTarget("next"))},d.pause=function(){clearInterval(d.animatedSlides),d.playing=!1,e.pausePlay&&n.pausePlay.update("play"),d.syncExists&&n.sync("pause")},d.play=function(){d.animatedSlides=setInterval(d.animateSlides,e.slideshowSpeed),d.playing=!0,e.pausePlay&&n.pausePlay.update("pause"),d.syncExists&&n.sync("play")},d.canAdvance=function(a,b){var c=m?d.pagingCount-1:d.last;return b?!0:m&&d.currentItem===d.count-1&&a===0&&d.direction==="prev"?!0:m&&d.currentItem===0&&a===d.pagingCount-1&&d.direction!=="next"?!1:a===d.currentSlide&&!m?!1:e.animationLoop?!0:d.atEnd&&d.currentSlide===0&&a===c&&d.direction!=="next"?!1:d.atEnd&&d.currentSlide===c&&a===0&&d.direction==="next"?!1:!0},d.getTarget=function(a){return d.direction=a,a==="next"?d.currentSlide===d.last?0:d.currentSlide+1:d.currentSlide===0?d.last:d.currentSlide-1},d.setProps=function(a,b,c){var f=function(){var c=a?a:(d.itemW+e.itemMargin)*d.move*d.animatingTo,f=function(){if(k)return b==="setTouch"?a:j&&d.animatingTo===d.last?0:j?d.limit-(d.itemW+e.itemMargin)*d.move*d.animatingTo:d.animatingTo===d.last?d.limit:c;switch(b){case"setTotal":return j?(d.count-1-d.currentSlide+d.cloneOffset)*a:(d.currentSlide+d.cloneOffset)*a;case"setTouch":return j?a:a;case"jumpEnd":return j?a:d.count*a;case"jumpStart":return j?d.count*a:a;default:return a}}();return f*-1+"px"}();d.transitions&&(f=i?"translate3d(0,"+f+",0)":"translate3d("+f+",0,0)",c=c!==undefined?c/1e3+"s":"0s",d.container.css("-"+d.pfx+"-transition-duration",c)),d.args[d.prop]=f,(d.transitions||c===undefined)&&d.container.css(d.args)},d.setup=function(b){if(!l){var c,h;b==="init"&&(d.viewport=a('<div class="'+f+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(d).append(d.container),d.cloneCount=0,d.cloneOffset=0,j&&(h=a.makeArray(d.slides).reverse(),d.slides=a(h),d.container.empty().append(d.slides))),e.animationLoop&&!k&&(d.cloneCount=2,d.cloneOffset=1,b!=="init"&&d.container.find(".clone").remove(),d.container.append(d.slides.first().clone().addClass("clone")).prepend(d.slides.last().clone().addClass("clone"))),d.newSlides=a(e.selector,d),c=j?d.count-1-d.currentSlide+d.cloneOffset:d.currentSlide+d.cloneOffset,i&&!k?(d.container.height((d.count+d.cloneCount)*200+"%").css("position","absolute").width("100%"),setTimeout(function(){d.newSlides.css({display:"block"}),d.doMath(),d.viewport.height(d.h),d.setProps(c*d.h,"init")},b==="init"?100:0)):(d.container.width((d.count+d.cloneCount)*200+"%"),d.setProps(c*d.computedW,"init"),setTimeout(function(){d.doMath(),d.newSlides.css({width:d.computedW,"float":"left",display:"block"}),e.smoothHeight&&n.smoothHeight()},b==="init"?100:0))}else d.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),b==="init"&&(g?d.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+e.animationSpeed/1e3+"s ease",zIndex:1}).eq(d.currentSlide).css({opacity:1,zIndex:2}):d.slides.eq(d.currentSlide).fadeIn(e.animationSpeed,e.easing)),e.smoothHeight&&n.smoothHeight();k||d.slides.removeClass(f+"active-slide").eq(d.currentSlide).addClass(f+"active-slide")},d.doMath=function(){var a=d.slides.first(),b=e.itemMargin,c=e.minItems,f=e.maxItems;d.w=d.width(),d.h=a.height(),d.boxPadding=a.outerWidth()-a.width(),k?(d.itemT=e.itemWidth+b,d.minW=c?c*d.itemT:d.w,d.maxW=f?f*d.itemT:d.w,d.itemW=d.minW>d.w?(d.w-b*c)/c:d.maxW<d.w?(d.w-b*f)/f:e.itemWidth>d.w?d.w:e.itemWidth,d.visible=Math.floor(d.w/(d.itemW+b)),d.move=e.move>0&&e.move<d.visible?e.move:d.visible,d.pagingCount=Math.ceil((d.count-d.visible)/d.move+1),d.last=d.pagingCount-1,d.limit=d.pagingCount===1?0:e.itemWidth>d.w?(d.itemW+b*2)*d.count-d.w-b:(d.itemW+b)*d.count-d.w-b):(d.itemW=d.w,d.pagingCount=d.count,d.last=d.count-1),d.computedW=d.itemW-d.boxPadding},d.update=function(a,b){d.doMath(),k||(a<d.currentSlide?d.currentSlide+=1:a<=d.currentSlide&&a!==0&&(d.currentSlide-=1),d.animatingTo=d.currentSlide);if(e.controlNav&&!d.manualControls)if(b==="add"&&!k||d.pagingCount>d.controlNav.length)n.controlNav.update("add");else if(b==="remove"&&!k||d.pagingCount<d.controlNav.length)k&&d.currentSlide>d.last&&(d.currentSlide-=1,d.animatingTo-=1),n.controlNav.update("remove",d.last);e.directionNav&&n.directionNav.update()},d.addSlide=function(b,c){var f=a(b);d.count+=1,d.last=d.count-1,i&&j?c!==undefined?d.slides.eq(d.count-c).after(f):d.container.prepend(f):c!==undefined?d.slides.eq(c).before(f):d.container.append(f),d.update(c,"add"),d.slides=a(e.selector+":not(.clone)",d),d.setup(),e.added(d)},d.removeSlide=function(b){var c=isNaN(b)?d.slides.index(a(b)):b;d.count-=1,d.last=d.count-1,isNaN(b)?a(b,d.slides).remove():i&&j?d.slides.eq(d.last).remove():d.slides.eq(b).remove(),d.doMath(),d.update(c,"remove"),d.slides=a(e.selector+":not(.clone)",d),d.setup(),e.removed(d)},d.setOption=function(a,b){a!==undefined&&b!==undefined&&(e[a]=b)},n.init()},a.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,pauseOnAction:!0,pauseOnHover:!1,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:0,maxItems:0,move:0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}},a.fn.flexslider=function(b){b===undefined&&(b={});if(typeof b=="object")return this.each(function(){var c=a(this),d=b.selector?b.selector:".slides > li",e=c.find(d);e.length===1?(e.fadeIn(400),b.start&&b.start(c)):c.data("flexslider")==undefined&&new a.flexslider(this,b)});var c=a(this).data("flexslider");switch(b){case"play":c.play();break;case"pause":c.pause();break;case"next":c.flexAnimate(c.getTarget("next"),!0);break;case"prev":case"previous":c.flexAnimate(c.getTarget("prev"),!0);break;default:typeof b=="number"&&c.flexAnimate(b,!0)}}})(jQuery);
View
7 jquery.flexslider.js 100644 → 100755
@@ -28,7 +28,7 @@
// Store a reference to the slider object
$.data(el, "flexslider", slider);
- // Privat slider methods
+ // Private slider methods
methods = {
init: function() {
slider.animating = false;
@@ -778,6 +778,7 @@
//FlexSlider: added() Callback
vars.added(slider);
}
+
slider.removeSlide = function(obj) {
var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;
@@ -805,6 +806,10 @@
vars.removed(slider);
}
+ slider.setOption = function(prop, val){
+ if(prop !== undefined && val !== undefined) vars[prop] = val;
+ }
+
//FlexSlider: Initialize
methods.init();
}
Something went wrong with that request. Please try again.