jQuery(function( $ ){
	
	// The default axis is 'y', but in this demo, I want to scroll both
	// You can modify any default like this
	$.localScroll.defaults.axis = 'xy';

	$.localScroll({
		target: '#content_wrapper', // could be a selector or a jQuery object too.
		queue:true,
		duration:2000,
		hash:true,
		onBefore:function( e, anchor, $target ){
			// The 'this' is the settings object, can be modified
		},
		onAfterFirst:function(){
			// The 'this' contains the scrolled element (#content)
			if (location.hash != '') {
	            obj1 = location.hash;
	        }
	        else {
	            obj1 = 'pald_linkhome';
	        }
			var work = obj1.replace("#","pald_link");
			var el1 = document.getElementById(work);
			var ar1 = document.getElementsByTagName("a");
			for (var i=0; i<ar1.length; i++){
				if (ar1[i].className == "selected")
					ar1[i].className = "";
			}
			el1.className = "selected";				
		}
	});

});

function check_contact(form) {					
	var emailFilter=/^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/;
	if (form.name.value == ''){
		alert("Please enter your name...");
		form.name.focus();
		return false;
	}
	if (form.email.value == '' || form.email.value.match(illegalChars) || !(emailFilter.test(form.email.value))){
		alert("Please enter your email address...");
		form.email.focus();
		return false;
	}
	if (form.message.value == ''){
		alert("Please enter a message...");
		form.message.focus();
		return false;
	}
}