var vAnimationInProgress=false;
$(document).ready(function(){
	$('table>tbody>tr:first-child,table>tbody>tr>td:first-child').addClass('first-child');
	$('table>tbody>tr:last-child,table>tbody>tr>td:last-child').addClass('last-child');
	//Finding and Hidden the Tab Content; except the first tab content 
	$('.tab-control').each(function(){
		//Hidden List Table
		$(this).find('.tab-content').not(':first-child').each(function(){
			$(this).css({display:'none'});
		});
		$('.tab-control ul.tab-titles li:hover').mouseover(function(){$(this).addClass('hover');}).mouseout(function(){$(this).removeClass('hover');});
		//Get First List Table ID
		var tmpID = $(this).find('.tab-titles li:first-child').addClass('tab-title-selected').find('a').attr('href');
		$(tmpID).addClass('tab-content-selected');
		$(this).find('ul.tab-titles>li>a').mouseover(function(){  // can change mouseover to click
			if(vAnimationInProgress==false){
				vAnimationInProgress=true;
				//Get List Table ID
				var tabContentID = $(this).attr('href');	
				$(this).parent().parent().find('li.tab-title-selected').removeClass('tab-title-selected');
				$(this).parent().addClass('tab-title-selected').parent().parent()
					.find('.tab-content-selected').removeClass('tab-content-selected')
					.hide();
				$(tabContentID).addClass('tab-content-selected')
					.show();//'1',function(){
						vAnimationInProgress=false;
					//});
			}
			return false;
		});
	});
});