<!--
$j(document).ready(function() {
	
	
	$j('#btnFormSubmit').hover(
		function(){
			this.src = this.src.replace('-off.gif', '-over.gif') ;
		},
		function(){
			this.src = this.src.replace('-over.gif', '-off.gif') ;
		}
	) ;
	
	$j('#contactForm').validate({
		submitHandler:function( form ){
			var options = {
				dataType: 'xml',
				success: formCallback
			} ;
			
			$j.blockUI({
				message:'<h2>Sending Email...</h2>' ,
				css:{
					backgroundColor:'#000',
					border:'1px solid #FFF1C4',
					color:'#FFF1C4'
				}
			}) ;
			
			$j(form).ajaxSubmit(options) ;
			return false ;
		}
	}) ;
	
});


function formCallback( responseXML ) {
	var success = $j('success', responseXML).text() ;
	if ( success == 'true') {
		$j('<p>You message has been sent.</p>').insertAfter('#contactForm') ;
	} else {
		$j('<p>Your message was not sent, please try again later.</p>').insertAfter('#contactForm') ;
	}
	
	$j('#contactForm').resetForm() ;
	$j.unblockUI() ;
}
//-->
