
function my_kwicks(){
	$('.kwicks').kwicks({
		duration: 300,
		max: 260,
		spacing:  0
	});
}

$(document).ready(function(){
	my_kwicks();
	
	$('ul.kwicks a').hover(function() {
		var curChildIndex = $(this).parent().prevAll().length + 1;
		var w = $(this).parent().parent().children;
		
		// remove class of 'current' from the current tab and add it to the clicked item
		$(this).parent().children('.current').removeClass('current');
		$(this).parent().addClass('current');
			// show the appropriate content
			$(this).parent().parent().next('.tabContainer').children('.current').fadeOut('fast',function() {
					$(this).removeClass('current');
					$(this).parent().children('div:nth-child(' + curChildIndex + ')').fadeIn('normal',function() {
						$(this).addClass('current');
					});
			});	
		console.log(w);
		return false; 
	});
	
	$(function( ) {
		$('table.striped tr:even').addClass('even');
	});

});
