CNCA = {flairs:{}}

CNCA.Flair = function(identifier, prototype)
{
	prototype = Function.compose(prototype)
	prototype.identifier = identifier
	this.flairs[identifier] = Flair(prototype)
}

window.when('ondom', function(){ document.extend(CNCA.flairs) })

CNCA.Flair("UpAndOverImage", function(){
	
	this.extend = function()
	{
		this.up = new Image(this.height, this.width)
		this.up.src = this.src
		this.ov = new Image(this.height, this.width)
		this.ov.src = this.src.replace(/-up.png/, '-ov.png')		
	}

	this.onmouseover = function() { this.src = this.ov.src }
	this.onmouseout  = function() { this.src = this.up.src }
})
