jQuery(document).ready(function(){

		var tag_cloud_class = '#tagcloud'; 
		var feat_class = '#feat'; 
		
		var tag_cloud_height = jQuery('#tagcloud').height();
		var feat_height = jQuery('#feat').height();

		jQuery('#tabs .inside ul li:last-child').css('border-bottom','0px') // remove last border-bottom from list in tab content
		jQuery('#tabs .wooTabs li a:first').addClass('selected'); // Add .selected class to first tab on load
		jQuery('#tabs .inside > *').hide();
		jQuery('#tabs .inside > *:first').show();
		
		
		jQuery('#tabs .wooTabs li a').click(function(evt){ // Init Click funtion on Tabs
		
				var clicked_tab_ref = jQuery(this).attr('href'); // Store Href value
	
				if(clicked_tab_ref === tag_cloud_class) // Initiate tab fix (+20 for padding fix)
				{
				    clicked_tab_ref_height = tag_cloud_height + 20;
				}
				else if(clicked_tab_ref === feat_class) // Initiate tab fix (+20 for padding fix)
				{
				    clicked_tab_ref_height = feat_height + 10;
				}
				else // Other height calculations
				{
				    clicked_tab_ref_height = jQuery('#tabs .inside ' + clicked_tab_ref).height();
				}

				jQuery('#tabs .wooTabs li a').removeClass('selected'); //Remove selected from all tabs
				jQuery(this).addClass('selected');
				
				jQuery('#tabs .inside > *').fadeOut('fast', function(e){
							
					jQuery('#tabs .inside').stop().animate({
						height: clicked_tab_ref_height
					},200,function(){
					        //Callback after new tab content's height animation
					        jQuery('#tabs .inside ' + clicked_tab_ref).fadeIn(500);
					})
				
				});
			 evt.preventDefault();
		
		})




		jQuery('#tabber .wooTabs li a:first').addClass('selected'); // Add .selected class to first tab on load
		jQuery('#tabber .inside > *').hide();
		jQuery('#tabber .inside > *:first').show();
		
		
		jQuery('#tabber .wooTabs li a').click(function(evt){ // Init Click funtion on Tabs
		
				var clicked_tab_ref = jQuery(this).attr('href'); // Store Href value
	
				clicked_tab_ref_height = jQuery('#tabber .inside ' + clicked_tab_ref).height();

				jQuery('#tabber .wooTabs li a').removeClass('selected'); //Remove selected from all tabs
				jQuery(this).addClass('selected');
				
				jQuery('#tabber .inside > *').hide();
				jQuery('#tabber .inside ' + clicked_tab_ref).show();
				
			 evt.preventDefault();
		
		})
    
})