function showSurveyPopUp() {
    answered = $.cookie("answered");
    answerLater = $.cookie("later")
    
    if (!(answered || answerLater)) {
        $("#survey").show();
    }
}

function setSurveyCookie() {
	// Cookie expires in two weeks
    $.cookie("answered", "answered", { path : '/', expires : 14 });
    $("#survey").fadeOut();
}

function answerSomeOtherTime() {
	// Cookie expires after three days
	$.cookie("later", "later", { path: '/', expires : 1 });
	$("#survey").fadeOut();
}
 
$(document).ready(function()
{
    showSurveyPopUp();
});