$(document).ready(function() {
    $("#fs_button").click(function() {
        var fa_form = "#fiesta_form_wrapper";

      //Get the screen height and width
        var overlayHeight = $(window).height();
        var overlayWidth = $(window).width();

        //Set height and width to mask to fill up the whole screen
        $('#overlay').css({'width': overlayWidth,'height': overlayHeight});

        //transition effect
        $('#overlay').fadeIn(1000);
        $('#overlay').fadeTo("slow",0.7);

        //Get the window height and width
        //var winH = $(window).height();
        var winW = $(window).width();

        //Set the popup window to center
        //$(fa_form).css('top',  winH/2-$(fa_form).height()/2);
        $(fa_form).css('left', winW/2-$(fa_form).width()/2);

        //transition effect
        $(fa_form).fadeIn(2000);
	$('#nick').focus();
        $('#fiesta_close').show();
 
    });


    $("#fiesta_close").click(function() {
        var fa_form = "#fiesta_form_wrapper";
        $(fa_form).hide();
        $('#overlay').hide();
        $('#fiesta_close').hide();

    });
});



