In this pilot study the investigators will treat 30 orthopedic surgery patients (hip fracture, hip or knee arthroplasty) with either atorvastatin or placebo (a capsule with no study drug). Patients will start the study drug prior to surgery and take it for 45 days after surgery. Neither the doctors nor the patients will know whether they are taking atorvastatin or placebo. The investigators will look for evidence of inflammation and heart injury after surgery. The investigators hypothesize that atorvastatin will lessen the degree of postoperative inflammation found in these patients. In this study, the investigators will use a very sensitive test of heart injury that can detect problems even when patients have no symptoms. The investigators hypothesize that this test will demonstrate silent heart injury in over 50% of the hip fracture patients and over 30% of arthroplasty patients in our study.