IDLE PROBLEMS

As soon as I start my car after cooled down, I give gas and it kind of shakes like it wants to dies. After about a minute it's fine. Also after car has heated up and I put it in park, the car idles close to 2000 rpms. When I put it in drive it drops back down to 1000 rpms. What could be causing this?

Replace air filter. If this doesn't help it is more than likely the Idle air valve. Looks a little like this but is bigger (black and gray)and located just below winshield on firewall.
__
___________________(__)
l l l l
l__l_____l l
___________l