(function($) {

	$.fn.actionbar = function(options) {
		var constants = {
				constOverflow: "hidden",
				constPosition: "fixed",
				constBottom: "0px"
			};
		
		this.each(function() {
			var obj = $(this);
			var $screen = jQuery(this);
			var intFullScreen = $screen.width(); // get screen width
			var intCenterScreen = (intFullScreen/2); // get screen center
			var intMarginLeft = 0;

			// initialize bar
			$(this).css({
				"overflow": constants['constOverflow'],
				"position": constants['constPosition'],
				"bottom": constants['constBottom']
			});
			
			// add bar style (theme)
			$(this).addClass("Actionbar");

			// button style (theme)
			$(this).addClass("Actionbar-button");

			// calculate and adjust bar to center
			intMarginLeft = intCenterScreen - ($(this).width()/2) + 5;
			$(this).css({'margin-left': intMarginLeft});
			
		});
		
		return this;
		
	};
	
})(jQuery);
