var JVTab = (function($){ return $.extend(function(el, ops){ var self = arguments.callee, This = this; ops = $.extend({},self.options,ops); el = $(el).tab(); /^[0-9]+$/.test(ops.minHeight) && (ops.minHeight = parseInt(ops.minHeight)); /^[0-9]+$/.test(ops.maxHeight) && (ops.maxHeight = parseInt(ops.maxHeight)); var $this = $(this), nav = el.children('.JVTab-nav'), headTabs = nav.find('ul'), contents = el.children('.JVTab-content'), tabs = [] ; nav.find('a[href^=#]').each(function(i){ var tab = $(this), id = tab.attr('href'), content = contents.children(id) ; var tabData = { index: i, tab: tab, id: id.substring(1), content: content } tabs.push(tabData); tab.click(function(){ changeTab(i); return false; }).data('jvtabs',tabData); }); if(!tabs.length) return; ops.load == 'cache' && (function(){ var caches = {},overlay = $('