EDIT: Wow, I did not see this was from 2012. It appeared at the top of the questions page, so I answered it. That's strange...I wonder why it was at the top of the "newest" section. I wouldn't have responded if I had seen the date.
I studied this in college (History was my major).
The short answer:
Hitler wanted to conquer the world as quickly as possible. His initial plan was to align with a few strategic groups and later conquer them as well. An example of this gone wrong is how Hitler aligned with Russia and then tried to take over the country after getting what he wanted from them.
Hitler obviously had no way of making a move in the Pacific as Germany is nowhere near that region, so he told the Japanese to do whatever they wanted and he'd back them up. His plan was to let them do the dirty work and then he'd take them over, too, when the Euro region was controlled. Russia again messed this up because hitler planned on utilizing the Trans-Siberian Railway to send troops and supplies from Moscow to Vladivostok to conquer China, Korea, and Japan, but when his Russian campaign failed, he really let Japan have free reign...because he had no choice at this point.
As for Hungary, Hitler aligned with them because he wanted to conquer the Middle-East and The Balkans, but had no initial means to carry this out. Hungary became his go-to country because it is positioned strategically between Germany, The Balkans/Middle-East, Poland, and the Ukraine. Hungary was his key to the near East. His plans began to fail when the Hungarian Resistance became more brazen and continued to disrupt his affairs in Hungary.
From the beginning, Hitler's goal was to enslave everyone but Germans with purely German ancestry that was documented for multiple generations. Everyone outside of that group was initially told otherwise, so that he could use them and defeat them. This concept applied to Vichy France, as well. In his Mein Kampf book, he wrote all of this out. The sad part is, before he became known, everyone thought he was a loony and didn't bother to read his book. He nearly followed his book's plans to a T, so it has been academically debated that the war could have been prevented, or at least foreseen if officials had looked into his book, which was actually widely published at the time. Remember, most nations aligned with him out of fear. The Nazis had the most advanced weaponry and tactics at the time and countries were literally falling within hours to days of his attacks. When Poland fell and Hitler kept bulldozing through countries, the ones that were offered alignment, did so to protect their people, culture, and history because remember, Hitler was also actively destroying the histories and cultures of countries so that no one could ever know anything other than Nazism once he took full control.
My source is my university education and research background.
Hope this helps!