$(document).ready(function () {
	$("#comments li.alt").corner("tl bl 7px");
	$.fn.fclear = function () {
		return this.each(function () {
			var clear = $('<br/>').addClass('jQueryClearer').attr('style','clear:both;height:1px;');
			$(this).append(clear);
		});
	};
	$('#bottom .gutter, #top .gutter').fclear();
	$("input, textarea").livequery(function () {
		$(this).focus(function() {
			// only select if the text has not changed
			$(this).addClass('focus');
			if(this.value === this.defaultValue)	{
				this.select();
			}
		});
	});
	$("input, textarea").livequery(function () {
		$(this).blur(function() {
			// only select if the text has not changed
			$(this).removeClass('focus');
		});
	});
	$("input:submit, button").livequery(function() {
		$(this).addClass('button');
	});
	$("input:checkbox").livequery(function() {
		$(this).addClass('checkbox');
	});
	$("input:radio").livequery(function() {
		$(this).addClass('radio');
	});
	$("input, button, textarea").livequery(function() {
		$(this).hover(function () {
			$(this).toggleClass('hover');
		},
		function () {
			$(this).toggleClass('hover');
		});
	});
	$("img[align=right]").addClass("floatRight").attr('align','');
	$("img[align=left]").addClass("floatLeft").attr('align','');
	$("h2:first").addClass('first');
});