class 'jamProduct' (regularProduct)

function jamProduct:__init(baseName) super(baseName)
end

function jamProduct:onClick()

	local ignore = false
	if (self:isQueuedLast()) then
		ignore = true
		
		if (getProduct("CHERRY")) then
			if (getProduct("CHERRY"):isQueuedLast()) then
				ignore = false
			end		
		end
		if (getProduct("APPLE")) then
			if (getProduct("APPLE"):isQueuedLast()) then
				ignore = false
			end		
		end	
	end
	
	if (ignore) then
		return
	end
	
	regularProduct.onClick(self)

end