$(document).ready(function() {	

	$('a').each(function() {
		var a = new RegExp('/' + window.location.host + '/');
		if(!a.test(this.href)) {
			$(this).click(function(event) {
				event.preventDefault();
				event.stopPropagation();
				window.open(this.href, '_blank');
			});
		}
	});
	
	$(".gotocal").click(function() {
		window.location = 'http://www.theneighborhoodsnh.com/the-woodland-club/calendar';
	});
	
	
	
	$(".auto_submit").change(function() {
		this.form.submit();
	});
	
	$(".dismiss").click(function() {
		$(this.parentNode).hide("slow");
		return false;
	});
	
	$(".delete_check").click(function() {
		var confirmblock = confirm("Are you sure you want to delete this?");
		if(confirmblock) {} else { return false; }
	});
	
	$(".logout_check").click(function() {
		var confirmblock = confirm("Are you sure you want to logout?");
		if(confirmblock) {} else { return false; }
	});
	
	$("a[rel^='prettyPhoto']").prettyPhoto({deeplinking: false});
	
});
