$(document).ready(function() {  
    
    // initialize tabs
    $("div.tabs").tabs();
    
    // dialog div id 
    
//    if($("input[name$=hidReturningUserIDHeader]").val() != "")
//    {
//        var returningUserID = "#" +  $("input[name$=hidReturningUserIDHeader]").val(); 
        var returningUserID = $("input[name$=hidReturningUserIDHeader]").val(); 
      
        InitModalLoginDiv(returningUserID); 
        
        // make Login click open dialog
        $("#lnkLogin").click(function(event) {
        
            InitModalLoginEnterKeyClick(returningUserID);
        
            // move dialog back into form (asp.net postbacks won't work properly w/o this)
            $("#" +  returningUserID).parent().appendTo($("form"));

            $("#" +  returningUserID).dialog("open");  
                
            // prevent the link from redirecting
            event.preventDefault();
        });      
        
        //  make Post click open dialog
        $("a.PostLoggedOut").click( function(event){
                ActionLinkLoginHandler(event, returningUserID, "You must Login before you can Post", "GroupBuyPostWizard", "true");
        });  
//    }
    
});