/**
 * Simple tabs
 * 
 * Copyright (c) 2009 Kyosuke Nakamura (kyosuke.jp)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 */

$(function(){
	$('.tabNav').each(function(){
		var tabs = $(this).find('a[href^=#]');
		var contents;
		tabs.each(function(){
			var selecter = $(this).attr('href');
			if (contents) {
				contents = contents.add(selecter);
			} else {
				contents = $(selecter);
			}
			$(this).click(function(){
				tabs.removeClass('active');
				$(this).addClass('active');
				contents.hide();
				$(selecter).show();
				return false;
			});
		});
		tabs.eq(0).trigger('click');
	});
	$('.tabContent h3').hide();
});