I'm thinking about going to Morocco, and I would be avoiding the most touristic places. 

I was wondering, what currency should I take with me, Euro or US dollars? Or is it all the same. Would that be easy to exchange? Or maybe I should exchange money before and just bring Morrocan dirhams with me?

What about availability of ATMs in the country - outside of major cities like Casablanca and Marrakesh?