(function($) {

var $inputs = $('#q, #subscribe')
	.focus(function() {
		$(this).attr('class', 'focus');
	})
	.bind('blur load', function() {
		var $this = $(this);
		if ($this.val()) {
			$this.attr('class', 'not-empty');
		} else {
			$this.attr('class', '');
		}
	})
;

$inputs.each(function() {
	var $this = $(this);
	if ($this.val()) {
		$this.attr('class', 'not-empty');
	}
});

})(jQuery);
