$(document).ready(function(){

var closePopup = $("#popup a.close"),
    popup = $("#popup"),
    overlay = $("#overlay");
        
        
  	/* flash isn't detected */
	//if(!FlashDetect.installed){
    if (true){
		setTimeout(function(){
            overlay.css({ 
                opacity: 0.6,
                height: $(document).height()
            });
            overlay.fadeIn(200);
            popup.fadeIn(500);
        }, 200);
        closePopup.click(function(){
            overlay.fadeOut(200);
            popup.fadeOut(200);
            return false;
        });
    }
    /* change popup height on window resize */
    $(window).resize(function(){
        overlay.css({ 
            height: $(document).height()
            
        });
    });
    
    //$("#signin_username").focus();
    //$("#signin_username").focus();
    
    $(function(){ $("#infield label").inFieldLabels(); });
});

