/* Search box behavior */

/* Sets initial state if there is content in the search box. */
if (jQuery.trim($('#searchQuery')[0].value).length != 0) {
	$('#searchLabel').addClass('hidden');
}

/* Hide the label when the input gets focus */
$('#searchQuery').focus(function() {
	$('#searchLabel').addClass('hidden');
});

/* Show the label when the input loses focus if it's empty */
$('#searchQuery').blur(function() {
	if (jQuery.trim(this.value).length == 0) {
		$('#searchLabel').removeClass('hidden');
	}
});

