jQuery(function($){ $('div.slideimage').slide(); }); (function($){ $.fn.slide = function(options){ var defaults = { fadeTime: 1000, intervalTime: 3000, waitTime: 5000, window: true }; options = $.extend(defaults, options); return this.each(function(){ var current = 0; var interval = 0; var slides = new Array; var target = $(this).addClass('slideimage'); var navi = $('<ul>').addClass('slidenavi');