/**
 * @author Shawn Welch
 */
function Delicious() {
	// jQuery quick vars
	var self = this,
	$search_txt = $('#directory-search-txt'),
	$search_form = $('#directory-search-form');
	
	// Search
	this.search = function() {
		var term = $search_txt.val();
		window.location.href = '/directory_beta.php?search=' + term;
	}
	
	// Add to search and submit
	this.add = function(term) {
		var search_txt = $search_txt.val();
		if(search_txt.length) term = ' ' + term;
		//$search_txt.val(search_txt + ' ' + term);
		//$search_form.submit();
		window.location.href = '/directory_beta.php?search=' + search_txt + term;
	}
	
	// Start over
	this.reset = function() {
		window.location.href = '/directory_beta.php';
		//$search_txt.val('');
		//$search_form.submit();
	}
}
