// JavaScript Document

var currentstate; 

function imap(){
	$("area").mouseenter( function () {
		currentstate = $(this).attr("class");
		$('div.' + currentstate).fadeIn('fast');
	});
	$("div.states div").mouseleave( function () {
		$(this).fadeOut('fast');
	});
	$("div.states div").click( function () {
		var thisClass = $(this).attr('class');
		window.location = $('area.' + thisClass).attr('href');
	});
}

function countChars(textArea){
	document.getElementById('numChars').innerHTML = textArea.value.length;
}

function checkAgree(){
	if(document.getElementById('iAgree').checked){
		return true;
	}else{
		alert('You must agree to Startups Across America terms of use above.  Check box');
		return false;
	}
}

$(document).ready(function() {
	imap();
	$("a.form").colorbox({inline:true, href:"#form"});
});
