function Tabs(){
	this.body = $('#right .body');	
	this.tab = $('#right .tab');	
	this.body2 = $('#catTab .body');	
	this.tab2 = $('#catTab .tab');	
	this.init = function(){
		var self = this;

		$('> li',this.tab).live('click',function(){self.toggle(this)});
		$('> li',this.tab).live('click',function(){self.toggle(this)});
	
		$('> li',this.tab2).live('click',function(){self.toggle2(this)});
	
		this.toggle($('> li',this.tab).get(0));
	}

	this.toggle = function(el){
		el = $(el);		
		if (!el.hasClass('selected')){
			$('> li',this.tab).removeClass('selected');
			var index = el.attr('class');			
			$('> li',this.body).hide();
			$('.'+index,this.body).show();
			el.addClass('selected');			
		}
	}
	this.toggle2 = function(el){
		el = $(el);		
		if (!el.hasClass('selected')){
			var url = $('a',el).eq(0).attr('href');
			if (url){
				window.location(url);	
			}		
		}			
	}
}
var tabs;

$(document).ready(function(){
	tabs = new Tabs();
	tabs.init();
	if ($.browser.msie && $.browser.version == 6){
		$('.catInfo').css('margin-top','0px');
	}
});


 

