jQuery(document).ready(function(){

	// ContactForm
	$('#success').hide();
	$('#contactform').submit(function(){
	
		var action = $(this).attr('action');
		
		$('#contactform #submit').attr('disabled','disabled').after('<img src="images/ajax-loader.gif" class="loader" />');
		
		$("#message").slideUp(750,function() {
		$('#message').hide();			
		
		$.post(action, { 
			name: $('#name').val(),
			email: $('#email').val(),
			phone: $('#phone').val(),
			subject: $('#subject').val(),
			comments: $('#comments').val(),
			verify: $('#verify').val()
		},
			function(data){
				document.getElementById('message').innerHTML = data;
				$('#message').slideDown('slow');
				$('#contactform img.loader').fadeOut('fast',function(){$(this).remove()});
				$('#contactform #submit').removeAttr('disabled');
				if(data.match('success') != null) $('#submit').hide();
				
			}
		);
		
		});
		
		return false; 
	
	});
	// NewWindow
	$('a.new-window').click(function(){
	window.open(this.href);
	return false;
});
	//prettyPhoto
	$("a[rel^='prettyPhoto']").prettyPhoto({
	social_tools: false
	});
});
