Rig attaching to wrong legs
For some reason your model is "inverted".

Try this :


In object mode : Ctrl+A then choose "rotation and scale" 
In edit mode : select all your vertices with A then replace your normals with Ctrl+N
Now simply reparent your mesh with the armature