function reserveWin() {
	var thisElem = document.getElementById("errorDiv");
	var linkElem = document.getElementById("popPage");
	var newWin = window.open("https://www.summerwoodwine.com/rooms_reservations.php", "popWin", "width=570,height=560,scrollbars=yes,status=yes,toolbar=yes");
	newWin.focus();
	if (newWin) {
		thisElem.style.display = "none";
	} else {
		thisElem.style.display = "block";
		linkElem.href = "https://www.summerwoodwine.com/rooms_reservations.php";
	}
 }

function membershipWin() {
	var thisElem = document.getElementById("errorDiv");
	var linkElem = document.getElementById("popPage");
	var newWin = window.open("https://www.summerwoodwine.com/membership_join.php", "popWin", "width=570,height=560,scrollbars=yes,status=yes,toolbar=yes");
	newWin.focus();
	if (newWin) {
		thisElem.style.display = "none";
	} else {
		thisElem.style.display = "block";
		linkElem.href = "https://www.summerwoodwine.com/membership_join.php";
	}
 }

function privacyWin() {
	var thisElem = document.getElementById("errorDiv");
	var linkElem = document.getElementById("popPage");
	var newWin = window.open("http://summerwoodwine.com/privacy.php", "popWin", "width=570,height=560,scrollbars=yes,status=yes,toolbar=yes");
	newWin.focus();
	if (newWin) {
		thisElem.style.display = "none";
	} else {
		thisElem.style.display = "block";
		linkElem.href = "http://summerwoodwine.com/privacy.php";
	}
 }

function purchaseWin() {
	var thisElem = document.getElementById("errorDiv");
	var linkElem = document.getElementById("popPage");
 	var newWin = window.open("https://www.summerwoodwine.com/order/", "popWin", "width=700,height=600,scrollbars=yes,status=yes,toolbar=yes");
	newWin.focus();
	if (newWin) {
		thisElem.style.display = "none";
	} else {
		thisElem.style.display = "block";
		linkElem.href = "https://www.summerwoodwine.com/order/";
	}
 }

$(document).ready(function() {
	$("#share a.notActive, #follow a.notActive").click(function(){
		$(this).hide();
		$(this).parent().find("a.active").show();
		$(this).parent().removeClass("closed").addClass("hover").stop().animate({ 
			height: "114px" 
		});
	});
	$("#share a.active, #follow a.active").click(function(){
		$(this).hide();
		$(this).parent().find("a.notActive").show();
		$(this).parent().stop().animate({ 
			height: "36px" 
		}, function(){
			$(this).removeClass("hover").addClass("closed");
		});
	});
});


