// JavaScript Document (function($){ $.fn.tabs=function(opts){ var options=$.extend({},$.fn.tabs.defaults,opts); var $that=$(this); $that.children().eq(0).find('li').bind(options.switchMode,function(){ $that.children().eq(0).find('.current').removeClass('current'); $(this).addClass('current'); var m=$(this).index(); $that.children().eq(1).children().hide(); $that.children().eq(1).children().eq(m).show(); }); } $.fn.tabs.defaults={ switchMode:"mouseover" } })(jQuery);