var whohahah = 0;
	  $(document).ready(function() {		
		  $('.l1').click(function() {										
				$('#content').animate({scrollTop: 0}, 1000);				
			});		  				
		  $('.l2').click(function() {				
				var targetOffset = 350;				
				$('#content').animate({scrollTop: targetOffset}, 1000);				
			});
			
			$('.l3').click(function() {				
				var targetOffset =  350 * 2;				
				$('#content').animate({scrollTop: targetOffset}, 1000);				
			});			
			$('.l5').click(function() {				
				var targetOffset = 350 * 3;				
				$('#content').animate({scrollTop: targetOffset}, 1000);				
			});						

			  
				$("#contact_submit").click(function() {		
						if(whohahah!=0)
							return false;
						
											
						  var name = $("input#name").val();
							if (name == "")
							{
								$("input#name").focus();
								return false;
							}
							
							var email = $("input#email").val();
							if (email == "") {
								$("input#email").focus();
								return false;
							}
							
							
							
							var apos=email.indexOf("@");
							var dotpos=email.lastIndexOf(".");
							if (apos<1||dotpos-apos<2)
							{
								$("input#email").focus();
								return false;
							}
							
							
							var phone = $("input#phone").val();
							
							var description = $("textarea#description").val();
							if (description == "")
							{    
								$("textarea#description").focus();
								return false;
							}
					
			var dataString = 'name='+ name + '&email=' + email + '&phone=' + phone + '&description=' + description;
							
						//alert(dataString);
						
						$("#contact_submit").attr("src", "images/do_submit.gif");
						

						
						  $.ajax({
						  type: "post",
						  url: "serve/process.php",
						  data: dataString,
						  success: function() {
							$('#contact-Online').html("<div id='message' style='padding-top:25px;'></div>");
							$('#message').html("<h2>Contact Form Submitted!</h2>")
							.append("<p>We will be in touch soon.</p>")
							.hide()
							.fadeIn(1500, function() {
							  $('#message').append("<img id='checkmark' src='images/check.png' />");
							});
						  }
						 });
						 whohahah = 1;
						return false;
				});
				
			  
	  });
