/* anythingslider v1.5.18 by chris coyier: http://css-tricks.com with major improvements by doug neiner: http://pixelgraphics.us/ based on work by remy sharp: http://jqueryfordesigners.com/ and crazy mods by rob garrison (aka mottie): https://github.com/proloser/anythingslider to use the navigationformatter function, you must have a function that accepts two paramaters, and returns a string of html text. index = integer index (1 based); panel = jquery wrapped li item this tab references @return = must return a string of html/text navigationformatter: function(index, panel){ return "panel #" + index; // this would have each tab with the text 'panel #x' where x = index } */ (function($) { $.anythingslider = function(el, options) { // to avoid scope issues, use 'base' instead of 'this' // to reference this class from internal events and functions. var base = this, o; // wraps the ul in the necessary divs and then gives access to jquery element base.$el = $(el).addclass('anythingbase').wrap('
'); // add a reverse reference to the dom object base.$el.data("anythingslider", base); base.init = function(){ // added "o" to be used in the code instead of "base.options" which doesn't get modifed by the compiler - reduces size by ~1k base.options = o = $.extend({}, $.anythingslider.defaults, options); base.initialized = false; if ($.isfunction(o.onbeforeinitialize)) { base.$el.bind('before_initialize', o.onbeforeinitialize); } base.$el.trigger('before_initialize', base); // cache existing dom elements for later // base.$el = original ul // for wrap - get parent() then closest in case the ul has "anythingslider" class base.$wrapper = base.$el.parent().closest('div.anythingslider').addclass('anythingslider-' + o.theme); base.$window = base.$el.closest('div.anythingwindow'); base.$controls = $('
').appendto( (o.appendcontrolsto !== null && $(o.appendcontrolsto).length) ? $(o.appendcontrolsto) : base.$wrapper); // change so this works in jquery 1.3.2 base.win = window; base.$win = $(base.win); base.$nav = $('