$(document).ready(function() {
	$("#keyword").autocomplete("suggest.cfm", { minChars:2 });
	$('.rounded').corners();
	
});

function toggleFeedback() {
	if (document.getElementById("feedbackForm").style.display=="none") {
		document.getElementById("feedbackForm").style.display="inline";
		}
	else {
		document.getElementById("feedbackForm").style.display="none";
		}
	
	}

function feedbackThanks() {
	$(document).ready(function() {
		$.blockUI({
			message: 'Thank you for submitting your feedback.',
			fadeIn: 700,
			fadeOut: 700,
			timeout: 2000,
			css: {
				width: '350px', 
				border: 'none', 
				padding: '5px', 
				backgroundColor: '#9FADBF', 
				'-webkit-border-radius': '10px', 
				'-moz-border-radius': '10px', 
				color: '#fff' 
			}
		});
	});
}

function clearEmailAddress() {
	if (document.getElementById("emailAddress").value=="Enter Email Address") {
		document.getElementById("emailAddress").value="";
		}
	}
function checkmail(e){
	var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i;
	var returnval=emailfilter.test(e.value);
	if (returnval==false){
		document.getElementById("emailErrorBox").style.display="block";
		e.select();
	}
	return returnval;
}
function buyerSignup() {
	window.open('/signup.cfm?','Buyer Signup',"resizable=1,status=0,titlebar=0,directories=0,toolbar=0,menubar=0,scrollbars=0,status=0,width=400,height=180,location=0");
}

function showSignupMessage() {
	$(document).ready(function() {
		$.blockUI({
			message: 'Thank you for signing up.<br />You will recieve our monthly newsletter.',
			fadeIn: 700,
			fadeOut: 700,
			timeout: 2000,
			css: {
				width: '350px', 
				border: 'none', 
				padding: '5px', 
				backgroundColor: '#9FADBF', 
				'-webkit-border-radius': '10px', 
				'-moz-border-radius': '10px', 
				color: '#fff' 
			}
		});
	});
}
