$(document).ready(function(){
	
//Page Slide
$(function(){
    $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
        && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 2000);
                return false;   
            }   
    } 
});				   
	
	//$("p").find('&').addClass('i');
	
	
	$('#contact-form').validate({
		onblur: true,
		rules: {
			email: {required: true,minlength:2,email: true},
			name: {required: true,minlength: 3},
			messages: {required: true,minlength: 10}	
		},
							 
			messages:{
				email: "Please enter a valid email",
				name: "Please enter your name",
				messages: "Please enter your message (min 10 characters)"
			 },
			 
			 submitHandler: function(form){
			 		 $(form).ajaxSubmit({
			 		 success: function() { 
		                $('#contact-form').hide();
		                $('#contact').append("<div id='thanks'><h4>Thanks for saying Hi!</h4> <p>I'll try to be in touch within 24 hours of receiving your message.  In the mean time, say hi & follow me on twitter</p></div>"); 
	                }
	            });
			 }						 
	 });
	 
	 
						 
							 
							 
});



    

    
});//end jQuery
