//
// Simple jQuery tabbed box plugin
//

$.fn.tabbedBox = function() {
			
	var arTabs  = $(this).find( 'div.tab' );
	var arPanes = $(this).find( 'div.pane' );
	var theObj  = $(this);
	
	// make first pane visible
	arPanes.eq(0).css( 'display', 'block' );
	
	// tab click handler
	arTabs.click( function() {
		var i = $('.tab',theObj).index( $(this) );
		$('.pane',theObj).css('display','none').eq(i).css( 'display', 'block' );
	});
	
	return this;
	
};  
