(function($) {
	
	if (!$.Vector) $.Vector	= {};
	
	$.Vector.Object	= (function() {
		var construct	= function() {};

		var Create	= function() {
			var me = this, args	= arguments;
			
			var obj	=  function() {
				for (var method in me) {
					this[method]	= me[method];
				}
				
				this.construct.apply(this, args)
				
				return this;
			};
			
			return new obj();
		};

		var Extend	= function(Methods) {
			var publicMe	= {};
			
			if (!publicMe.superclass) {
				publicMe._super	= this;
				//publicMe._super.construct	= this.construct;
			}
				
			for (var key in this) {
				if (key == '_super') {
					continue;
				}
					
				publicMe[key]	= this[key];
			}
			
			if (Methods) {
				for (var key in Methods) {
					if (key == '_super') {
						console.warn('_super property is reserved');
						continue;
					}
					
					publicMe[key]	= Methods[key];
				}
			}
			
			publicMe.Extend	= this.Extend;
			publicMe.Create	= this.Create;	
			
			return publicMe;
		};
		
		return {
			Extend	: Extend,
			Create	: Create,
			construct	: construct
		};
	}) ();
	
	$.fn.VectorFactory	= function(Class, options) {
		return this.each(function() {
			if ($.Vector[Class]) {
				return $.Vector[Class].Create(this, options);
			} else {
				console.warn('No vector ' + Class + ' class found!');
			}
		})
	}
	
})(jQuery);

