// PGX Prototip Class
var pgxPrototip = Class.create({
	
	// Tip
	tip: function(element, content, options) {
		if (typeof content == 'object') {
			options = content;
			content = '';
		}
		if (typeof content == 'undefined') {
			content = '';
		}
		if (typeof options == 'undefined') {
			options = {};
		}
		
		tip = new Tip(element, content, options);
		
		// Return
		$(element).prototip.show();
		$(element).prototip.hide();
		
		tip = $(tip.tip);
		tip.prototip = $(element).prototip;
		
		return tip;
	}
	
});

// PGX
if (typeof PGX == 'undefined') {
	PGX = {};
}

PGX.prototip = new pgxPrototip();

// Add methods
Element.Methods.prototip = function(element, content, options) {
	return PGX.prototip.tip(element, content, options);
}

Element.addMethods();
