jQuery.fn.makeTabs = function() {
	this.each(function() {
		var _self = this;
		
		_self.init = function() {
			_self.makeMenu();
		}
		
		_self.makeMenu = function() {
			jQuery('.fce_tabs_menu li:first', _self).addClass('first');
			jQuery('.fce_tabs_menu a:first', _self).addClass('active');
			jQuery('.fce_tabs_menu li:last', _self).addClass('last');

			jQuery('.fce_tabs_menu a', _self).each(function(index) {
				jQuery(this).bind('click', {index:index}, function() {
					jQuery('.fce_tabs_menu a', _self).removeClass('active')
					jQuery(this).addClass('active');
					_self.showTab(index);
					return false;
				});
			});
		}
		
		_self.showTab = function(showindex) {
			jQuery('.fce_tabs_content', _self).each(function(index) {
				if(index==showindex) {
					jQuery(this).removeClass('fce_tabs_hide').siblings().addClass('fce_tabs_hide');
				}
			});
		}
		
		_self.init();
	});
}