$(document).ready(function() {
    

	$(".gallery_unstyled li:eq(9)").css("padding-right", "0");
	$("#gallery_thumbs img:eq(20)").css("margin-left", "0");
	$("#gallery_thumbs img:eq(9)").css("margin-right", "0");
	$("#gallery_thumbs img:eq(19)").css("margin-right", "0");
	$("#gallery_thumbs img:eq(29)").css("margin-right", "0");

	$("#search_text .search_result:eq(2)").css("margin-right", "0");
	$("#search_text .search_result:eq(5)").css("margin-right", "0");
	$("#search_text .search_result:eq(8)").css("margin-right", "0");
	$("#search_text .search_result:eq(11)").css("margin-right", "0");
	$("#search_text .search_result:eq(14)").css("margin-right", "0");
	$("#search_text .search_result:eq(17)").css("margin-right", "0");
	
	$("#landmarks a").attr("id", function (arr) {
		return "plan_" + arr;
	})
		

	$('#site_plan_map img').addClass('hidden');
	
	
	$('#landmarks a').each(function() {
		$(this).hover(
			function(){
				$('#'+this.id+'_image').addClass("visible");															
			},
  			function () {
    			$('#'+this.id+'_image').removeClass("visible");
  			}
		)				
	});

	$('#thumbs img').attr('width','37');
	$('#thumbs img').attr('height','28');
	$("#thumbs img:first").addClass('selected_thumb');
	$("#thumbs img").click(function(){
	 	$('#thumbs img').removeClass('selected_thumb');
		$(this).addClass('selected_thumb');
	 });


});

function validateSignupData(){
	var s = "";
	with (document.frmSignup) {
	if (Email.value.length == 0) {
		s += "\nPlease provide your email address."
	}
	if (s.length==0) {
		with (document.frmSignup) {
		} 
		return true;
	}
		else {
			alert("Your sign up could not be completed for the following reason(s):\n" + s);
			return false;
		}
	}
}

function validateLakeViolationData(){
	var s = "";
	with (document.frmViolationInfo) {
	if (Email.value.length == 0) {
		s += "\nPlease provide your email address."
	}
	if (Date.value.length == 0) {
		s += "\nPlease provide the date of the incident."
	}
	if (Time.value.length == 0) {
		s += "\nPlease provide the time of the incident."
	}
	if (BoatNumber.value.length == 0) {
		s += "\nPlease provide a boat number."
	}
	if (ComplaintBy.value.length == 0) {
		s += "\nPlease provide the name of the complainant."
	}
	if (Address.value.length == 0) {
		s += "\nPlease provide the address of the complainant."
	}
	if (Phone.value.length == 0) {
		s += "\nPlease provide the phone number of the complainant."
	}
	if (BoatDescription.value.length == 0) {
		s += "\nPlease provide the description of the boat."
	}
	if (Occurrence.value.length == 0) {
		s += "\nPlease describe the occurrence."
	}
	if (s.length==0) {
		with (document.frmViolationInfo) {
		} 
		return true;
	}
		else {
			alert("Your sign up could not be completed for the following reason(s):\n" + s);
			return false;
		}
	}
}

function validateBrochureData(){
	var s = "";
	with (document.frmBrochure) {
	if (Name.value.length == 0) {
		s += "\nPlease provide your name."
	}
	if (Street.value.length == 0) {
		s += "\nPlease provide your street name."
	}
	if (City.value.length == 0) {
		s += "\nPlease provide the name of your city."
	}
	if (Email.value.length == 0) {
		s += "\nPlease provide your email address."
	}
	if (State.value.length == 0) {
		s += "\nPlease tell us what state you are in."
	}
	if (Email.value.length == 0) {
		s += "\nPlease provide your zip code."
	}
	if (s.length==0) {
		with (document.frmBrochure) {
		} 
		return true;
	}
		else {
			alert("Your sign up could not be completed for the following reason(s):\n" + s);
			return false;
		}
	}
}