var cssStatusBar = new Class({
	
	Implements: [Options, Events],
	options: {
		targetDiv: ''
	},
	
	initialize: function(options){
		this.setOptions(options);

		var minimumHeight = $(this.options.targetDiv).getStyle('top').toInt();
	
		//inital resize
		this.relocate(minimumHeight);
		
		window.addEvent('resize',function(){
			this.relocate(minimumHeight)
		}.bind(this));

	},
	
	relocate: function(minimumHeight) {
	
		
		//get browser window size
		var browserSize = window.getSize();
		var browserHeight = browserSize.y;
		
		//get target div height
		var targetDivHeight = $(this.options.targetDiv).getStyle('height').toInt();
		
		//calculate new css top offset
		var newTop = browserHeight - targetDivHeight;
		
		
		if (browserHeight >= minimumHeight) {
			$(this.options.targetDiv).setStyle('top', newTop);
		}		
		
	}
		
		
});