/*! * jQuery wmuSlider v2.1 * * Copyright (c) 2011 Brice Lechatellier * http://brice.lechatellier.com/ * * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php */ (function(a){a.fn.wmuSlider=function(b){var c={animation:"fade",animationDuration:600,slideshow:true,slideshowSpeed:7000,slideToStart:0,navigationControl:true,paginationControl:true,previousText:"Previous",nextText:"Next",touch:false,slide:"article",items:1};var b=a.extend(c,b);return this.each(function(){var p=a(this);var o=b.slideToStart;var f=p.find(".wmuSliderWrapper");var g=p.find(b.slide);var d=g.length;var k;var l;var e;var j=function(t,u,v){if(e){return false}e=true;o=t;var s=a(g[t]);p.animate({height:s.innerHeight()});if(b.animation=="fade"){g.css({position:"absolute",opacity:0});s.css("position","relative");s.animate({opacity:1},b.animationDuration,function(){e=false})}else{if(b.animation=="slide"){if(!u){f.animate({marginLeft:-p.width()/b.items*t},b.animationDuration,function(){e=false})}else{if(t==0){f.animate({marginLeft:-p.width()/b.items*d},b.animationDuration,function(){f.css("marginLeft",0);e=false})}else{if(!v){f.css("marginLeft",-p.width()/b.items*d)}f.animate({marginLeft:-p.width()/b.items*t},b.animationDuration,function(){e=false})}}}}if(l){l.find("a").each(function(w){if(w==t){a(this).addClass("wmuActive")}else{a(this).removeClass("wmuActive")}})}p.trigger("slideLoaded",t)};if(b.navigationControl){var i=a(''+b.previousText+"");i.click(function(s){s.preventDefault();clearTimeout(k);if(o==0){j(d-1,true)}else{j(o-1)}});p.append(i);var m=a(''+b.nextText+"");m.click(function(s){s.preventDefault();clearTimeout(k);if(o+1==d){j(0,true)}else{j(o+1)}});p.append(m)}if(b.paginationControl){l=a('');a.each(g,function(s){l.append('
  • '+s+"
  • ");l.find("a:eq("+s+")").click(function(t){t.preventDefault();clearTimeout(k);j(s)})});p.append(l)}if(b.slideshow){var r=function(){if(o+1d){b.items=d}g.css("float","left");g.each(function(w){var v=a(this);v.attr("data-index",w)});for(var u=0;u