/*! * excolo slider - a simple jquery slider * * examples and documentation at: * http://excolo.github.io/excolo-slider/ * * author: nikolaj dam larsen * version: 1.0.5 (30-june-2013) * * released under the mit license * https://github.com/excolo/excoloslider/blob/master/mit-license */ ; (function ($, window, document, undefined) { var plugin; /* plugin definition **************************************************************/ plugin = (function () { function plugin(elem, options) { this.elem = elem; this.$elem = $(elem); this.options = options; // this next line takes advantage of html5 data attributes // to support customization of the plugin on a per-element // basis. this.metadata = this.$elem.data('plugin-options'); } return plugin; })(); /* plugin prototype **************************************************************/ plugin.prototype = { /* default configuration **********************************************************/ defaults: { // width: 800, // height: 530, autosize: true, touchnav: true, mousenav: true, prevnextnav: true, prevnextautohide: true, pagernav: true, startslide: 1, autoplay: true, delay: 0, interval: 5000, repeat: true, playreverse: false, hoverpause: true, captionautohide: false, animationcsstransitions: true, animationduration: 500, animationtimingfunction: "linear", prevbuttonclass: "slide-prev", nextbuttonclass: "slide-next", // prevbuttonimage: "images/prev.png", // nextbuttonimage: "images/next.png", activeslideclass: "es-active", slidecaptionclass: "es-caption", pagerclass: "es-pager", pagerimage: "images/pagericon.png" }, /* initialization function **********************************************************/ init: function () { var base, maxheight, $prev, $next, $buttons, $innerbase, caption, $wrapper, $children, $container; // defined variable to avoid scope problems base = this; // introduce defaults that can be extended either globally or using an object literal. base.config = $.extend({}, base.defaults, base.options, base.metadata); // initialize plugin data base.data = $.data(base); $.data(base, "currentslide", base.config.playreverse && base.config.startslide == 1 ? base.$elem.children().length-1 : base.config.startslide - 1); $.data(base, "nextslide", base.data.currentslide); $.data(base, "totalslides", base.$elem.children().length); $.data(base, "browserengineprefix", base._getbrowserengineprefix()); $.data(base, "isplaying", false); $.data(base, "isanimating", false); $.data(base, "playpaused", false); $.data(base, "justtouched", false); $.data(base, "ismoving", false); $.data(base, "width", base.config.width); // create helper html objects base.$elem.addclass("slider"); base.$elem.css({ position: "relative" }); base.$elem.wrapinner("