	// $(function(){
		// });
		$(document).ready(function(){
    		$("#contact-form").validate();
    		$('#slides').slides({
				preload: true,
				play: 5000,
				pause: 3500,
				hoverPause: true,
				slideSpeed: 550,
				fadeSpeed: 550,
				hoverPause: true,
				animationStart: function(current){
					$('.caption').animate({
						bottom:-35
					},100);
					if (window.console && console.log) {
						// example return of current slide number
						console.log('animationStart on slide: ', current);
					};
				},
				animationComplete: function(current){
					$('.caption').animate({
						bottom:0
					},200);
					if (window.console && console.log) {
						// example return of current slide number
						console.log('animationComplete on slide: ', current);
					};
				},
				slidesLoaded: function() {
					$('.caption').animate({
						bottom:0
					},200);
				}
				});
				
			var v = jQuery("#form").validate({
			submitHandler: function(form) {
				jQuery(form).ajaxSubmit({
					target: "#result"
				});
			}
		});	
				
			$('#contact-submit').click(function(e){
				if( $(this).val() != 'Message Sent.' && $("#contact-form").valid() == true ){
		  			$.post('contact.php',{ 
		  				'contact-name' : $('#contact-name').val(), 
		  				'contact-email' : $('#contact-email').val(), 
		  				'contact-phone' : $('#contact-phone').val(), 
		  				'contact-message' : $('#contact-message').val() 
		  				}, function(data){
		  				if( data == 'true' ){
		  					// alert('Data successfully sent - Show some "thanks"!');
		  					$('#contact-form ul').fadeOut(600,function(){
		  						$(this).empty();
		  						$('.thanks').fadeIn(600);
		  						$('#contact-submit').attr('value','Message Sent.');
		  					});
		  				} else {
		  					alert('There was a problem sending your message. Please try once more.');
		  				}
		  			});
	  			}
	  			e.preventDefault();
  			});
  		});	

