Capital gain and loss

My tax status is married and filed jointly. 

If my family has a long-term capital loss  (-$8000) and a short-term capital gain ($5000), can I use -$8000 to offset the short-term capital gain first and then deduct $3000 from ordinary income?