Object.extend(Prototype.Browser, {
	IE6 : false /*@cc_on || @_jscript_version < 5.7 @*/,
	IE7 : false /*@cc_on || @_jscript_version == 5.7 @*/
});

var Magrath = {
	Version: '1.2',
	
	clearForms: function()
	{
		$$('input[type=text]').each(function(f)
		{
			f.observe('focus', function() { if ( $F(f) === $(f).defaultValue ) { $(f).value = ''; } });
			f.observe('blur', function() { if ( $F(f).blank() ) { $(f).value = $(f).defaultValue; } });
		});
	},
	
	matchColumns: function()
	{
		var height = 0;
		$$('div.column')
			.each(function(column) { height = ( $(column).getHeight() > height ) ? $(column).getHeight() : height; })
			.invoke('setStyle', { minHeight : height + 'px' });
			
		if ( Prototype.Browser.IE6 ) { $$('div.column').invoke('setStyle', { height : height + 'px' }); }
	}
};

document.observe('dom:loaded', function()
{
	Magrath.clearForms();
	
	$$('.articles-list .articles-menu table tr, #column2 table tr').each(function (row, i) {
		if (i % 2 === 1) { row.addClassName('even'); }
	});
});


