modal cart closes if opened in checkout

the checkout button was an anchor to the checkout page. if the cart was
opened while on the checkout page, and the checkout button was used
again, nothing happened because the anchor location (checkout) was
already showing.
Button will now check the document location and set to checkout if it's
not already showing; if it is, the button will just close the modal.