// blossomTabs constructor
var blossomTabs = function(tabsetID, activeTab){
	
	var method = this;
	
	//activateTab method
	this.activateTab = function(tab){
		jQuery(tabsetID + ' .tabs .tab').removeClass('active');
		jQuery(tabsetID + ' .tabs .' + tab).addClass('active');
		
		jQuery(tabsetID + ' .tabs .tab').each(function(i) {
			method.textUnColor(this.id.substr(3));
		});
		method.textColor(tab);

		jQuery(tabsetID + ' .contents .content').hide();
		jQuery(tabsetID + ' .contents .' + tab).fadeIn("fast");
		
		this.activeTab = tab;

	}

	//textColor method
	method.textColor = function(tab){
		jQuery(tabsetID + ' .tabs .' + tab + ' img').attr("src","/fls/17300/site_graphics/2009/tabtxt_" + tab + "_on.png");
	}
	
	//textUnColor method
	method.textUnColor = function(tab){
		jQuery(tabsetID + ' .tabs .' + tab + ' img').attr("src","/fls/17300/site_graphics/2009/tabtxt_" + tab + "_off.png");
	}

	//click event
	jQuery(tabsetID + ' .tabs .tab').click(function() {
		method.activateTab(this.id.substr(3));
	});

	//hover event
	jQuery(tabsetID + ' .tabs .tab').hover(function() {
		method.textColor(this.id.substr(3));
		}, function() {
			if(this.id.substr(3) != method.activeTab){
				method.textUnColor(this.id.substr(3));
			}
	});
	

	//initialize
	this.activateTab(activeTab);

}//end blossomTabs constructor

