﻿$(document).ready(function()
{    
    var toggleLink = $(".lnkTogglePanel");
    $(".buyerHelpGuide").click(function(event)
    {
        var winHeight = 500;
        var winWidth = 600;                
        var winLeftPostn = (screen.width - winWidth) / 2;
        var winTopPostn = (screen.height - winHeight) / 2;
        
        window.open("/HowToBuy.aspx", "PurchaseGuide", "scrollbars=1, resizable=0, location=0, height=" 
            + winHeight + ", width=" + winWidth + ", left=" + winLeftPostn + ", top=" + winTopPostn);
        event.preventDefault();
    });  
    
    toggleLink.click(function(event)
    {
        $(".pnlExtendedProfile").slideToggle("medium", function()
        {            
            if(toggleLink.text() != "Hide More Details...")
            {
                toggleLink.text("Hide More Details...");
            }
            else
            {
                toggleLink.text("See More Details for this Practitioner");
            }
        });
        event.preventDefault();
    });         
});
