From 42992d9cfcce4cc4e28be25a7d81500c26dd31ae Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Wed, 2 Jun 2010 13:22:42 -0400 Subject: sostler prod commit --- static/js/loopedslider.js | 261 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 static/js/loopedslider.js (limited to 'static/js/loopedslider.js') diff --git a/static/js/loopedslider.js b/static/js/loopedslider.js new file mode 100644 index 0000000..a544a64 --- /dev/null +++ b/static/js/loopedslider.js @@ -0,0 +1,261 @@ +/* + * loopedSlider 0.5.6 - jQuery plugin + * written by Nathan Searles + * http://nathansearles.com/loopedslider/ + * + * Copyright (c) 2009 Nathan Searles (http://nathansearles.com/) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * Built for jQuery library + * http://jquery.com + * Compatible with jQuery 1.3.2+ + * + */ + +/* + * markup example for $("#loopedSlider").loopedSlider(); + * + *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * + * + *
+ * +*/ + +if(typeof jQuery != 'undefined') { + jQuery(function($) { + $.fn.extend({ + loopedSlider: function(options) { + var settings = $.extend({}, $.fn.loopedSlider.defaults, options); + + return this.each( + function() { + if($.fn.jquery < '1.3.2') {return;} + var $t = $(this); + var o = $.metadata ? $.extend({}, settings, $t.metadata()) : settings; + + var distance = 0; + var times = 1; + var slides = $(o.slides,$t).children().size(); + var width = $(o.slides,$t).children().outerWidth(); + var position = 0; + var active = false; + var number = 0; + var interval = 0; + var restart = 0; + var pagination = $("."+o.pagination+" li a",$t); + + if(o.addPagination && !$(pagination).length){ + var buttons = slides; + $($t).append("