(function($){
	$.fn.imageMenu = function(o) {
		var elements = this;
		o =$.extend({
			item_close_width: "170px",
			item_show_width: "410px",
			item_list_width: "230px",
			duration: 300
		});
		return this.each(function(el){
			$(this).bind("mouseover", function(){
				this.show();
			});
			$(this).bind("mouseout", function(){
				this.hide();
			});

			this.show = function() {
				var others;
				elements.each(function(e, i){
				if(e != el) {
					if(others) others = others.add(this);
					else others = $(this);
				}
			});
			others.animate({ width: o.item_close_width }, { queue: false, duration: o.duration });
				$(this).animate({width: o.item_show_width}, { queue: false, duration: o.duration });
			};
			this.hide = function() {
				elements.animate({ width: o.item_list_width }, { queue: false, duration: o.duration });
			};
		});
	};
})(jQuery);
