// JavaScript Document
$(document).ready(function() {
$(".hideMePlease").hide(); // hide divs inside initially


$(".home_gallery").css("visibility","visible"); // shows carousel now that everything should be loaded to avoid ugly flash....

<!-- carousel functionality --> 
$(function() {
	$(".home_gallery").jCarouselLite({
		btnNext: "#next",
		btnPrev: "#prev",
		visible: 1, // to show 1
		scroll:1
	});
});


$(".gallery").css("visibility","visible"); // shows carousel now that everything should be loaded to avoid ugly flash....

<!-- carousel functionality --> 
$(function() {
	$(".gallery").jCarouselLite({
		btnNext: "#next",
		btnPrev: "#prev",
		visible: 3, // to show 3
		scroll:1
	});
});



<!-- to toggle contact up/down -->
$('#getInfo').click(function() {
   $('div.request').slideToggle('slow');	
   });



<!-- contact form validation -->
$(function() {
  $('.error').hide();
  $('input.text-input').css({backgroundColor:"#FFFFFF"});
  $('input.text-input').focus(function(){
    $(this).css({backgroundColor:"#cccccc"});
  });
  $('input.text-input').blur(function(){
    $(this).css({backgroundColor:"#FFFFFF"});
  });

  $(".button").click(function() {
		// validate and process form
		// first hide any error messages
    $('.error').hide();
		
	  var name = $("input#name").val();
		if (name == "") {
      $("label#name_error").show();
      $("input#name").focus();
      return false;
    }
		var emailAddress= $("input#emailAddress").val();
		if (emailAddress== "") {
      $("label#email_error").show();
      $("input#emailAddress").focus();
      return false;
    }
	
	var company = $("input#company").val();
	
		var theMessage = $("textarea#theMessage").val();
		if (theMessage == "") {
      $("label#theMessage_error").show();
      return false;
    }
		
		var dataString = 'name='+ name + '&emailAddress=' + emailAddress+ '&company=' + company + '&theMessage=' + theMessage;
		//alert (dataString);return false;
		
		$.ajax({
      type: "POST",
      url: "/bin/process.php",
      data: dataString,
      success: function() {
        $('#contact_form').html("<div id='message'></div>");
        $('#message').html("<h4 class=\"emphasis\">Request for Information Submitted!</h4>")
        .append("<p>Thank you for requesting more information. I will be in touch soon.</p>")
        .hide()
        .fadeIn(1500, function() {
          $('#message').append("<img id='checkmark' src='images/check.png' />");
        });
      }
     });
    return false;
	});
});


});