$(document).ready(function() {
		$("div.content_bottom a").anchorAnimate();
		
	$("#reqform").validate({
		rules: {
			name: {
				required: true,
				minlength: 2
			},
			email: {
				required: true,
				minlength: 2,
				email: true
			},
			problem: {
				required: true
			},
			errorClass: "error"
		},
		messages: {
			name: {
				required: "&nbsp &nbsp &nbsp &nbsp Please enter your name",
				minlength: "&nbsp &nbsp &nbsp &nbsp You must enter at least two characters"
			},
			email: {
				required: "&nbsp &nbsp &nbsp &nbsp Please enter your email",
				minlength: "&nbsp &nbsp &nbsp &nbsp You must enter at least two character",
				email: "&nbsp &nbsp &nbsp &nbsp Please enter a valid email format"
			},
			problem: {
				required: "&nbsp &nbsp &nbsp &nbsp Please enter your problem",
			},
		},
	
	});
$('#form_submit').live('click', function() {   	$('#reqform').submit(); });
	});
	// JavaScript Document
	jQuery.fn.anchorAnimate = function(settings) {

 	settings = jQuery.extend({
		speed : 1100
	}, settings);	
	
	return this.each(function(){
		var caller = this
		$(caller).click(function (event) {	
			event.preventDefault()
			var locationHref = window.location.href
			var elementClick = $(caller).attr("href")
			
			var destination = $(elementClick).offset().top;
			$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
				window.location.hash = elementClick
			});
		  	return false;
		})
	})
}
