/* * jQuery dacSlideshow 1.0 * * Sample usage: * HTML - *
* * * * Options: * btnPrev: optional identifier for previous button * btnNext: optional identifier for next button * auto: whether or not to auto-proceed * speed: animation speed * autoTime: time between auto-rotation * easing: easing function for transition * start: item to select by default * scroll: direction to scroll in * pagination: whether or not to include dotted pagination * */ (function($) { $.fn.dacSlideshow = function(o) { //Options - see above o = $.extend({ btnPrev: null, btnNext: null, auto: true, speed: 500, autoTime: 12000, easing: null, start: 0, scroll: 1, pagination: true }, o || {}); //Set up a carousel for each return this.each(function() { var running = false; var animCss = o.vertical ? "top" : "left"; var sizeCss = o.vertical ? "height" : "width"; var div = $(this); var ul = $("ul", div); var tLi = $("li", ul); var tl = tLi.size(); var timer = null; var li = $("li", ul); var itemLength = li.size(); var curr = o.start; li.css({float: o.vertical ? "none" : "left"}); ul.css({margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1"}); div.css({position: "relative", "z-index": "2", left: "0px"}); var liSize = o.vertical ? height(li) : width(li); var ulSize = liSize * itemLength; var divSize = liSize; li.css({width: li.width(), height: li.height()}); ul.css(sizeCss, ulSize+"px").css(animCss, -(curr*liSize)); div.css(sizeCss, divSize+"px"); //Pagination if (o.pagination) { var pagination = $(""); var pag_ul = $("