jQuery(document).ready(function() {
							
								
// setting the tabs in the sidebar hide and show, setting the current tab
/*
	jQuery('div.tabbed div').hide();
	jQuery('div.footer_tabbed div').hide();
	jQuery('div.t1').show();
	jQuery('div.t5').show();
	jQuery('div.footer_tabbed ul.tabs li.t5 a').addClass('tab-current');
	jQuery('div.tabbed ul.tabs li.t1 a').addClass('tab-current');
	jQuery('.tabbed div.t2, .tabbed div.t3, .tabbed div.t4, .footer_tabbed div.t6, .footer_tabbed div.t7, .footer_tabbed div.t8').addClass('tabbed_hidden');

	// header TABS
	jQuery('div.tabbed ul li a').click(function(){
		var headerClass = this.className.slice(0,2);
		jQuery('div.tabbed div').hide();

		jQuery('div.' + headerClass).fadeIn(1000); //the method by which the content is shown (to make plain, replace .fadeIn() with .show()
	
		jQuery('div.tabbed ul.tabs li a').removeClass('tab-current');
		jQuery(this).addClass('tab-current');
		jQuery(this).removeClass('tabbed_hidden');
	});
		
	// footer TABS
	jQuery('div.footer_tabbed ul.tabs li a').click(function(){
		var thisClass = this.className.slice(0,2);
		jQuery('div.foo ter_tabbed div').hide();
		
		jQuery('div.' + thisClass).fadeIn(1000); //the method by which the content is shown (to make plain, replace .fadeIn() with .show()
		
		jQuery('div.footer_tabbed ul.tabs li a').removeClass('tab-current');
		jQuery(this).addClass('tab-current');
		jQuery(this).removeClass('tabbed_hidden');
	});
*/
	var $ = jQuery.noConflict();
	
	//now with cookie suppport
	function myTabs(div){

			//if this is not the first tab, hide it
			$('.' + div + '_tab:not(:first)').hide();
			//to fix u know who
			$('.' + div + '_tab:first').show();
			//ad active class to first link
			$('ul#' + div + '_htabs li:first').find('a').addClass('tab-current');
			$('ul#' + div + '_htabs li:first').addClass('tab-current');

		
		 //when we click one of the tabs
		 $('ul#' + div + '_htabs li a').click(function(){
			
			$('ul#' + div + '_htabs li').removeClass('tab-current');
			$(this).parents('li').addClass('tab-current');
			//add an active class to the links							   
			$(this).parents('ul#' + div + '_htabs').find('li a.tab-current').toggleClass('tab-current');
			$(this).toggleClass('tab-current');
										   
			 //get the ID of the element we need to show
			 stringref = $(this).attr("href").split('#')[1];
			 //write a cookie with the div id name
			// $.cookie(div + '_tabs', stringref);
			 
			 //hide the tabs that doesn't match the ID
			 $('.' + div + '_tab:not(#'+stringref+')').hide();
			 //fix
			 if ($.browser.msie && $.browser.version.substr(0,3) == "6.0") 
			 {
				$('.' + div + '_tab#' + stringref).show();
			 }
			 else
			 {
				 //display our tab fading it in
				 $('.' + div + '_tab#' + stringref).show();
			 }
			 
			 //stay with me
			 return false;
		 });
	}
	myTabs('tabbed');
	

});