    
  */
 
-package eu.stefaner.elasticlists.ui.facetboxes.elasticlist {
+package eu.stefaner.elasticlists.ui.facetboxes.elasticlist {
 	import eu.stefaner.elasticlists.data.FacetValue;
 	import eu.stefaner.elasticlists.ui.DefaultGraphicsFactory;
 	import eu.stefaner.elasticlists.ui.facetboxes.FacetBox;

				bg.alpha = 1;
			}
			

			if (facetValue.numContentItems) {
				expand();
			} else {
				collapse();
			}
		}

		//---------------------------------------
		// DISPLAY STATE
		//---------------------------------------
		override public function collapse() : void {
			container.transitioner.$(this).height = COLLAPSED_HEIGHT;
			container.transitioner.$(this).alpha = .4;
			mouseEnabled = false;
		}

		override public function expand() : void {
			var s : Number = facetValue.numContentItems > 1 ? ratioToSize(facetValue.localRatio) : MIN_HEIGHT;
			container.transitioner.$(this).height = s;
			container.transitioner.$(this).alpha = 1;
			mouseEnabled = true;
		}

		protected function ratioToSize(a : Number) : Number {
			var result : Number;
			if (!a) {
				a = 0;
			}
			var logScale : Number = 5;

			result = Math.floor(MAX_HEIGHT * Math.log(1 + a * logScale) / Math.log(logScale + 1));
			result = Math.min(MAX_HEIGHT, Math.max(MIN_HEIGHT, result));
			return result;
		}
	}
}
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormatAlign;

	public class ElasticListEntry extends FacetBoxElement {

		//---------------------------------------
		// CLASS CONSTANTS
		//---------------------------------------
		protected static var COLLAPSED_HEIGHT : int = 2;
		protected static var MIN_HEIGHT : int = 20;
		protected static var MAX_HEIGHT : int = 36;
		//---------------------------------------
		// PUBLIC VARIABLES
		//---------------------------------------
		public var num_tf : TextField;
		public static var showTotals : Boolean = true;
		public static var SHOW_DISTINCTIVENESS : Boolean = true;

		//---------------------------------------
		// CONSTRUCTOR
		//---------------------------------------
		public function ElasticListEntry() {
			super();
		}

		override public function init(c : FacetBox, d : FacetValue) : void {
			//override public function init(c:FacetBox, d:Object):void {
			super.init(c, d);

			//bg.height = height = ElasticListEntry.MAX_HEIGHT;
			selectionMarker.y = 1;
		}

		override protected function initGraphics() : void {
			if(!bg) {
				bg = DefaultGraphicsFactory.getElasticListEntryBackground();
				addChild(bg);
			}
			super.initGraphics();
			if(!num_tf) {
				num_tf = DefaultGraphicsFactory.getTextField();
				num_tf.defaultTextFormat.align = TextFormatAlign.RIGHT;
				addChild(num_tf);
			}
			title_tf.autoSize = TextFieldAutoSize.NONE;
			title_tf.multiline = false;
			num_tf.textColor = 0xAAAAAA;
			bg.graphics.lineStyle(0, 0, .2);
			bg.graphics.lineTo(bg.width, 0);
		}

		//---------------------------------------
		// GETTER / SETTERS
		//---------------------------------------
		protected function layout() : void {
			title_tf.x = 2;
