NEW YORK (TheStreet) -- Jim Cramer explained recent changes to his Action Alerts PLUS charitable trust portfolio.

Cramer told TheStreet's Rhonda Schaffler that he made changes to free up cash because, "when Greece fails there will be opportunities and you need cash to be able to take advantage of those opportunities."

Last week, Twenty-First Century Fox  (FOXA) made headlines over news that Rupert Murdoch will be stepping down from his role as CEO to be replaced by his son James.

Although Cramer liked Rupert Murdoch, Cramer said that the new CEO and recent bad quarter "were not good enough" and AAP sold the rest of its holdings in the company for cash.

Similarly, Cramer is also freeing up cash from the AAP positions in Starbucks (SBUX) and Morgan Stanley (MS). Both these companies yielded huge wins for AAP but as Cramer often says, "bulls make money, bears make money, and pigs get slaughtered."

Cramer wanted to realize some of the profits made from these two companies and have the cash to invest when Greece's default causes other opportunities to arise.

As to trimming of AAP's position in Schlumberger (SLB), Cramer said that the stock had done well for AAP but that there is currently more of an upside in EOG Resources (EOG), and he wants to set aside money for Occidental Petroleum (OXY) as Occidental goes down.

But the big thing behind the trading this past week has been Cramer's play on Greece. "We see that Greece is breaking things up...that Greece is going to hurt the euro... that Greece is going to cause a state of emergency and we want money so we can buy things when they get hit that wouldn't otherwise get hit...," Cramer said, and "...the chaos means you have to be ready to buy American stocks and we want to have that cash to do it."

Cramer tells investors to raise cash coming into the Greece deal and then put the money back in after Greece defaults. But even if Greece doesn't default, AAP will still do fine.

Still, the narrative behind the Greece story has changed and Europe is no longer willing to play Greece's games.

More from Investing

The Stock Market Has Every Reason to See a Fresh Rally

The Stock Market Has Every Reason to See a Fresh Rally

3 Simple Tips on Investing From TheStreet's Jim Cramer

3 Simple Tips on Investing From TheStreet's Jim Cramer

Tesla's Supercharger Network Is Booming -- Here's Why That's a Concern

Tesla's Supercharger Network Is Booming -- Here's Why That's a Concern

After PayPal Buys iZettle, Pay-Tech Firms Could Process These Deals

After PayPal Buys iZettle, Pay-Tech Firms Could Process These Deals

Attention 60 Minutes: Google Isn't the Only Big-Tech Monopoly

Attention 60 Minutes: Google Isn't the Only Big-Tech Monopoly