function setClickable() {
	/*
	just to disable this function for now: return;
	*/
	return;
	
	$('div.editInPlace').click(function() {
		var id = $(this).id()
		var textarea = '<div><textarea rows="10" cols="60">'+$(this).html()+'</textarea>';
		var button	 = '<div><input type="button" value="SAVE" class="saveButton" /> OR <input type="button" value="CANCEL" class="cancelButton" /></div></div>';
		var revert = $(this).html();
	$(this).after(textarea+button).remove();
	$('.saveButton').click(function(){saveChanges(this, false, id);});//added by TR: id and set above using this.id()
	$('.cancelButton').click(function(){saveChanges(this, revert, id);});
})
.mouseover(function() {
	$(this).addClass("editable");
})
.mouseout(function() {
	$(this).removeClass("editable");
});
};

function saveChanges(obj, cancel, id) {//params sent from setClickable
	if(!cancel) {
		var t = $(obj).parent().siblings(0).val();
		//var id = $(obj.id);
		$.post("/common/process.php",{
		  content: t, 
		  id: id
		});
	}
	else {
		var t = cancel;
	}
	if(t=='') t='(click to add text)';
	$(obj).parent().parent().after('<div id="'+id+'" class="editInPlace">'+t+'</div>').remove();
	setClickable();
}	

$(document).ready(function(){
	$("#products div").hide(); 
	$("#products:first-child").show("slow");
	
	$(".submenu a").click(function() {
		var objClass = this.className;
		var objId = this.id;
		if (objId == "all") {
			$(".editInPlace").show("slow");
		}
		else {
			$(".editInPlace").hide();
			
			$("#"+objClass).show("slow");
			return false;
		}
	});
	
	
});
