$(document).ready(function() {
	
	$("#logo").click(function() {
		window.location = "default.asp"
	})

	$(".nav").hover(function () {
		var id = $(this).attr('id');
		$(this).parent().css('background','url(images/' + id + 'bg.png) 0 0 no-repeat')
		$(this).parent().prev().children().css('background','none')
		$(this).parent().next().children().css('background','none')
		console.log($(this).parent().prev('li>span'))
	  },function () {
		  $(this).parent().css('background','none')
		  $(this).parent().prev().children().css('background','url(images/blueDot.png) 0px 17px no-repeat')
		  $(this).parent().next().children().css('background','url(images/blueDot.png) 0px 17px no-repeat')
		
	  })
	  
	  
	  $("#system").change(function() {
		  		 
	  	window.location = $("#system option:selected").val()
	  
	  })
	  
	  $("#contactForm").validate({
		rules: {
			fName: {
				required: true
			},
			lName: {
				required: true
			},
			company: {
				required: true
			},
			address1: {
				required: true
			},
			city: {
				required: true
			},	
			state: {
				required: true
			},
			zip: {
				required: true
			},
			email: {
				required:  true,
				email: true
			},
			phone: {
				required: true
			}
		},
		errorPlacement: function(error, element) {
			error.appendTo( element.next("div") );
		}
		
	   })
	   
	    $("#customerSupport").validate({
		rules: {
			fName: {
				required: true
			},
			lName: {
				required: true
			},
			company: {
				required: true
			},
			email: {
				required:  true,
				email: true
			},
			phone: {
				required: true
			}
		},
		errorPlacement: function(error, element) {
			error.appendTo( element.next("div") );
		}
		
	   })

	
	
})
