jQuery(function() {
	var catClassName = "category-ball";
	var selectedItem;
	jQuery("div." + catClassName).addClass("pngfix").mouseover(function() {
		jQuery(this).addClass(catClassName + "-hover");
	}).mouseout(function() {
		jQuery(this).removeClass(catClassName + "-hover");
	}).click(function() {
		selectedItem = this;
		jQuery("div." + catClassName).each(function() {
			if (selectedItem == this) {
				jQuery(this).addClass(catClassName + "-active");
			} else {
				jQuery(this).removeClass(catClassName + "-active");
			}
		});
	}).children("div").addClass("pngfix").html(function(i, html) {
		return '<table cellspaceing="0" cellpadding="0" width="100%" height="100%"><tbody><tr><td align="center">' + html + '</td></tr></tbody></table>';							  
	});
	
	function displayCategoryContent(jObj) {
		jQuery("#featureContent").html(jQuery(jObj).find("table > tbody > tr > td").html()).fadeIn();
	}
	
	displayCategoryContent(jQuery("div." + catClassName).click(function() {
		jQuery.scrollTo(jQuery("#featureList"), 400, {});
		displayCategoryContent(this);		 
	}).first());
	
	jQuery("#featureList").show();

});
