Problem with armature with automatic weight I am relatively new to blender and was following this YT tutorial, everything was going well and my IK were working on the bones, but, when I tried to parent the bones to the mesh everything went chaotic. I have tried subsurf and mirroring but I might have done something wrong. Here's the before 

and the after

I don't know if I can upload files (if I can please tell me) but I would preffer to know why it doesn't work, anyways here's the .BLEND file on Mediafire.
If automatic weight doesn't work, you need to adjust the weight paint of the bones manually https://www.youtube.com/watch?v=l9S-jhBIEiU