What is the direction of static friction? Note: My question is duplicate of the following  


*

*Direction of friction when a car turns

*Why does friction cause a car to turn? 

I've gone through many related questions especially the first. As I understand the static friction is always opposite to the force applied on the object as shown:
image http://www.school-for-champions.com/science/images/friction-slide_kinetic.gif
But in the case when front wheels of a vehichal are turned the force of static friction is not opposite to the applied force. For example consider a car accelerating forward. The net force on the car is in forward direction which is provided from the rear tyres, if eventually break is pressed static friction(assuming tyres aren't skidding) comes into picture. This friction should be and is opposite in direction to the direction of force applied by the rear tyres. When the front tyres are turned the direction of static friction is changed(radially inward) means the direction of static friction is not opposite to the direction of applied force as shown:
 
Question: Is the force of static friction is always opposite to the applied force ? If not then what determines its direction?
 A: Static friction always opposes relative motion at the point of contact.
There are two cases possible:
1)It orients itself in direction and magnitude in such a way that the relative acceleration of the contact point is zero.
2)If this is not possible(such as in friction is too small to prevent motion),it tries to minimize the relative acceleration.
A: 
Red: Direction of motion of the top of the wheel relative to road
Orange: Direction of motion of the bottom of the wheel relative to road
Green: Direction of force of friction acting on the wheel
If the wheels are still rolling: friction at the ground/wheel interface simply opposes the rolling of the wheel, slowing it down. In the reference frame of the chassis, this friction has both x & y components for any nonzero angle of steer, and also acts on the chassis because the wheel is connected to it by axle (thereby allowing the car to simultaneously advance and turn). 
If the wheels are locked due to braking, then it doesn't matter what their orientation is, as a per the extreme example in the second diagram, and the reason why frozen roads are so dangerous.
